sbol3.toplevel
Classes
TopLevel is an abstract class that is extended by any Identified |
Functions
Module Contents
- class TopLevel(identity: str, type_uri: str, *, namespace: str | None = None, attachments: sbol3.typing.refobj_list_arg | None = None, name: str | None = None, description: str | None = None, derived_from: sbol3.typing.Union[str, Sequence[str]] | None = None, generated_by: sbol3.typing.refobj_list_arg | None = None, measures: sbol3.typing.ownedobj_list_arg | None = None)
Bases:
sbol3.IdentifiedTopLevel 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.
- Parameters:
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.
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.
name – A human-readable name for this object, for display purposes.
description – Per the SBOL 3.0.1 specification, “a more thorough text description” of this object.
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.
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.
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
- attachments
- copy(target_doc=None, target_namespace=None)
- static default_namespace(namespace: sbol3.typing.Union[None, str], identity: str) str
- namespace
- remove_from_document()
- 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.
- Parameters:
new_identity – the new identity
- Returns:
Nothing
- split_identity() tuple[str, str, str]
Split this object’s identity into three components: namespace, path, and display_id.
- Returns:
A tuple of namespace, path, and display_id
- 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!
- Parameters:
identity_map – map of identity to Identified
- Returns:
Nothing
- validate(report: ValidationReport = None) ValidationReport
- validate_identity(report: ValidationReport) None
- make_erase_identity_traverser(identity_map: Dict[str, sbol3.Identified]) Callable[[sbol3.Identified], None]
- make_update_references_traverser(identity_map: Dict[str, sbol3.Identified]) Callable[[sbol3.Identified], None]