libSBOL  2.3.3
Public Attributes | Public Member Functions | Protected Member Functions | List of all members
Component Class Reference

Detailed Description

The Component class is used to compose ComponentDefinition objects into a structural hierarchy. For example, the ComponentDefinition of a gene could contain four Component objects: a promoter, RBS, CDS, and terminator. In turn, the ComponentDefinition of the promoter Component could contain Component objects defined as various operator sites.

Public Attributes

URIProperty roles
 The expected purpose and function of a genetic part are described by the roles property of ComponentDefinition. More...
 
URIProperty roleIntegration
 A roleIntegration specifies the relationship between a Component instance’s own set of roles and the set of roles on the included sub-ComponentDefinition. More...
 
OwnedObject< LocationsourceLocations
 The sourceLocations property allows only a portion of the Component's sequence to be used when compiling a composite Sequence from a component hierarchy. This serves two related purposes: (1) To support the insertion of parts within a larger plasmid or genome "backbone". Typically, this will replace a small segment of the backbone which, currently, cannot be expressed in SBOL. (2) To support the "trimming" of part boundaries as it may happen during DNA assembly.
 
ReferencedObject definition
 The definition property is a REQUIRED URI that refers to the ComponentDefinition of the ComponentInstance. More...
 
URIProperty access
 The access property is a REQUIRED URI that indicates whether the ComponentInstance can be referred to remotely by a MapsTo. More...
 
OwnedObject< MapsTomapsTos
 The mapsTos property is OPTIONAL and MAY contain a set of MapsTo objects that refer to and link together ComponentInstance objects (both Component objects and FunctionalComponent objects) within a larger design.
 
OwnedObject< Measurementmeasurements
 The measurements property links a ComponentInstance to parameters or measurements and their associated units. For example a Measurement attached to a FunctionalComponent might indicate the quantity of a component ingredient in a growth medium recipe.
 
URIProperty persistentIdentity
 The persistentIdentity property is OPTIONAL and has a data type of URI. This URI serves to uniquely refer to a set of SBOL objects that are different versions of each other. An Identified object MUST be referred to using either its identity URI or its persistentIdentity URI.
 
TextProperty displayId
 The displayId property is an OPTIONAL identifier with a data type of String. This property is intended to be an intermediate between name and identity that is machine-readable, but more human-readable than the full URI of an identity. If the displayId property is used, then its String value SHOULD be locally unique (global uniqueness is not necessary) and MUST be composed of only alphanumeric or underscore characters and MUST NOT begin with a digit.
 
VersionProperty version
 If the version property is used, then it is RECOMMENDED that version numbering follow the conventions of semantic versioning, particularly as implemented by Maven. This convention represents versions as sequences of numbers and qualifiers that are separated by the characters “.” and “-” and are compared in lexicographical order (for example, 1 < 1.3.1 < 2.0-beta). For a full explanation, see the linked resources.
 
URIProperty wasDerivedFrom
 The wasDerivedFrom property is OPTIONAL and has a data type of URI. An SBOL object with this property refers to another SBOL object or non-SBOL resource from which this object was derived. If the wasDerivedFrom property of an SBOL object A that refers to an SBOL object B has an identical persistentIdentity, and both A and B have a version, then the version of B MUST precede that of A. In addition, an SBOL object MUST NOT refer to itself via its own wasDerivedFrom property or form a cyclical chain of references via its wasDerivedFrom property and those of other SBOL objects. For example, the reference chain “ A was derived from B and B was derived from A” is cyclical.
 
ReferencedObject wasGeneratedBy
 An Activity which generated this ComponentDefinition, eg., a design process like codon-optimization or a construction process like Gibson Assembly.
 
TextProperty name
 The name property is OPTIONAL and has a data type of String. This property is intended to be displayed to a human when visualizing an Identified object. If an Identified object lacks a name, then software tools SHOULD instead display the object’s displayId or identity. It is RECOMMENDED that software tools give users the ability to switch perspectives between name properties that are human-readable and displayId properties that are less human-readable, but are more likely to be unique.
 
