Package org.gcube.informationsystem.dag
Interface NodeInformation<T>
-
- Type Parameters:
T- The type of the element.
- All Known Subinterfaces:
TypeInformation<T>
- All Known Implementing Classes:
ClassInformation,SchemaTypeInformation
public interface NodeInformation<T>An interface for extracting identification and relationship information from elements to be used in aDag.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetIdentifier(T t)Returns a unique identifier for the given element.List<String>getParentIdentifiers(T root, T t)Returns the identifiers of the parents of the given element, in the order that decides precedence among them.
-
-
-
Method Detail
-
getIdentifier
String getIdentifier(T t)
Returns a unique identifier for the given element.- Parameters:
t- The element.- Returns:
- The unique identifier.
-
getParentIdentifiers
List<String> getParentIdentifiers(T root, T t)
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.- Parameters:
root- The root element of the DAG.t- The element.- Returns:
- The parent identifiers, most significant first.
-
-