SingularAnnotation

class SingularAnnotation : public semsim::AnnotationBase, public semsim::EntityBase

The singular / “plain” annotation class is designed to represent traditional MIRIAM annotations found in SBML models. These types of annotations are not as expressive as CompositeAnnotations and can only point to one or more Resources which define the entity. Overusing definition URIs is generally bad practice and, ideally, one should use a single definition URI that best captures the model element.

Public Functions

SingularAnnotation(const std::string &metaid, const Resource &definition)

Construct a SingularAnnotation given a definition URL. For example, to create an annotation describing pyruvate:

# include "semsim/SemSim.h"
using namespace semsim;
// will automatically get assigned a "bqb:is" relation
// pointing to CHEBI:15361
SingularAnnotation a("metaid", CHEBI::get(15361));

Generally, a model element should be defined using only a single URI.

SingularAnnotation(const std::string &metaid)

Constructor specifying only the meta id (defintions to be added later by user)

SingularAnnotation(const SingularAnnotation &other)

Copy constructor.

const std::string &getMetaId() const

Get the meta id for this element.

virtual AnnotationBase *clone() const

Create a copy of this object using the correct derived class’s type.

void serializeToRDF(const URI &sbml_base_uri, raptor_world *world, raptor_serializer *serializer) const

Serialize this annotation to RDF using the Raptor library. This function just delegates to the EntityBase serialization logic. The RDF serialization format is chosen when initializing the raptor_serializer, and must be done before calling this function.

Return

the URI for this entity.

Parameters
  • sbml_base_uri: The base URI of the SBML document relative to this (e.g. a relative path in a COMBINE archive).

  • world: Raptor world object. Must be initialized prior to calling this function.

  • serializer: Raptor serializer object. Must be initialized prior to calling this function.

AnnotationPtr makeComposite(const PhysicalProperty &prop) const

Convert singular annotations to composite annotations by copying their definitions and terms.

Return

A new composite annotation

Parameters
  • prop: The physical property to assign to the composite annotation.

URI getURI(const URI &base) const

Get the local URI of this entity.

std::string humanize() const

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