_PropertyBearer

class pyomexmeta._PropertyBearer(name: str, obj: ctypes.c_longlong)

Abstraction layer for Composite annotation classes. All composite annotations are PropertyBearers so we abstract and shared code among them.

This class is private

has_property(property_about: Optional[str] = None, about_uri_type: Optional[pyomexmeta.pyomexmeta_api.eUriType] = None, is_version_of: Optional[str] = None, property: Optional[pyomexmeta.pyomexmeta.PhysicalProperty] = None)pyomexmeta.pyomexmeta._PropertyBearer

Create a PhysicalProperty associated with a PhysicalEntity, EnergyDiff or PhysicalProcess.

This method has 3 signatures in the underlying C++ library. This method unpacks the user supplied arguments and passes them to the correct signature, depending on what is supplied.

The first signature is used with sbml models and requires only the is_version_of arument. This is commonly used for annotating sbml models and therefore, when only one string argument is passed to has_property() the argument is used for the is_version_of argument (see example below).

Parameters

is_version_of – (str) represents an OPB term from the Ontology of Physical Biology.

In the above case, the necessary local identifiers are created automatically and are guarenteed to be unique throughout your RDF graph. In some circumstances, you might want to have control over the metaids used for local uri’s. The above would create a PhysicalProperty with the subject or “about” portion equal to local:EntityProperty0000. We can set this ourselves using the second overload, which requires three arguments:

Parameters
  • property_about – The subject or “about” portion of the PhysicalProperty triples.

  • eUriType.LOCAL_URI if the uri for property_about should be local to the (about_uri_type) – annotation (rdf) graph or eUriType.MODEL_URI if it instead points to a element of the model (which is common in CellML).

  • The OPB term to use for the "isVersionOf" predicate (is_version_of) –

Finally, you can create the Property yourself and pass that to has_property() instead. This is often more useful in CellML models.