Resource

class Resource

A Resource is an ontology term ( the “object” part of an RDF triple). This is an external resource. Example:

// identifies the cytosolic compartment of a cell
Resource myresource("https://identifiers.org/GO:0005829");

A Resource can also point to an element of the Model (an internal resource, useful in CompositeAnnotations), in which case its definition URI will be whatever the element’s URI is at the time of serialization.

Public Functions

Resource(const URI &uri)

Construct from URI.

Parameters
  • uri: The URI of the resource

Resource(Component *element)

Construct from URI.

Parameters
  • uri: The URI of the resource

std::string toString() const

Construct directly from the UTF-8 string-encoded URI.

Parameters
  • uri: The UTF-8 string-encoded URI of the resource

URI getURI(const URI &base = URI()) const

Get a string representing the (possibly local) URI for this resource.

Return

The URI for this resource.

Parameters
  • base: If this resource points to a local Component, this parameter should be the relative path of the SBML document. Otherwise, the default value should be used.

bool isLocal() const

Return

true if this resource points to a local Component (as opposed to an external URI).

std::string humanize() const

Return a humanreadable representation of the annotation information. Ontology terms will be replaced with human-readable names.