libSBOL  2.3.3
Classes | Public Member Functions | List of all members
Property< LiteralType > Class Template Reference

Detailed Description

template<class LiteralType>
class sbol::Property< LiteralType >

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.

Template Parameters
TheSBOL 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.
 

Constructor & Destructor Documentation

◆ Property()

Property ( void *  property_owner,
rdf_type  type_uri,
char  lower_bound,
char  upper_bound,
ValidationRules  validation_rules,
std::string  initial_value 
)
Parameters
type_uriAn 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_ownerAll Property objects must have a pointer back to its parent SBOLObject of which it is a member
initial_valueThe initial value of the Property
validation_rulesA 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.

Member Function Documentation

◆ add()

void add ( std::string  new_value)

Appends the new value to a list of values, for properties that allow it.

Parameters
new_valueA new string which will be added to a list of values.

◆ operator[]()

std::string operator[] ( const int  nIndex)

Retrieve the indexed value in a list container.

Parameters
nIndexA numerical index

◆ set() [1/3]

void set ( std::string  new_value)
virtual

Basic setter for SBOL TextProperty and URIProperty.

Parameters
new_valueA new string value for the Property.

Reimplemented in ReferencedObject.

◆ set() [2/3]

void set ( int  new_value)
virtual

Basic setter for SBOL IntProperty, but can be used with TextProperty as well.

Parameters
new_valueA new integer value for the property, which is converted to a raw string during serialization.

◆ set() [3/3]

void set ( double  new_value)
virtual

Basic setter for SBOL IntProperty, but can be used with TextProperty as well.

Parameters
new_valueA new integer value for the property, which is converted to a raw string during serialization.

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