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

Detailed Description

A reference to another SBOL object Contains a Uniform Resource Identifier (URI) that refers to an an associated object.

The object it points to may be another resource in this Document or an external reference, for example to an object in an external repository or database. In the SBOL specification, association by reference is indicated in class diagrams by arrows with open (white) diamonds.

Public Member Functions

std::string create (std::string uri)
 Creates a new SBOL object corresponding to the RDF type specified in the Property definition. More...
 
void set (std::string uri)
 Set the property with a URI reference to an object. More...
 
void set (SBOLObject &obj)
 Set the property with a URI reference to an object, overwriting the first value in the property store. More...
 
void add (std::string uri)
 Append a URI reference of an object to the property store. More...
 
void add (SBOLObject &obj)
 Append a URI reference of an object to the property store. More...
 
virtual std::string get ()
 Get first URI. 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...
 
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.
 
void copy (Property< std::string > &target_property)
 Copy property values to a target object's property fields.
 

Protected Attributes

rdf_type reference_type_uri
 The RDF type of objects referenced by this property.
 

Member Function Documentation

◆ add() [1/2]

void add ( std::string  uri)

Append a URI reference of an object to the property store.

Parameters
uriThe full URI of the referenced object, e.g., my_obj.identity.get()

◆ add() [2/2]

void add ( SBOLObject obj)

Append a URI reference of an object to the property store.

Parameters
Thereferenced object

◆ create()

std::string create ( std::string  uri)

Creates a new SBOL object corresponding to the RDF type specified in the Property definition.

Creates another SBOL object derived from TopLevel and adds it to the Document.

Parameters
uriA Uniform Resource Identifier (URI) for the new object, or a displayId if operating in SBOL-compliant mode (library default)
Returns
The full URI of the created object
Parameters
uriIn "open world" mode, this is a full URI and the same as the returned URI. If the default namespace for libSBOL has been configured, then this argument should simply be a local identifier. If SBOL-compliance is enabled, this argument should be the intended displayId of the new object. A full URI is automatically generated and returned.
Returns
The full URI of the created object.

◆ get()

std::string get ( )
virtualinherited

Get first URI.

Returns
A string of characters used to identify a resource

◆ set() [1/4]

void set ( int  new_value)
virtualinherited

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() [2/4]

void set ( double  new_value)
virtualinherited

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/4]

void set ( std::string  uri)
virtual

Set the property with a URI reference to an object.

Parameters
Thefull URI of the referenced object, e.g., my_obj.identity.get()

Reimplemented from Property< std::string >.

◆ set() [4/4]

void set ( SBOLObject obj)

Set the property with a URI reference to an object, overwriting the first value in the property store.

Parameters
Thereferenced object

The documentation for this class was generated from the following files:
Inheritance diagram for ReferencedObject:
Inheritance graph