TextProperty description
 The description property is OPTIONAL and has a data type of String. This property is intended to contain a more thorough text description of an Identified object.
 
URIProperty identity
 The identity property is REQUIRED by all Identified objects and has a data type of URI. A given Identified object’s identity URI MUST be globally unique among all other identity URIs. The identity of a compliant SBOL object MUST begin with a URI prefix that maps to a domain over which the user has control. Namely, the user can guarantee uniqueness of identities within this domain. For other best practices regarding URIs see Section 11.2 of the SBOL specification doucment.
 

Public Member Functions

 Component (std::string uri="example", std::string definition="", std::string access=SBOL_ACCESS_PUBLIC, std::string version=VERSION_STRING)
 Construct a Component. More...
 
virtual rdf_type getTypeURI ()
 
std::string getClassName (std::string type)
 
SBOLObjectfind (std::string uri)
 Search this object recursively to see if an object or any child object with URI already exists. More...
 
SBOLObjectfind_property (std::string uri)
 Search this object recursively to see if it contains a member property with the given RDF type. More...
 
std::vector< SBOLObject * > find_property_value (std::string uri, std::string value, std::vector< SBOLObject *> matches={})
 Search this object recursively to see if it contains a member property with the given RDF type and indicated property value. More...
 
std::vector< SBOLObject * > find_reference (std::string uri)
 Search this object recursively to see if it contains a member property with the given RDF type and indicated property value. More...
 
int compare (SBOLObject *comparand)
 Compare two SBOL objects or Documents. More...
 
std::string getPropertyValue (std::string property_uri)
 Get the value of a custom annotation property by its URI. More...
 
std::vector< std::string > getPropertyValues (std::string property_uri)
 Get all values of a custom annotation property by its URI. More...
 
std::vector< std::string > getProperties ()
 Gets URIs for all properties contained by this object. More...
 
void setPropertyValue (std::string property_uri, std::string val)
 Set and overwrite the value for a user-defined annotation property. More...
 
void addPropertyValue (std::string property_uri, std::string val)
 Append a value to a user-defined annotation property. More...
 
void setAnnotation (std::string property_uri, std::string val)
 Set the value for a user-defined annotation property. More...
 
std::string getAnnotation (std::string property_uri)
 Get the value of a custom annotation property by its URI. More...
 
virtual void close ()
 Use this method to destroy an SBOL object that is not contained by a parent Document. More...
 

Protected Member Functions

Identifiedcopy (Document *target_doc=NULL, std::string ns="", std::string version="")
 Copy an object and automatically increment its version. More...
 
template<class ExtensionClass >
void register_extension_class (std::string ns, std::string ns_prefix, std::string class_name)
 Register an extension class and its namespace, so custom data can be embedded into and read from SBOL files. More...
 

Constructor & Destructor Documentation

◆ Component()

Component ( std::string  uri = "example",
std::string  definition = "",
std::string  access = SBOL_ACCESS_PUBLIC,
std::string  version = VERSION_STRING 
)
inline

Construct a Component.

If operating in SBOL-compliant mode, use ComponentDefinition::components::create instead.

Parameters
Afull URI including a scheme, namespace, and identifier. If SBOLCompliance configuration is enabled, then this argument is simply the displayId for the new object and a full URI will automatically be constructed.
definitionA URI referring to the ComponentDefinition that defines this instance
accessFlag indicating whether the Component can be referred to remotely by a MapsTo
versionAn arbitrary version string. If SBOLCompliance is enabled, this should be a Maven version string of the form "major.minor.patch".

Member Function Documentation

◆ addPropertyValue()

void addPropertyValue ( std::string  property_uri,
std::string  val 
)
inherited

Append a value to a user-defined annotation property.

Either a literal or URI value

◆ close()

void close ( )
virtualinherited

