Interface NESTGraphValidator
- All Known Subinterfaces:
NESTSequentialWorkflowValidator
,NESTWorkflowValidator
- All Known Implementing Classes:
NESTGraphValidatorImpl
,NESTSequentialWorkflowValidatorImpl
,NESTWorkflowValidatorImpl
public interface NESTGraphValidator
To check if a
NESTGraphObject
is 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
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.void
reset()
The method resets all values stored in the validator.
-
Method Details
-
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.
-