PropertyBearer

class omexmeta::PropertyBearer

Subclassed by omexmeta::EnergyDiff, omexmeta::PhysicalEntity, omexmeta::PhysicalProcess

Public Functions

eUriType getAboutUriType() const
void setAboutUriType(eUriType aboutUriType)
virtual const std::string &getPropertyMetaidBase() const
PropertyBearer() = default
bool operator==(const PropertyBearer &rhs) const
bool operator!=(const PropertyBearer &rhs) const
~PropertyBearer()
const std::string &getLocalUri() const
PropertyBearer(const PropertyBearer &propertyBearer) = delete

Copy constructor for PropertyBearer.

PropertyBearer(PropertyBearer &&propertyBearer) noexcept

Move constructor for PropertyBearer.

PropertyBearer &operator=(const PropertyBearer &propertyBearer) = delete

assignment operator for PropertyBearer

PropertyBearer &operator=(PropertyBearer &&propertyBearer) noexcept

move assignment operator for PropertyBearer

PropertyBearer(LibrdfModel &model, UriHandler &uriHandler)

Constructor for builder interface.

Shouldn’t be needed by users directly.

PropertyBearer(LibrdfModel &model, UriHandler &uriHandler, PhysicalProperty propertyResource, AnnotationType type)

constructor for PropertyBearer object.

Parameters
  • model – a librdf_model object assicated with RDF graph.

  • about – The subject for the PropertyBearer. This is the metaid.

  • propertyResource – The PhysicalProperty assocaited with a composite annotation

  • type – An AnnotationType to distinguish composite annotations.

const std::string &getModelUri() const
const std::string &getPropertyAbout() const

get the subject portion of the PropertyBearer

Returns

the string associated with the subject node

AnnotationType getType() const

getter for Type argument

Returns

the AnnotationType currently used (PhysicalEntity, EnergyDiff or PhysicalProcess)

PhysicalProperty getPhysicalProperty() const

getter for PhysicalProperty argument

Returns

the resource representing the physical property being annotated

virtual Triples toTriples()

create a Triples object using the information contained in the PropertyBearer. Overridden by subclasses.

Refer to subclasses for more documentation.

Returns

Triples object containing the individual Triple objects representing the PropertyBearer

OMEXMETA_DEPRECATED void setPhysicalProperty (const PhysicalProperty &physicalProperty)
OMEXMETA_DEPRECATED void setType (AnnotationType type)
LibrdfModel &getModel() const
virtual PropertyBearer &hasProperty(const PhysicalProperty &property)
virtual OMEXMETA_DEPRECATED PropertyBearer & hasProperty (const std::string &property_about, eUriType about_uri_type, const std::string &is_version_of, const std::string &is_property_of, eUriType is_property_of_uri_type)
virtual PropertyBearer &hasProperty(const std::string &is_version_of)
virtual PropertyBearer &hasProperty(const std::string &property_about, eUriType about_uri_type, const std::string &is_version_of)
virtual PropertyBearer &about(const std::string &about, eUriType type)
virtual PropertyBearer &about(const std::string &about)

Since we can’t have default arguments on a virutal member function we instead have an overload where the absent eUriType parameter is assumed to be the default value of NONE. Note, it may be prudent to figure out which of LOCAL or MODEL uri would be a better default.

const std::string &getAbout() const

Protected Functions

std::vector<std::string> getNewMetaidExclusionList()

getter for a vector of strings that keeps track of used metaids.

this mechanism is necessary in order to ensure unique metaids in the case of adding multiple instances of a type to the PropertyBearer before commiting to the model. For instance, you can have arbitrary sink participants, which would all be given the SinkParticipant0000 metaid if not for this mechanism.

std::string generateMetaId(const std::string &id_base)

Protected Attributes

LibrdfModel &model_
PhysicalProperty physical_property_
AnnotationType type_ = AnnotationType::UNKNOWN
std::vector<std::string> new_metaid_exclusion_list_
std::string property_metaid_base_
std::string about_value_
eUriType about_uri_type_ = NONE
UriHandler &uriHandler_