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:`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. .. 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, 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, Identified]) -> Callable[[Identified], None] .. py:function:: make_update_references_traverser(identity_map: Dict[str, Identified]) -> Callable[[Identified], None]