Class NESTGraphValidatorImpl
java.lang.Object
de.uni_trier.wi2.procake.data.object.nest.utils.impl.NESTGraphValidatorImpl
- All Implemented Interfaces:
NESTGraphValidator
- Direct Known Subclasses:
NESTSequentialWorkflowValidatorImpl
,NESTWorkflowValidatorImpl
Implementation of the
NESTGraphValidator
.- Author:
- Alexander Schultheis
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis method outputs the collected error messages from previous methods as a String.getGraph()
This method returns the graph object for which the validator was created.boolean
This method checks that all edges have connections and that no edge is duplicated.boolean
This method checks if all edges in the graph have unique Ids.boolean
This method checks if all nodes in the graph have unique Ids.boolean
boolean
This method checks whether the graph is a valid nest graph.protected void
void
reset()
The method resets all values stored in the validator.
-
Field Details
-
logger
protected org.slf4j.Logger logger -
errorMessage
-
isValidGraph
-
-
Constructor Details
-
NESTGraphValidatorImpl
-
-
Method Details
-
reset
public void reset()Description copied from interface:NESTGraphValidator
The method resets all values stored in the validator. This method is to be used when changes have been made to the graph object after validation by the validator.- Specified by:
reset
in interfaceNESTGraphValidator
-
isValidGraph
public boolean isValidGraph()Description copied from interface:NESTGraphValidator
This method checks whether the graph is a valid nest graph. This is true if the graph has unique ids for nodes and edges and all edges are unique and connected. See methodsNESTGraphValidator.hasUniqueEdgeIDs()
,NESTGraphValidator.hasUniqueNodeIDs()
andNESTGraphValidator.hasFullyConnectedAndNoDuplicateEdges()
.- Specified by:
isValidGraph
in interfaceNESTGraphValidator
- Returns:
- True, if graph is valid.
-
hasUniqueEdgeIDs
public boolean hasUniqueEdgeIDs()Description copied from interface:NESTGraphValidator
This method checks if all edges in the graph have unique Ids.- Specified by:
hasUniqueEdgeIDs
in interfaceNESTGraphValidator
- Returns:
- True, if all edge ids are unique.
-
hasUniqueNodeIDs
public boolean hasUniqueNodeIDs()Description copied from interface:NESTGraphValidator
This method checks if all nodes in the graph have unique Ids.- Specified by:
hasUniqueNodeIDs
in interfaceNESTGraphValidator
- Returns:
- True, if all node ids are unique.
-
hasFullyConnectedAndNoDuplicateEdges
public boolean hasFullyConnectedAndNoDuplicateEdges()Description copied from interface:NESTGraphValidator
This method checks that all edges have connections and that no edge is duplicated.- Specified by:
hasFullyConnectedAndNoDuplicateEdges
in interfaceNESTGraphValidator
- Returns:
- True, if all edges are valid.
-
hasValidSemanticDescriptors
public boolean hasValidSemanticDescriptors()- Specified by:
hasValidSemanticDescriptors
in interfaceNESTGraphValidator
-
getUniqueEdgeIDs
-
getUniqueNodeIDs
-
getErrorMessage
Description copied from interface:NESTGraphValidator
This method outputs the collected error messages from previous methods as a String.- Specified by:
getErrorMessage
in interfaceNESTGraphValidator
- Returns:
- A string containing all error messages. If the string is null, the graph was valid for all previous checks.
-
log
-
getGraph
Description copied from interface:NESTGraphValidator
This method returns the graph object for which the validator was created.- Specified by:
getGraph
in interfaceNESTGraphValidator
- Returns:
- The graph object for which the validator was created.
-