Class NESTGraphObjectImpl
java.lang.Object
de.uni_trier.wi2.procake.data.object.impl.DataObjectImpl
de.uni_trier.wi2.procake.data.object.nest.impl.NESTGraphObjectImpl
- All Implemented Interfaces:
DataObject
,NESTGraphObject
,PropertyHandler
- Direct Known Subclasses:
NESTAbstractWorkflowObjectImpl
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<NESTGraphListener>
Stores the list of listeners for this graph objectprotected Map<String,
NESTNodeObject> Stores the internal list of graph nodes in the graph.protected NESTGraphIDManager
Stores the ID-manager for this graph object.Fields inherited from class de.uni_trier.wi2.procake.data.object.impl.DataObjectImpl
objectId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addGraphNode
(NESTNodeObject newGraphNode) Adds the given graph-node to the internal list of registered graphnodes.void
assertSameValueAsIn
(DataObject object) protected void
checkAllowedGraphClasses
(NESTGraphItemObject nestGraphItem) boolean
containsValueFrom
(NESTGraphObject graph) Checks, whether the given graph is entirely contained in this graph.boolean
Checks, whether the given graph is entirely contained in this graph.copy()
Makes a deep copy of the data objectReturns the graph node whose id is equal to the given node from the internal list of graphnodes.getGraphEdge
(String id) Returns the graph edge with the specified id.Returns the complete list of graphedges contained in the graphgetGraphNode
(String id) Returns the graphnode with the given id from the internal list of graphnodes.Returns the complete list of graph nodes registered in the graph.getGraphNodes
(Predicate<? super NESTNodeObject> filter) Returns a list of graph nodes registered in the graph.Returns the ID-manager for this graph.Returns the modifier.int
int
<T extends NESTNodeObject>
TgetSemanticallyEqualNode
(T node) Returns the graph node that is identical (due to its similarity value of 1.0) to the given node from the internal list of graphnodes.<T extends NESTNodeObject>
TgetSemanticallyEqualNode
(T node, SimilarityValuator simVal, String simMeasure) Returns the graph node that is identical (due to its similarity value of 1.0) to the given node from the internal list of graphnodes.Returns the default visualizer for this graph.getVisualizer
(Class clazz) boolean
hasSameValueAsIn
(DataObject object) This method makes a deep compare.protected void
publishAddNode
(NESTNodeObject newNode) Distributes adding a node to the listenersprotected void
publishRemoveNode
(NESTNodeObject oldNode) Distributes removing a node to the listenersboolean
Removes the given graph-node from the internal list of registered graphnodes.toString()
protected void
updateDependencies
(NESTNodeObject newItem) Assures that the newly added item knows about this graphobject.void
updateGraphNodeId
(String oldId, String newId) Updates the internal list of registered graphnodes, when an id of a graph node changed.Methods inherited from class de.uni_trier.wi2.procake.data.object.impl.DataObjectImpl
addProperty, addProperty, deepCopy, getAllProperties, getAllPropertyNodes, getDataClass, getId, getModel, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasClassName, hasProperties, hasSystemClassName, isAggregate, isAtomic, isBoolean, isByteArray, isChronologic, isCollection, isDataflowWrapper, isDataReference, isDate, isDouble, isInteger, isInterval, isKindOf, isList, isMemberOf, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTNode, isNESTPartOfEdge, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isSequence, isSet, isString, isSubWorkflow, isTask, isTime, isTimestamp, isUnion, isURI, isVoid, isWorkflow, removeId, removeProperty, setDataClass, setId, setPropertyRootNode, toDetailedString, toXML
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.uni_trier.wi2.procake.data.object.DataObject
getDataClass, getId, getModel, hasClassName, hasSystemClassName, isAggregate, isAtomic, isBoolean, isByteArray, isChronologic, isCollection, isDataflowWrapper, isDataReference, isDate, isDouble, isInteger, isInterval, isKindOf, isList, isMemberOf, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTNode, isNESTPartOfEdge, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isSequence, isSet, isString, isSubWorkflow, isTask, isTime, isTimestamp, isUnion, isURI, isVoid, isWorkflow, removeId, setDataClass, setId, toDetailedString, toXML
Methods inherited from interface de.uni_trier.wi2.procake.data.PropertyHandler
addProperty, addProperty, getAllProperties, getAllPropertyNodes, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasProperties, removeProperty, setPropertyRootNode
-
Field Details
-
graphNodes
Stores the internal list of graph nodes in the graph. -
eventListener
Stores the list of listeners for this graph object -
idManager
Stores the ID-manager for this graph object.
-
-
Constructor Details
-
NESTGraphObjectImpl
Standard constructor of CAKE- Parameters:
cakeclazz
-
-
-
Method Details
-
addGraphNode
Description copied from interface:NESTGraphObject
Adds the given graph-node to the internal list of registered graphnodes. Nodes are being bound automatically if they are connected to already bound edges. → Create the graph based on the startnode, so that all nodes/edges get automatically bound.- Specified by:
addGraphNode
in interfaceNESTGraphObject
- Parameters:
newGraphNode
- The graphnode, which should be registered.
-
removeGraphNode
Description copied from interface:NESTGraphObject
Removes the given graph-node from the internal list of registered graphnodes. It is important to remove unused or obsolete nodes from the internal list in order to have a consistent objectmodel.- Specified by:
removeGraphNode
in interfaceNESTGraphObject
- Parameters:
id
- The id of the node to remove.- Returns:
- TRUE, if the removal-process was successfull. FALSE, otherwise.
-
getSemanticallyEqualNode
public <T extends NESTNodeObject> T getSemanticallyEqualNode(T node, SimilarityValuator simVal, String simMeasure) Description copied from interface:NESTGraphObject
Returns the graph node that is identical (due to its similarity value of 1.0) to the given node from the internal list of graphnodes.- Specified by:
getSemanticallyEqualNode
in interfaceNESTGraphObject
- Parameters:
node
- the node that is compared to the other nodes of the graphsimVal
- The similarity valuator to usesimMeasure
- The name of the similarity measure to use- Returns:
- semantic equal graph node, if exists
null
otherwise
-
getSemanticallyEqualNode
Description copied from interface:NESTGraphObject
Returns the graph node that is identical (due to its similarity value of 1.0) to the given node from the internal list of graphnodes. The default similarity valuator and measure are used.- Specified by:
getSemanticallyEqualNode
in interfaceNESTGraphObject
- Parameters:
node
- the node that is compared to the other nodes of the graph- Returns:
- semantic equal graph node, if exists
null
otherwise
-
getEqualIdGraphNode
Description copied from interface:NESTGraphObject
Returns the graph node whose id is equal to the given node from the internal list of graphnodes.- Specified by:
getEqualIdGraphNode
in interfaceNESTGraphObject
- Returns:
- graph node with equal id, if exists
null
otherwise
-
updateGraphNodeId
Description copied from interface:NESTGraphObject
Updates the internal list of registered graphnodes, when an id of a graph node changed.- Specified by:
updateGraphNodeId
in interfaceNESTGraphObject
-
getGraphNode
Description copied from interface:NESTGraphObject
Returns the graphnode with the given id from the internal list of graphnodes.- Specified by:
getGraphNode
in interfaceNESTGraphObject
- Parameters:
id
- The id of the graphnode, which should be retrieved.- Returns:
-
getGraphEdge
Description copied from interface:NESTGraphObject
Returns the graph edge with the specified id.- Specified by:
getGraphEdge
in interfaceNESTGraphObject
- Parameters:
id
- the id of the graph edge- Returns:
- the edge
-
getGraphNodes
Description copied from interface:NESTGraphObject
Returns the complete list of graph nodes registered in the graph.- Specified by:
getGraphNodes
in interfaceNESTGraphObject
- Returns:
- list of graph nodes in the graph.
-
getGraphNodes
Description copied from interface:NESTGraphObject
Returns a list of graph nodes registered in the graph.- Specified by:
getGraphNodes
in interfaceNESTGraphObject
- Parameters:
filter
- filter to apply- Returns:
- list of graph nodes in the graph
-
getGraphEdges
Description copied from interface:NESTGraphObject
Returns the complete list of graphedges contained in the graph- Specified by:
getGraphEdges
in interfaceNESTGraphObject
- Returns:
- List of graphedges in the graph.
-
containsValueFrom
Description copied from interface:NESTGraphObject
Checks, whether the given graph is entirely contained in this graph.- Specified by:
containsValueFrom
in interfaceNESTGraphObject
- Parameters:
graph
- given graph- Returns:
- true, if the given graph is entirely contained in this graph
-
containsValueFromWithExceptions
public boolean containsValueFromWithExceptions(NESTGraphObject graph) throws AssertSameValueAsInException Description copied from interface:NESTGraphObject
Checks, whether the given graph is entirely contained in this graph.- Specified by:
containsValueFromWithExceptions
in interfaceNESTGraphObject
- Parameters:
graph
- given graph- Returns:
- true, if the given graph is entirely contained in this graph
- Throws:
AssertSameValueAsInException
- exception with explanations
-
getIDManager
Description copied from interface:NESTGraphObject
Returns the ID-manager for this graph.- Specified by:
getIDManager
in interfaceNESTGraphObject
- Returns:
-
getNumberOfNodes
public int getNumberOfNodes()- Specified by:
getNumberOfNodes
in interfaceNESTGraphObject
- Returns:
-
getNumberOfEdges
public int getNumberOfEdges()- Specified by:
getNumberOfEdges
in interfaceNESTGraphObject
- Returns:
-
getModifier
Description copied from interface:NESTGraphObject
Returns the modifier.- Specified by:
getModifier
in interfaceNESTGraphObject
- Returns:
-
copy
Description copied from interface:DataObject
Makes a deep copy of the data object- Specified by:
copy
in interfaceDataObject
- Overrides:
copy
in classDataObjectImpl
- Returns:
- deep copy of the data object
-
toString
- Overrides:
toString
in classDataObjectImpl
-
hasSameValueAsIn
Description copied from interface:DataObject
This method makes a deep compare. For atomic objects this is equal to theequal
method. For sets, lists, aggregates, and others a deeper comparision is performed.- Specified by:
hasSameValueAsIn
in interfaceDataObject
- Overrides:
hasSameValueAsIn
in classDataObjectImpl
- Parameters:
object
- The object to compare.- Returns:
true
if the givenobject
has the same value(s) as this one.
-
assertSameValueAsIn
- Specified by:
assertSameValueAsIn
in interfaceDataObject
- Overrides:
assertSameValueAsIn
in classDataObjectImpl
- Throws:
AssertSameValueAsInException
-
updateDependencies
Assures that the newly added item knows about this graphobject. -
publishAddNode
Distributes adding a node to the listeners- Parameters:
newNode
- the node, which was added
-
publishRemoveNode
Distributes removing a node to the listeners- Parameters:
oldNode
- the node, which was removed
-
checkAllowedGraphClasses
-
getVisualizer
Description copied from interface:NESTGraphObject
Returns the default visualizer for this graph.- Specified by:
getVisualizer
in interfaceNESTGraphObject
- Returns:
-
getVisualizer
- Specified by:
getVisualizer
in interfaceNESTGraphObject
-