Interface NESTGraphValidator
-
- All Known Subinterfaces:
NESTSequentialWorkflowValidator,NESTWorkflowValidator
- All Known Implementing Classes:
NESTGraphValidatorImpl,NESTSequentialWorkflowValidatorImpl,NESTWorkflowValidatorImpl
public interface NESTGraphValidatorTo check if aNESTGraphObjectis a valid graph, this class can be used. The validator provides methods, that verify that there are no redundancies in a generic nest graph.- Author:
- Alexander Schultheis
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetErrorMessage()This method outputs the collected error messages from previous methods as a String.NESTGraphObjectgetGraph()This method returns the graph object for which the validator was created.booleanhasFullyConnectedAndNoDuplicateEdges()This method checks that all edges have connections and that no edge is duplicated.booleanhasUniqueEdgeIDs()This method checks if all edges in the graph have unique Ids.booleanhasUniqueNodeIDs()This method checks if all nodes in the graph have unique Ids.booleanhasValidSemanticDescriptors()booleanisValidGraph()This method checks whether the graph is a valid nest graph.voidreset()The method resets all values stored in the validator.
-
-
-
Method Detail
-
reset
void reset()
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.
-
isValidGraph
boolean isValidGraph()
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 methodshasUniqueEdgeIDs(),hasUniqueNodeIDs()andhasFullyConnectedAndNoDuplicateEdges().- Returns:
- True, if graph is valid.
-
hasUniqueEdgeIDs
boolean hasUniqueEdgeIDs()
This method checks if all edges in the graph have unique Ids.- Returns:
- True, if all edge ids are unique.
-
hasUniqueNodeIDs
boolean hasUniqueNodeIDs()
This method checks if all nodes in the graph have unique Ids.- Returns:
- True, if all node ids are unique.
-
hasFullyConnectedAndNoDuplicateEdges
boolean hasFullyConnectedAndNoDuplicateEdges()
This method checks that all edges have connections and that no edge is duplicated.- Returns:
- True, if all edges are valid.
-
hasValidSemanticDescriptors
boolean hasValidSemanticDescriptors()
-
getErrorMessage
String getErrorMessage()
This method outputs the collected error messages from previous methods as a String.- Returns:
- A string containing all error messages. If the string is null, the graph was valid for all previous checks.
-
getGraph
NESTGraphObject getGraph()
This method returns the graph object for which the validator was created.- Returns:
- The graph object for which the validator was created.
-
-