sbol3.om_unit ============= .. py:module:: sbol3.om_unit Classes ------- .. autoapisummary:: sbol3.om_unit.Measure sbol3.om_unit.PrefixedUnit sbol3.om_unit.SingularUnit sbol3.om_unit.Unit Functions --------- .. autoapisummary:: sbol3.om_unit.build_measure sbol3.om_unit.build_prefixed_unit sbol3.om_unit.build_singular_unit Module Contents --------------- .. py:class:: Measure(value: float, unit: str, *, types: Optional[str, list[str]] = None, name: str = None, description: str = None, derived_from: sbol3.typing.List[str] = None, generated_by: sbol3.typing.List[str] = None, measures: sbol3.typing.List[SBOLObject] = None, identity: str = None, type_uri: str = OM_MEASURE) Bases: :py:obj:`CustomIdentified` The purpose of the om:Measure class is to link a numerical value to a om:Unit. .. py:method:: accept(visitor: Any) -> Any Invokes `visit_measure` on `visitor` with `self` as the only argument. :param visitor: The visitor instance :type visitor: Any :raises AttributeError: If visitor lacks a visit_measure method :return: Whatever `visitor.visit_measure` returns :rtype: Any .. py:attribute:: types :type: sbol3.typing.uri_list .. py:attribute:: unit :type: sbol3.typing.uri_singleton .. py:attribute:: value .. py:class:: PrefixedUnit(identity: str, symbol: str, label: str, unit: sbol3.typing.Union[Unit, str], prefix: sbol3.typing.Union[sbol3.om_prefix.Prefix, str], *, alternative_symbols: sbol3.typing.List[str] = None, alternative_labels: sbol3.typing.List[str] = None, comment: str = None, long_comment: str = None, namespace: str = None, attachments: sbol3.typing.List[str] = None, name: str = None, description: str = None, derived_from: sbol3.typing.List[str] = None, generated_by: sbol3.typing.List[str] = None, measures: sbol3.typing.List[SBOLObject] = None, type_uri: str = OM_PREFIXED_UNIT) Bases: :py:obj:`Unit` The purpose of the om:PrefixedUnit class is to describe a unit of measure that is the multiplication of another unit of measure and a factor represented by a standard prefix such as “milli,” “centi,” “kilo,” etc. .. py:method:: accept(visitor: Any) -> Any Invokes `visit_prefixed_unit` on `visitor` with `self` as the only argument. :param visitor: The visitor instance :type visitor: Any :raises AttributeError: If visitor lacks a visit_prefixed_unit method :return: Whatever `visitor.visit_prefixed_unit` returns :rtype: Any .. py:attribute:: prefix .. py:attribute:: unit .. py:class:: SingularUnit(identity: str, symbol: str, label: str, *, unit: str = None, factor: float = None, alternative_symbols: sbol3.typing.List[str] = None, alternative_labels: sbol3.typing.List[str] = None, comment: str = None, long_comment: str = None, namespace: str = None, attachments: sbol3.typing.List[str] = None, name: str = None, description: str = None, derived_from: sbol3.typing.List[str] = None, generated_by: sbol3.typing.List[str] = None, measures: sbol3.typing.List[SBOLObject] = None, type_uri: str = OM_SINGULAR_UNIT) Bases: :py:obj:`Unit` The purpose of the om:SingularUnit class is to describe a unit of measure that is not explicitly represented as a combination of multiple units, but could be equivalent to such a representation. For example, a joule is considered to be a om:SingularUnit, but it is equivalent to the multiplication of a newton and a meter. .. py:method:: accept(visitor: Any) -> Any Invokes `visit_singular_unit` on `visitor` with `self` as the only argument. :param visitor: The visitor instance :type visitor: Any :raises AttributeError: If visitor lacks a visit_singular_unit method :return: Whatever `visitor.visit_singular_unit` returns :rtype: Any .. py:attribute:: factor .. py:attribute:: unit .. py:class:: Unit(identity: str, symbol: str, label: str, type_uri: str, *, alternative_symbols: sbol3.typing.List[str] = None, alternative_labels: sbol3.typing.List[str] = None, comment: str = None, long_comment: str = None, namespace: str = None, attachments: sbol3.typing.List[str] = None, name: str = None, description: str = None, derived_from: sbol3.typing.List[str] = None, generated_by: sbol3.typing.List[str] = None, measures: sbol3.typing.List[SBOLObject] = None) Bases: :py:obj:`CustomTopLevel`, :py:obj:`abc.ABC` As adopted by SBOL, om:Unit is an abstract class that is extended by other classes to describe units of measure using a shared set of properties. See Appendix A Section A.2 of the SBOL 3.0 specificiation. .. py:attribute:: alternative_labels .. py:attribute:: alternative_symbols .. py:attribute:: comment .. py:attribute:: label .. py:attribute:: long_comment .. py:attribute:: symbol .. py:function:: build_measure(identity: str, *, type_uri: str = OM_MEASURE) -> SBOLObject .. py:function:: build_prefixed_unit(identity: str, *, type_uri: str = OM_PREFIXED_UNIT) -> SBOLObject .. py:function:: build_singular_unit(identity: str, *, type_uri: str = OM_SINGULAR_UNIT) -> SBOLObject