sbol3.provenance ================ .. py:module:: sbol3.provenance Classes ------- .. autoapisummary:: sbol3.provenance.Activity sbol3.provenance.Agent sbol3.provenance.Association sbol3.provenance.Plan sbol3.provenance.Usage Functions --------- .. autoapisummary:: sbol3.provenance.build_association sbol3.provenance.build_usage Module Contents --------------- .. py:class:: Activity(identity: str, *, types: Optional[str, list[str]] = None, start_time: Union[str, datetime.datetime] = None, end_time: Union[str, datetime.datetime] = None, usage: List[sbol3.identified.Identified] = None, association: List[sbol3.identified.Identified] = None, informed_by: List[sbol3.identified.Identified] = None, namespace: str = None, attachments: List[str] = None, name: str = None, description: str = None, derived_from: List[str] = None, generated_by: List[str] = None, measures: List[sbol3.object.SBOLObject] = None, type_uri: str = PROV_ACTIVITY) Bases: :py:obj:`sbol3.custom.CustomTopLevel` A generated prov:Entity is linked through a prov:wasGeneratedBy relationship to an prov:Activity, which is used to describe how different prov:Agents and other entities were used. An prov:Activity is linked through a prov:qualifiedAssociation to prov:Associations, to describe the role of agents, and is linked through prov:qualifiedUsage to prov:Usages to describe the role of other entities used as part of the activity. Moreover, each prov:Activity includes optional prov:startedAtTime and prov:endedAtTime properties. When using prov:Activity to capture how an entity was derived, it is expected that any additional information needed will be attached as annotations. This may include software settings or textual notes. Activities can also be linked together using the prov:wasInformedBy relationship to provide dependency without explicitly specifying start and end times. .. py:method:: accept(visitor: Any) -> Any Invokes `visit_activity` on `visitor` with `self` as the only argument. :param visitor: The visitor instance :type visitor: Any :raises AttributeError: If visitor lacks a visit_activity method :return: Whatever `visitor.visit_activity` returns :rtype: Any .. py:attribute:: association .. py:attribute:: end_time .. py:attribute:: informed_by .. py:attribute:: start_time .. py:attribute:: types :type: sbol3.typing.uri_list .. py:attribute:: usage .. py:class:: Agent(identity: str, *, namespace: str = None, attachments: List[str] = None, name: str = None, description: str = None, derived_from: List[str] = None, generated_by: List[str] = None, measures: List[sbol3.object.SBOLObject] = None, type_uri: str = PROV_AGENT) Bases: :py:obj:`sbol3.custom.CustomTopLevel` Examples of agents are a person, organization, or software tool. These agents should be annotated with additional information, such as software version, needed to be able to run the same prov:Activity again. .. py:method:: accept(visitor: Any) -> Any Invokes `visit_agent` on `visitor` with `self` as the only argument. :param visitor: The visitor instance :type visitor: Any :raises AttributeError: If visitor lacks a visit_agent method :return: Whatever `visitor.visit_agent` returns :rtype: Any .. py:class:: Association(agent: Union[str, sbol3.identified.Identified], *, roles: Optional[str, list[str]] = None, plan: Union[sbol3.identified.Identified, str] = None, name: str = None, description: str = None, derived_from: List[str] = None, generated_by: List[str] = None, measures: List[sbol3.object.SBOLObject] = None, identity: str = None, type_uri: str = PROV_ASSOCIATION) Bases: :py:obj:`sbol3.custom.CustomIdentified` An prov:Association is linked to an prov:Agent through the prov:agent relationship. The prov:Association includes the prov:hadRole property to qualify the role of the prov:Agent in the prov:Activity. .. py:method:: accept(visitor: Any) -> Any Invokes `visit_association` on `visitor` with `self` as the only argument. :param visitor: The visitor instance :type visitor: Any :raises AttributeError: If visitor lacks a visit_association method :return: Whatever `visitor.visit_association` returns :rtype: Any .. py:attribute:: agent .. py:attribute:: plan .. py:attribute:: roles :type: sbol3.typing.uri_list .. py:class:: Plan(identity: str, *, namespace: str = None, attachments: List[str] = None, name: str = None, description: str = None, derived_from: List[str] = None, generated_by: List[str] = None, measures: List[sbol3.object.SBOLObject] = None, type_uri: str = PROV_PLAN) Bases: :py:obj:`sbol3.custom.CustomTopLevel` The prov:Plan entity can be used as a place holder to describe the steps (for example scripts or lab protocols) taken when an prov:Agent is used in a particular prov:Activity. .. py:method:: accept(visitor: Any) -> Any Invokes `visit_plan` on `visitor` with `self` as the only argument. :param visitor: The visitor instance :type visitor: Any :raises AttributeError: If visitor lacks a visit_plan method :return: Whatever `visitor.visit_plan` returns :rtype: Any .. py:class:: Usage(entity: str, *, roles: Optional[str, list[str]] = None, name: str = None, description: str = None, derived_from: List[str] = None, generated_by: List[str] = None, measures: List[sbol3.object.SBOLObject] = None, identity: str = None, type_uri: str = PROV_USAGE) Bases: :py:obj:`sbol3.custom.CustomIdentified` How different entities are used in an prov:Activity is specified with the prov:Usage class, which is linked from an prov:Activity through the prov:Usage relationship. A prov:Usage is then linked to an prov:Entity through the prov:entity property URI and the prov:hadRole property species how the prov:Entity is used. When the prov:wasDerivedFrom property is used together with the full provenance described here, the entity pointed at by the prov:wasDerivedFrom property MUST be included in a prov:Usage. .. py:method:: accept(visitor: Any) -> Any Invokes `visit_usage` on `visitor` with `self` as the only argument. :param visitor: The visitor instance :type visitor: Any :raises AttributeError: If visitor lacks a visit_usage method :return: Whatever `visitor.visit_usage` returns :rtype: Any .. py:attribute:: entity :type: sbol3.typing.uri_singleton .. py:attribute:: roles :type: sbol3.typing.uri_list .. py:function:: build_association(identity: str, *, type_uri: str = PROV_USAGE) -> sbol3.object.SBOLObject .. py:function:: build_usage(identity: str, *, type_uri: str = PROV_USAGE) -> sbol3.object.SBOLObject