Node
- class Node(*, id: str, lbl: str | None = None, meta: Meta | None = None, type: typing_extensions.Literal[CLASS, PROPERTY, INDIVIDUAL], reference: Reference | None = None, standardized: bool = False)[source]
Bases:
BaseModel
,StandardizeMixin
Represents a node in an OBO Graph.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Attributes Summary
Get the alernative identifiers for this node.
Get the creator of the node.
Get the creation date of the node.
Get the CURIE string representing this node or error if not normalized.
Get the definition of the node.
Get the provenance CURIEs for the definition.
Get if the node is deprecated.
Get the identifier for the node if it has been standardized.
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
Get the OBO namespace.
Get the prefix for the node if it has been standardized.
Get the properties for this node.
Get the identifier that this node was replaced by.
Get the synonyms for the node.
Get the xrefs for the node.
Methods Summary
Get provenance CURIEs from definition and xrefs.
Parse the identifier into a pair, assuming it's a CURIE.
Ground the node to a standard prefix and luid based on its id (URI).
Attributes Documentation
- alternative_ids
Get the alernative identifiers for this node.
- created_by
Get the creator of the node.
- creation_date
Get the creation date of the node.
- curie
Get the CURIE string representing this node or error if not normalized.
- definition
Get the definition of the node.
- definition_provenance
Get the provenance CURIEs for the definition.
- deprecated
Get if the node is deprecated.
- identifier
Get the identifier for the node if it has been standardized.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'id': FieldInfo(annotation=str, required=True, description='The IRI for the node'), 'meta': FieldInfo(annotation=Union[Meta, NoneType], required=False), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, alias='lbl', alias_priority=2, description='The name of the node'), 'reference': FieldInfo(annotation=Union[Reference, NoneType], required=False), 'standardized': FieldInfo(annotation=bool, required=False, default=False, exclude=True), 'type': FieldInfo(annotation=Literal['CLASS', 'PROPERTY', 'INDIVIDUAL'], required=True, description='Type of node')}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- namespace
Get the OBO namespace.
- prefix
Get the prefix for the node if it has been standardized.
- properties
Get the properties for this node.
- replaced_by
Get the identifier that this node was replaced by.
- synonyms
Get the synonyms for the node.
- xrefs
Get the xrefs for the node.
Methods Documentation