Class ClassInformation
java.lang.Object
org.gcube.informationsystem.discovery.knowledge.ClassInformation
- All Implemented Interfaces:
TypeInformation<Class<Element>>,NodeInformation<Class<Element>>
An implementation of
TypeInformation for Class<Element> objects.
This class provides methods to extract type information, such as identifiers
and parent-child relationships, from Java Class objects representing
Information System elements.
- Author:
- Luca Frosini (ISTI - CNR)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAccessType(Class<Element> clz) Returns theAccessTypeof the given element.getIdentifier(Class<Element> clz) Returns a unique identifier for the given element.getParentIdentifiers(Class<Element> root, Class<Element> clz) Returns the identifiers of the parents of the given element.getRoot(AccessType accessType) Returns the root element for a givenAccessType.
-
Constructor Details
-
ClassInformation
public ClassInformation()
-
-
Method Details
-
getIdentifier
Returns a unique identifier for the given element.- Specified by:
getIdentifierin interfaceNodeInformation<Class<Element>>- Parameters:
clz- The element.- Returns:
- The unique identifier.
-
getParentIdentifiers
Returns the identifiers of the parents of the given element.- Specified by:
getParentIdentifiersin interfaceNodeInformation<Class<Element>>- Parameters:
root- The root element of the tree.clz- The element.- Returns:
- A set of parent identifiers.
-
getAccessType
Returns theAccessTypeof the given element.- Specified by:
getAccessTypein interfaceTypeInformation<Class<Element>>- Parameters:
clz- The element.- Returns:
- The access type.
-
getRoot
Returns the root element for a givenAccessType.- Specified by:
getRootin interfaceTypeInformation<Class<Element>>- Parameters:
accessType- The access type.- Returns:
- The root element.
-