Class ModelKnowledgeValidator
- java.lang.Object
-
- org.gcube.informationsystem.discovery.knowledge.ModelKnowledgeValidator
-
- All Implemented Interfaces:
DiscoveredElementAction<Element>,NodeElaborator<Class<Element>>
public class ModelKnowledgeValidator extends Object implements DiscoveredElementAction<Element>, NodeElaborator<Class<Element>>
A validator that checks if discovered model types belong to the expected packages as defined by aRegistrationProvider.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerloggerThe logger.protected RegistrationProviderrpThe registration provider.
-
Constructor Summary
Constructors Constructor Description ModelKnowledgeValidator(RegistrationProvider rp)Constructs a new validator for the given registration provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidanalizeElement(Class<Element> e)Analyzes a discovered element.voidelaborate(Node<Class<Element>> node, int level)Performs an operation on the given node.
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
The logger.
-
rp
protected RegistrationProvider rp
The registration provider.
-
-
Constructor Detail
-
ModelKnowledgeValidator
public ModelKnowledgeValidator(RegistrationProvider rp)
Constructs a new validator for the given registration provider.- Parameters:
rp- The registration provider defining the model's packages.
-
-
Method Detail
-
analizeElement
public void analizeElement(Class<Element> e) throws Exception
Analyzes a discovered element.- Specified by:
analizeElementin interfaceDiscoveredElementAction<Element>- Parameters:
e- The class of the discovered element.- Throws:
Exception- if an error occurs during analysis.
-
elaborate
public void elaborate(Node<Class<Element>> node, int level) throws Exception
Performs an operation on the given node.- Specified by:
elaboratein interfaceNodeElaborator<Class<Element>>- Parameters:
node- The node to process.level- The depth of the node in the tree.- Throws:
Exception- if an error occurs during elaboration.
-
-