Interface Node

All Superinterfaces:
ClassifierInstance<Concept>, HasFeatureValues
All Known Implementing Classes:
Annotation, Classifier, Concept, Containment, DataType, DynamicNode, Enumeration, EnumerationLiteral, Feature, Field, Interface, Language, LanguageEntity, Link, LionCoreBuiltins, M3Node, PrimitiveType, Property, ProxyNode, Reference, StructuredDataType

public interface Node extends ClassifierInstance<Concept>
A node is an instance of a Concept. It contains all the values associated to that instance.
See Also:
  • Method Details

    • getID

      @Nullable String getID()
      This return the Node ID.

      A valid Node ID should not be null, but this method can return a null value in case the Node is in invalid state.

      Specified by:
      getID in interface ClassifierInstance<Concept>
    • getRoot

      default Node getRoot()
      If a Node is a root node in a Model, this method returns the node itself. Otherwise it returns the ancestor which is a root node. This method should return null only if the Node is not inserted in a Model and it is therefore considered a dangling Node.
    • isRoot

      default boolean isRoot()
    • getParent

      ClassifierInstance<?> getParent()
      Description copied from interface: ClassifierInstance
      The immediate parent of the Node. This should be null only for root nodes.
      Specified by:
      getParent in interface ClassifierInstance<Concept>
    • getClassifier

      Concept getClassifier()
      The concept of which this Node is an instance. The Concept should not be abstract.
      Specified by:
      getClassifier in interface ClassifierInstance<Concept>
    • getContainmentFeature

      Containment getContainmentFeature()
      Return the Containment feature used to hold this Node within its parent. This will be null only for root nodes or dangling nodes (which are not distinguishable by looking at the node itself).
      See Also:
    • thisAndAllDescendants

      @Nonnull default List<Node> thisAndAllDescendants()
      Return a list containing this node and all its descendants. Does not include annotations.