Skip to main content

OntologyElement Objects

children

Returns an empty sequence of children nodes for this ontology element. This method is meant to be overridden by subclasses that have actual child nodes.

title

Abstract property that should return the title of the ontology element. Must be implemented by subclasses.

get_child_by_hash

Retrieves the first child node of this ontology element with the matching feature node hash. If multiple children have the same hash, the ontology is in an invalid state. Throws an exception if no matching child is found or if the type does not match. Arguments:
  • feature_node_hash - The feature node hash of the child node to find.
  • type_ - Optional type to check the type of the child node.
Returns: The child node with the specified feature node hash and type.

get_children_by_title

Retrieves all child nodes of this ontology element that match the specified title and type. Arguments:
  • title - The exact title of the child nodes to find.
  • type_ - Optional type to filter the child nodes.
Returns: A list of child nodes with the specified title and type.

get_child_by_title

Retrieves a single child node of this ontology element that matches the specified title and type. Throws an exception if more than one or no child with the specified title and type is found. Arguments:
  • title - The exact title of the child node to find.
  • type_ - Optional type to check the type of the child node.
Returns: The child node with the specified title and type. Raises:
  • OntologyError - If more than one or no matching child is found.

OntologyNestedElement Objects

uid

Deprecated. Please use feature_node_hash instead.