Use this method to destroy an SBOL object that is not contained by a parent Document.

If the object does have a parent Document, instead use doc.close() with the object's URI identity as an argument. Recurse through child objects and delete them.

◆ compare()

int compare ( SBOLObject comparand)
inherited

Compare two SBOL objects or Documents.

The behavior is currently undefined for objects with custom annotations or extension classes.

Parameters
comparandA pointer to the object being compared to this one.
Returns
1 if the objects are identical, 0 if they are different

◆ copy()

Identified& copy ( Document target_doc = NULL,
std::string  ns = "",
std::string  version = "" 
)
protectedinherited

Copy an object and automatically increment its version.

If the optional version argument is specified, it will be used instead of incrementing the copied object's version. An object may also be copied into a new document and a new namespace, assuming compliant URIs.

Template Parameters
SBOLClassThe type of SBOL object being copied
Parameters
new_docThe new copies will be attached to this Document. NULL by default.
nsThis namespace will be substituted for the current namespace (as configured by setHomespace) in all SBOL-compliat URIs.
versionA new version
Returns
The full URI of the created object.

◆ find()

SBOLObject * find ( std::string  uri)
inherited

Search this object recursively to see if an object or any child object with URI already exists.

Parameters
uriThe URI to search for.
Returns
A pointer to theobject with this URI if it exists, NULL otherwise

◆ find_property()

SBOLObject * find_property ( std::string  uri)
inherited

Search this object recursively to see if it contains a member property with the given RDF type.

Parameters
uriThe RDF type of the property to search for.
Returns
A pointer to the object that contains a member property with the specified RDF type, NULL otherwise

◆ find_property_value()

vector< SBOLObject * > find_property_value ( std::string  uri,
std::string  value,
std::vector< SBOLObject *>  matches = {} 
)
inherited

Search this object recursively to see if it contains a member property with the given RDF type and indicated property value.

Parameters
uriThe RDF type of the property to search for.
valueThe property value to match
Returns
A vector containing all objects found that contain a member property with the specified RDF type

◆ find_reference()

vector< SBOLObject * > find_reference ( std::string  uri)
inherited

Search this object recursively to see if it contains a member property with the given RDF type and indicated property value.

Parameters
uriA URI, either an ontology term or an object reference, to search for
Returns
A vector containing all objects found that contain the URI in a property value

◆ getAnnotation()

std::string getAnnotation ( std::string  property_uri)
inherited

Get the value of a custom annotation property by its URI.

Synonymous with getPropertyValue

Parameters
property_uriThe URI for the property
Returns
The value of the property or SBOL_ERROR_NOT_FOUND

◆ getClassName()

std::string getClassName ( std::string  type)
inherited
Returns
Parses a local class name from the RDF-type of this SBOL Object

◆ getProperties()

std::vector< std::string > getProperties ( )
inherited

Gets URIs for all properties contained by this object.

This includes SBOL core properties as well as custom annotations. Use this to find custom extension data in an SBOL file.

Returns
A vector of URIs that identify the properties contained in this object

◆ getPropertyValue()

std::string getPropertyValue ( std::string  property_uri)
inherited

Get the value of a custom annotation property by its URI.

Parameters
property_uriThe URI for the property
Returns
The value of the property or SBOL_ERROR_NOT_FOUND

◆ getPropertyValues()

std::vector< std::string > getPropertyValues ( std::string  property_uri)
inherited

Get all values of a custom annotation property by its URI.

Parameters
property_uriThe URI for the property
Returns
A vector of property values or SBOL_ERROR_NOT_FOUND

◆ getTypeURI()

rdf_type getTypeURI ( )
virtualinherited
Returns
The uniform resource identifier that describes the RDF-type of this SBOL Object

◆ register_extension_class()

void register_extension_class ( std::string  ns,
std::string  ns_prefix,
std::string  class_name 
)
protectedinherited

Register an extension class and its namespace, so custom data can be embedded into and read from SBOL files.

