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 aType.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Constructor Summary
Constructors Constructor Description SchemaTypeInformation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessTypegetAccessType(Type type)Returns theAccessTypeof the given element.StringgetIdentifier(Type type)Returns a unique identifier for the given element.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.TypegetRoot(AccessType accessType)Returns the root element for a givenAccessType.
-
-
-
Method Detail
-
getIdentifier
public String getIdentifier(Type type)
Returns a unique identifier for the given element.- Specified by:
getIdentifierin interfaceNodeInformation<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
Listbecause 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. ASetwould leave that to the implementation's choice of collection.- Specified by:
getParentIdentifiersin interfaceNodeInformation<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 theAccessTypeof the given element.- Specified by:
getAccessTypein interfaceTypeInformation<Type>- Parameters:
type- The element.- Returns:
- The access type.
-
getRoot
public Type getRoot(AccessType accessType)
Returns the root element for a givenAccessType.- Specified by:
getRootin interfaceTypeInformation<Type>- Parameters:
accessType- The access type.- Returns:
- The root element.
-
-