Class SchemaTypeInformation

java.lang.Object
org.gcube.informationsystem.types.knowledge.SchemaTypeInformation
All Implemented Interfaces:
NodeInformation<Type>, TypeInformation<Type>

public class SchemaTypeInformation extends Object implements TypeInformation<Type>
Provides information about a Type.
Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • SchemaTypeInformation

      public SchemaTypeInformation()
  • Method Details

    • getIdentifier

      public String getIdentifier(Type type)
      Returns a unique identifier for the given element.
      Specified by:
      getIdentifier in interface NodeInformation<Type>
      Parameters:
      type - The element.
      Returns:
      The unique identifier.
    • getParentIdentifiers

      public List<String> getParentIdentifiers(Type root, Type type)
      Returns the identifiers of the parents of the given element, in the order that decides precedence among them.

      A List because the order is read: Dag.addNode(Object) takes the first parent when the DAG does not allow multiple inheritance, so which one comes first decides where the node is attached. A Set would leave that to the implementation's choice of collection.

      Specified by:
      getParentIdentifiers in interface NodeInformation<Type>
      Parameters:
      root - The root element of the DAG.
      type - The element.
      Returns:
      The parent identifiers, most significant first.
    • getAccessType

      public AccessType getAccessType(Type type)
      Returns the AccessType of the given element.
      Specified by:
      getAccessType in interface TypeInformation<Type>
      Parameters:
      type - The element.
      Returns:
      The access type.
    • getRoot

      public Type getRoot(AccessType accessType)
      Returns the root element for a given AccessType.
      Specified by:
      getRoot in interface TypeInformation<Type>
      Parameters:
      accessType - The access type.
      Returns:
      The root element.