libSBOL
2.3.3
|
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a low level, the Property class converts SBOL data structures into RDF triples.
The | SBOL specification currently supports string, URI, and integer literal values. |
Classes | |
class | iterator |
Provides iterator functionality for SBOL properties that contain multiple values. More... | |
Public Member Functions | |
Property (void *property_owner, rdf_type type_uri, char lower_bound, char upper_bound, ValidationRules validation_rules, std::string initial_value) | |
virtual void | set (std::string new_value) |
Basic setter for SBOL TextProperty and URIProperty. More... | |
virtual void | set (int new_value) |
Basic setter for SBOL IntProperty, but can be used with TextProperty as well. More... | |
virtual void | set (double new_value) |
Basic setter for SBOL IntProperty, but can be used with TextProperty as well. More... | |
void | add (std::string new_value) |
Appends the new value to a list of values, for properties that allow it. More... | |
virtual void | remove (int index=0) |
Remove a property value. | |
virtual void | clear () |
Clear all property values. | |
virtual bool | find (std::string query) |
Check if a value in this property matches the query. | |
std::string | operator[] (const int nIndex) |
Retrieve the indexed value in a list container. More... | |
void | copy (Property< LiteralType > &target_property) |
Copy property values to a target object's property fields. | |
Property | ( | void * | property_owner, |
rdf_type | type_uri, | ||
char | lower_bound, | ||
char | upper_bound, | ||
ValidationRules | validation_rules, | ||
std::string | initial_value | ||
) |
type_uri | An RDF hash URI for this property, consisting of a namespace followed by an identifier. For example, Properties of SBOLObjects use URIs of the form http://sbols.org/v2#somePropertyName, where the identifier somePropertyName determines the appearance of XML nodes in an SBOL file. Alternatively, annotations in a custom namespace can be provided using a similarly formed hash URI in another namespace. |
property_owner | All Property objects must have a pointer back to its parent SBOLObject of which it is a member |
initial_value | The initial value of the Property |
validation_rules | A vector of externally defined ValidationRules. The vector contains pointers to functions which correspond to the validation rules listed in the appendix of the formal SBOL specification document. ValidationRules are automatically checked every time a setter or adder method is called and when Documents are read and written. |
void add | ( | std::string | new_value | ) |
Appends the new value to a list of values, for properties that allow it.
new_value | A new string which will be added to a list of values. |
std::string operator[] | ( | const int | nIndex | ) |
Retrieve the indexed value in a list container.
nIndex | A numerical index |
|
virtual |
Basic setter for SBOL TextProperty and URIProperty.
new_value | A new string value for the Property. |
Reimplemented in ReferencedObject.
|
virtual |
Basic setter for SBOL IntProperty, but can be used with TextProperty as well.
new_value | A new integer value for the property, which is converted to a raw string during serialization. |
|
virtual |
Basic setter for SBOL IntProperty, but can be used with TextProperty as well.
new_value | A new integer value for the property, which is converted to a raw string during serialization. |