PhysicalProcess
-
class omexmeta::PhysicalProcess : public omexmeta::PropertyBearer
Public Functions
-
PhysicalProcess() = delete
default constructor for PhysicalProcess
deliberately deleted. If you try using the builder interface (chaining setter methods) from a default instantiated PhysicalProcess you will get an error, because there will be no model associated with PhysicalProcess. Instead, always instantiate a PhysicalProcess from the Editor::addPhysicalProcess() method.
-
~PhysicalProcess() = default
-
PhysicalProcess(LibrdfModel &model, UriHandler &uriHandler, const PhysicalProperty &physicalProperty, Sources sources, Sinks sinks, Mediators mediators)
Constructor for PhysicalProcess object. Subclass of PhysicalPhenomenon.
- Parameters
model – a librdf_model pointer for current rdf graph.
physicalProperty – the physical property for the PhysicalProcess
sources – a vector of Source objects representing the energetic sources for the PhysicalProcess
sinks – a vector of Sink objects representing the energetic sinks for the PhysicalProcess
mediator – a vector of Sink objects representing the energetic modulators for the PhysicalProcess
-
void free()
free the node resources used by PhysicalProcess.
When the toTriples() method is used, ownership of the nodes associated with PhysicalProcess are transferred to the resulting Triples object, which destroys them automatically at the right time. If user does not use the toTriples method, then resources used by PhysicalProcess must be freed manually with this method.
-
explicit PhysicalProcess(LibrdfModel &model, UriHandler &uriHandler)
constructor for the builder interface of PhysicalProcess instantiation
- Parameters
model – the currently active RDF model.
model_uri – the local uri in current use.
-
const Sources &getSources() const
getter for sources
- Returns
a vector of SourceParticipant objects
-
const Sinks &getSinks() const
getter for sinks
- Returns
a vector of SinkParticipant objects
-
const Mediators &getMediators() const
getter for mediators
- Returns
a vector of MediatorParticipant objects
-
virtual Triples toTriples() override
convert a PhysicalProcess into a set of Triples
When used, the ownership of nodes in PhysicalProcess are pass to the Triples object, which automatically destroys them when appropriate. Otherwise the caller is responsible for freeing resources.
- Returns
A Triples object containing the set of Triple objects that represent this PhysicalProcess
-
PhysicalProcess &addSource(std::string physical_entity_reference, eUriType type, double multiplier = 1.0)
add a source to the list of Source object associated with a PhysicalProcess
- Returns
a reference to this PhysicalProcess to enable chaining setter commands
-
PhysicalProcess &addSink(std::string physical_entity_reference, eUriType type, double multiplier = 1.0)
add a sink to the list of Source object associated with a PhysicalProcess
- Returns
a reference to this PhysicalProcess to enable chaining setter commands
-
PhysicalProcess &addMediator(std::string physical_entity_reference, eUriType type)
add a mediator to the list of Source object associated with a PhysicalProcess
- Returns
a reference to this PhysicalProcess to enable chaining setter commands
-
int getNumSources()
returns the number of sources assocaited with the PhysicalProcess
- Returns
the number of Source objects associated with this PhysicalProcess
-
int getNumSinks()
returns the number of sinks assocaited with the PhysicalProcess
- Returns
the number of Sink objects associated with this PhysicalProcess
-
int getNumMediators()
returns the number of mediators assocaited with the PhysicalProcess
- Returns
the number of Mediator objects associated with this PhysicalProcess
-
bool operator==(const PhysicalProcess &rhs) const
-
bool operator!=(const PhysicalProcess &rhs) const
-
virtual PhysicalProcess &about(const std::string &about, eUriType type) override
set the subject (rdf:about) portion of the PhysicalProcess composite annotation
This method will set the LibrdfNode subject_ attribute of the PhysicalProperty associated with the PhysicalProcess.
- Parameters
about – the string to be used as the LibrdfNode portion of the isVersionOf Triple. This should be an existing metaid on the model you are annotating. Will error when metaid does not exist.
-
virtual PhysicalProcess &about(const std::string &about) override
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.
-
virtual const std::string &getPropertyMetaidBase() const override
-
PhysicalProcess &isVersionOf(const std::string &is_version_of, eUriType type = NONE)
-
virtual PhysicalProcess &hasProperty(const PhysicalProperty &property) override
-
virtual PhysicalProcess &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) override
-
virtual PhysicalProcess &hasProperty(const std::string &is_version_of) override
-
virtual PhysicalProcess &hasProperty(const std::string &property_about, eUriType about_uri_type, const std::string &is_version_of) override
-
PhysicalProcess() = delete