sbol3.identified
¶
Module Contents¶
Classes¶
All SBOL-defined classes are directly or indirectly derived from |
Functions¶
|
Determine the display ID for an object with the given identity. |
|
Determine if a given display ID is valid according to the SBOL specification. |
- class Identified(identity: str, type_uri: str, *, name: Optional[str] = None, description: Optional[str] = None, derived_from: Optional[Union[str, Sequence[str]]] = None, generated_by: Optional[refobj_list_arg] = None, measures: Optional[ownedobj_list_arg] = None)¶
Bases:
sbol3.SBOLObject
All SBOL-defined classes are directly or indirectly derived from the Identified abstract class. This inheritance means that all SBOL objects are uniquely identified using URIs that uniquely refer to these objects within an SBOL document or at locations on the World Wide Web.
- 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
- property display_id¶
- property display_name¶
- property document: Union[sbol3.Document, None]¶
- property properties¶
- property type_uri¶
- __str__()¶
- accept(visitor: Any) Any ¶
An abstract method for concrete classes to override. This method is part of the visitor pattern implementation.
- Parameters
visitor – Ignored
- Returns
Unspecified
- Raises
NotImplementedError if not overridden
- clear_property(uri)¶
Clears the internal storage of a property based on the URI. This is for advanced usage only, and may cause inconsistent objects and/or graphs.
USE WITH CARE.
- counter_value(type_name: str) int ¶
- remove_from_document()¶
- serialize(graph: rdflib.Graph)¶
- traverse(func: Callable[[Identified], None])¶
Enable a traversal of this object and all of its children by invoking the passed function on all objects.
- validate(report: sbol3.ValidationReport = None) sbol3.ValidationReport ¶
- extract_display_id(identity: str) Union[None, str] ¶
Determine the display ID for an object with the given identity.
The display ID is the final component of the path of a URL. If the provided identity is not a URL, then no display ID can be determined and None is returned.
- Parameters
identity – An identity for an SBOL object
- Returns
a valid display id or None of no display ID can be extracted
- is_valid_display_id(display_id: str) bool ¶
Determine if a given display ID is valid according to the SBOL specification.
The SBOL3 specification states, “A display id […] value MUST be composed of only alphanumeric or underscore characters and MUST NOT begin with a digit.” (Section 6.1)
- Parameters
display_id – The display ID to check for validity
- Returns
True if the display ID is valid, False otherwise.