SBOLDocument
Class to represent an SBOL2 document in memory.
Static Method Summary
Static Public Methods | ||
public static |
loadRDF(rdf: string, callback: function(err: Error, sbol: SBOLDocument)) Load a new SBOL document from an RDF/XML string. |
|
public static |
loadRDFFile(filename: string, callback: function(err: Error, sbol: SBOLDocument)) Load a new SBOL document from an RDF/XML file. |
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public get |
Returns a list of all ComponentDefinitions in the document |
|
public get |
components: Component[]: * Returns a list of all Components in the document |
|
public get |
interactions: Interaction[]: * Returns a list of all Interactions in the document |
|
public get |
mappings: Mapping[]: * Returns a list of all Mappings in the document |
|
public get |
Returns a list of all Models in the document |
|
public get |
Returns a list of all ModuleDefinitions in the document |
|
public get |
Returns a list of all Modules in the document |
|
public get |
participations: Participation[]: * Returns a list of all Participations in the document |
|
public get |
Returns a list of all SequenceAnnotations in the document |
|
public get |
Returns a list of all SequenceConstraints in the document |
|
public get |
Returns a list of all Sequences in the document |
|
public get |
unresolvedURIs: string[]: * Returns a list of all unresolved URIs in the document. |
Method Summary
Public Methods | ||
public |
collection(uri: string): Collection Create a new Collection in the document. |
|
public |
Create a new Component in the document. |
|
public |
Create a new ComponentDefinition in the document. |
|
public |
Create a new Cut in the document. |
|
public |
Create a new FunctionalComponent in the document. |
|
public |
genericLocation(uri: string): GenericLocation Create a new GenericLocation in the document. |
|
public |
interaction(uri: string): Interaction Create a new Interaction in the document. |
|
public |
link() Attempt to resolve any unresolved URIs in the document, replacing them with their instantiated object. |
|
public |
Load RDF/XML into the document. |
|
public |
Return the corresponding object for a URI, if resolved. |
|
public |
lookupURIs(uris: URI[]): Array Map a list of URIs to their corresponding objects, if resolved. |
|
public |
Map a URI to an object, such that lookupURI will return the object and the URI will be removed from unresolvedURIs if present. |
|
public |
Create a new Mapping in the document. |
|
public |
Create a new Model in the document. |
|
public |
Create a new Module in the document. |
|
public |
Create a new ModuleDefinition in the document. |
|
public |
participation(uri: string): Participation Create a new Participation in the document. |
|
public |
Create a new Range in the document. |
|
public |
Create a new Sequence in the document. |
|
public |
Create a new SequenceAnnotation in the document. |
|
public |
Create a new SequenceConstraint in the document. |
|
public |
Serialize the document to JSON |
|
public |
Serialize the document to SBOL RDF/XML |
|
public |
toDisplayList(): * |
|
public |
The reverse of mapURI. |
Static Public Methods
public static loadRDF(rdf: string, callback: function(err: Error, sbol: SBOLDocument)) source
Load a new SBOL document from an RDF/XML string.
Parameters:
Name | Type | Attribute | Description |
rdf | string | A string containing valid RDF/XML |
|
callback | function(err: Error, sbol: SBOLDocument) |
public static loadRDFFile(filename: string, callback: function(err: Error, sbol: SBOLDocument)) source
Load a new SBOL document from an RDF/XML file.
Parameters:
Name | Type | Attribute | Description |
filename | string | The name of the file |
|
callback | function(err: Error, sbol: SBOLDocument) |
Public Constructors
public constructor source
Public Members
public get componentDefinitions: ComponentDefinition[]: * source
Returns a list of all ComponentDefinitions in the document
public get mappings: Mapping[]: * source
Returns a list of all Mappings in the document
Returns:
Mapping[] |
public get moduleDefinitions: ModuleDefinition[]: * source
Returns a list of all ModuleDefinitions in the document
public get participations: Participation[]: * source
Returns a list of all Participations in the document
public get sequenceAnnotations: SequenceAnnotation[]: * source
Returns a list of all SequenceAnnotations in the document
public get sequenceConstraints: SequenceConstraint[]: * source
Returns a list of all SequenceConstraints in the document
Public Methods
public collection(uri: string): Collection source
Create a new Collection in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Collection |
public component(uri: string): Component source
Create a new Component in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Component |
public componentDefinition(uri: string): ComponentDefinition source
Create a new ComponentDefinition in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the ComponentDefinition |
public cut(uri: string): Cut source
Create a new Cut in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Cut |
public functionalComponent(uri: string): FunctionalComponent source
Create a new FunctionalComponent in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the FunctionalComponent |
public genericLocation(uri: string): GenericLocation source
Create a new GenericLocation in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the GenericLocation |
public interaction(uri: string): Interaction source
Create a new Interaction in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Interaction |
public link() source
Attempt to resolve any unresolved URIs in the document, replacing them with their instantiated object.
public loadRDF(rdf: string, callback: function(err: Error)) source
Load RDF/XML into the document. The existing contents of the document will be preserved.
public lookupURI(uri: string | URI): Array source
Return the corresponding object for a URI, if resolved. If the URI has not been resolved, it will be returned unmodified.
Parameters:
Name | Type | Attribute | Description |
uri | string | URI |
public lookupURIs(uris: URI[]): Array source
Map a list of URIs to their corresponding objects, if resolved. Unresolved URIs will be returned unmodified.
Parameters:
Name | Type | Attribute | Description |
uris | URI[] |
public mapURI(uri: string | URI, object: *) source
Map a URI to an object, such that lookupURI will return the object and the URI will be removed from unresolvedURIs if present.
Parameters:
Name | Type | Attribute | Description |
uri | string | URI | The URI to map |
|
object | * | The object to map to the URI |
public mapping(uri: string): Mapping source
Create a new Mapping in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Mapping |
Returns:
Mapping |
public model(uri: string): Model source
Create a new Model in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Model |
public module(uri: string): Module source
Create a new Module in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Module |
public moduleDefinition(uri: string): ModuleDefinition source
Create a new ModuleDefinition in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the ModuleDefinition |
public participation(uri: string): Participation source
Create a new Participation in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Participation |
public range(uri: string): Range source
Create a new Range in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Range |
public sequence(uri: string): Sequence source
Create a new Sequence in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the Sequence |
public sequenceAnnotation(uri: string): SequenceAnnotation source
Create a new SequenceAnnotation in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the SequenceAnnotation |
public sequenceConstraint(uri: string): SequenceConstraint source
Create a new SequenceConstraint in the document.
Parameters:
Name | Type | Attribute | Description |
uri | string |
|
The URI of the SequenceConstraint |