Template Parameters
ExtensionClassThe new class
Parameters
nsThe extension namespace, eg, http://myhome.org/my_extension#. It's important that the namespace ends in a forward-slash or hash
ns_prefixA shorthand symbol for the full namespace as it will appear in the output file, eg, my_extension

◆ setAnnotation()

void setAnnotation ( std::string  property_uri,
std::string  val 
)
inherited

Set the value for a user-defined annotation property.

Synonymous with setPropertyValue If the value is a URI, it should be surrounded by angle brackets, else it will be interpreted as a literal value

◆ setPropertyValue()

void setPropertyValue ( std::string  property_uri,
std::string  val 
)
inherited

Set and overwrite the value for a user-defined annotation property.

Either a literal or URI value

Member Data Documentation

◆ access

URIProperty access
inherited

The access property is a REQUIRED URI that indicates whether the ComponentInstance can be referred to remotely by a MapsTo.

The value of the access property MUST be one of the following URIs.

Access URI Description
http://sbols.org/v2#public The ComponentInstance MAY be referred to by remote MapsTo objects
http://sbols.org/v2#private The ComponentInstance MAY be referred to by remote MapsTo objects

◆ definition

ReferencedObject definition
inherited

The definition property is a REQUIRED URI that refers to the ComponentDefinition of the ComponentInstance.

As described in the previous section, this ComponentDefinition effectively provides information about the types and roles of the ComponentInstance. The definition property MUST NOT refer to the same ComponentDefinition as the one that contains the ComponentInstance. Furthermore, ComponentInstance objects MUST NOT form a cyclical chain of references via their definition properties and the ComponentDefinition objects that contain them. For example, consider the ComponentInstance objects A and B and the ComponentDefinition objects X and Y . The reference chain “X contains A, A isdefinedby Y, Y contains B, and B isdefinedby X” iscyclical.

◆ roleIntegration

URIProperty roleIntegration

A roleIntegration specifies the relationship between a Component instance’s own set of roles and the set of roles on the included sub-ComponentDefinition.

The roleIntegration property has a data type of URI. A Component instance with zero roles MAY OPTIONALLY specify a roleIntegration. A Component instance with one or more roles MUST specify a roleIntegration from the table below If zero Component roles are given and no Component roleIntegration is given, then http://sbols.org/v2#mergeRoles is assumed. It is RECOMMENDED to specify a set of Component roles only if the integrated result set of roles would differ from the set of roles belonging to this Component’s included sub-ComponentDefinition.

roleIntegration URI Description
http://sbols.org/v2#overrideRoles In the context of this Component, ignore any roles given for the included sub-ComponentDefinition.
Instead use only the set of zero or more roles given for this Component.
http://sbols.org/v2#mergeRoles Use the union of the two sets: both the set of zero or more roles given for this Component as well
as the set of zero or more roles given for the included sub-ComponentDefinition.

◆ roles

URIProperty roles

The expected purpose and function of a genetic part are described by the roles property of ComponentDefinition.

However, the same building block might be used for a different purpose in an actual design. In other words, purpose and function are sometimes determined by context. The roles property comprises an OPTIONAL set of zero or more role URIs describing the purpose or potential function of this Component’s included sub-ComponentDefinition in the context of its parent ComponentDefinition. If provided, these role URIs MUST identify terms from appropriate ontologies. Roles are not restricted to describing biological function; they may annotate a Component’s function in any domain for which an ontology exists. It is RECOMMENDED that these role URIs identify terms that are compatible with the type properties of both this Component’s parent ComponentDefinition and its included sub-ComponentDefinition. For example, a role of a Component which belongs to a ComponentDefinition of type DNA and includes a sub-ComponentDefinition of type DNA might refer to terms from the Sequence Ontology. See documentation for ComponentDefinition for a table of recommended ontology terms for roles.


The documentation for this class was generated from the following file:

Inherits ComponentInstance.