sbol3.toplevel ============== .. py:module:: sbol3.toplevel Classes ------- .. autoapisummary:: sbol3.toplevel.TopLevel Functions --------- .. autoapisummary:: sbol3.toplevel.make_erase_identity_traverser sbol3.toplevel.make_update_references_traverser Module Contents --------------- .. py:class:: TopLevel(identity: str, type_uri: str, *, namespace: Optional[str] = None, attachments: Optional[sbol3.typing.refobj_list_arg] = None, name: Optional[str] = None, description: Optional[str] = None, derived_from: Optional[sbol3.typing.Union[str, Sequence[str]]] = None, generated_by: Optional[sbol3.typing.refobj_list_arg] = None, measures: Optional[sbol3.typing.ownedobj_list_arg] = None) Bases: :py:obj:`sbol3.Identified` TopLevel is an abstract class that is extended by any Identified class that can be found at the top level of an SBOL document or file. In other words, TopLevel objects are not nested inside any other object via composite aggregation. Instead of nesting, composite TopLevel objects refer to subordinate TopLevel objects by their URIs using shared aggregation. :param identity: this object's Uniform Resource Identifier (URI). this URI MUST be globally unique among all other Identified object URIs. See SBOL 3.0.1 specification section 5.1. This can also be a `displayId`, which will be concatenated to a default namespace automatically. :param type_uri: the concrete type of this object, specified as a URI. These are typically in the SBOL3 namespace, like `http://sbols.org/v3#Sequence` or `http://sbols.org/v3#Component`. This can also be the type URI of an extension class. :param name: A human-readable name for this object, for display purposes. :param description: Per the SBOL 3.0.1 specification, "a more thorough text description" of this object. :param derived_from: The URIs of one or more SBOL or non-SBOL objects from which this object was derived. This property is defined by the PROV-O ontology. :param generated_by: The URIs of one or more prov:Activity objects that describe how this object was generated. This property is defined by the PROV-O ontology. :param measures: The URIs of one or more om:Measure objects, each of which refers to a om:Measure object that describes measured parameters for this object. om:Measure objects are defined by the OM ontology .. py:attribute:: attachments .. py:method:: clone(new_identity: str = None) -> TopLevel .. py:method:: copy(target_doc=None, target_namespace=None) .. py:method:: default_namespace(namespace: sbol3.typing.Union[None, str], identity: str) -> str :staticmethod: .. py:attribute:: namespace .. py:method:: remove_from_document() .. py:method:: set_identity(new_identity: str) -> Any Sets the identity of the object. USE WITH EXTREME CAUTION! This method can break a tree of objects, and invalid a document. Only use this method if you understand the ramifications of changing the identity of a top level object. :param new_identity: the new identity :return: Nothing .. py:method:: split_identity() -> tuple[str, str, str] Split this object's identity into three components: namespace, path, and display_id. :return: A tuple of namespace, path, and display_id .. py:method:: update_all_dependents(identity_map: dict[str, sbol3.Identified]) -> Any Update all dependent objects based on the provided identity map. Dependent objects are reparented and references are updated according to the identities and objects in `identity_map`. USE WITH CAUTION! :param identity_map: map of identity to Identified :return: Nothing .. py:method:: validate(report: ValidationReport = None) -> ValidationReport .. py:method:: validate_identity(report: ValidationReport) -> None .. py:function:: make_erase_identity_traverser(identity_map: Dict[str, sbol3.Identified]) -> Callable[[sbol3.Identified], None] .. py:function:: make_update_references_traverser(identity_map: Dict[str, sbol3.Identified]) -> Callable[[sbol3.Identified], None]