Node

class Node(*, id: str, lbl: str | None = None, meta: Meta | None = None, type: 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

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_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

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 Summary

get_provenance()

Get provenance CURIEs from definition and xrefs.

parse_curie()

Parse the identifier into a pair, assuming it's a CURIE.

standardize()

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_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

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

get_provenance() list[Reference][source]

Get provenance CURIEs from definition and xrefs.

parse_curie() tuple[str, str] | tuple[None, None][source]

Parse the identifier into a pair, assuming it’s a CURIE.

standardize() Self[source]

Ground the node to a standard prefix and luid based on its id (URI).