Class NESTGraphItemObjectImpl
java.lang.Object
de.uni_trier.wi2.procake.data.object.impl.DataObjectImpl
de.uni_trier.wi2.procake.data.object.nest.impl.NESTGraphItemObjectImpl
- All Implemented Interfaces:
DataObject
,NESTGraphItemObject
,PropertyHandler
,Comparable<NESTGraphItemObject>
- Direct Known Subclasses:
NESTEdgeObjectImpl
,NESTNodeObjectImpl
Abstract definition of a Graph-Item. Refer to the corresponding Interface
NESTGraphItemObject
for more information.- Author:
- Alexander Stromer
-
Field Summary
Fields inherited from class de.uni_trier.wi2.procake.data.object.impl.DataObjectImpl
objectId
Fields inherited from interface de.uni_trier.wi2.procake.data.object.nest.NESTGraphItemObject
LOG_ATTRIBUTE_NOT_FOUND
-
Constructor Summary
ConstructorDescriptionNESTGraphItemObjectImpl
(NESTGraphItemClass cakeclazz) Standard constructor of CAKE -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSemanticValue
(String semanticDescriptorClass, String attributeName, DataObject attributeValue) Adds the given attributeValue with the given attributeName to the graphItem.void
addSemanticValue
(String semanticDescriptorClass, String attributeName, String attributeValue) Adds the given attributeValue with the given attributeName to the graphItem.void
assertSameValueAsIn
(DataObject object) int
double
computeSemanticDescriptorSimilarity
(NESTGraphItemObject nestItemObject, SimilarityValuator simVal, String simMeasure) boolean
equalId
(NESTGraphItemObject nestItemObject) Returns whether the nest graph item has the same id as the given nestItemObjectgetGraph()
Returns the graph this object is related to.Returns the semantic description for the graph-object.getSemanticDescriptorBooleanValue
(String attribute) Returns the boolean value of the attribute from the semantic descriptor of this node.getSemanticDescriptorStringValue
(String attribute) Returns the string value of the attribute from the semantic descriptor of this node.getSemanticDescriptorValue
(String attribute) Returns the data object of the attribute from the semantic descriptor of this node.getSemanticValueRecursively
(String attributeName) Returns the DataObject that is stored with the passed attribute name.boolean
hasSameValueAsIn
(DataObject object) This method makes a deep compare.boolean
hasSemanticallyEqualDescriptor
(NESTGraphItemObject nestItemObject) Returns whether the nes graph item has a semantically equal descriptor as the given nestItemObject.boolean
hasSemanticallyEqualDescriptor
(NESTGraphItemObject nestItemObject, SimilarityValuator simVal, String simMeasure) Returns whether the nes graph item has a semantically equal descriptor as the given nestItemObject.void
setGraph
(NESTGraphObject graph) Sets the graph this object is related to.void
setSemanticDescriptor
(DataObject content) Sets the semantic description for the graph-object.void
setSemanticDescriptorBooleanValue
(String attribute, boolean value) Set the boolean value of the attribute from the semantic descriptor of this node.void
setSemanticDescriptorStringValue
(String attribute, String value) Set the string value of the attribute from the semantic descriptor of this node.void
setSemanticDescriptorValue
(String attribute, DataObject value) Set the data object of the attribute from the semantic descriptor of this node.Returns a detailed String, if the output of the standard toString() method would be to long.toString()
Methods inherited from class de.uni_trier.wi2.procake.data.object.impl.DataObjectImpl
addProperty, addProperty, copy, 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, 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
copy, 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, 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
-
graph
Stores the reference to the graph
-
-
Constructor Details
-
NESTGraphItemObjectImpl
Standard constructor of CAKE- Parameters:
cakeclazz
-
-
-
Method Details
-
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
-
getGraph
Description copied from interface:NESTGraphItemObject
Returns the graph this object is related to.- Specified by:
getGraph
in interfaceNESTGraphItemObject
- Returns:
- The graph for this item; NULL, if the object is not related to any graph.
-
setGraph
Description copied from interface:NESTGraphItemObject
Sets the graph this object is related to.- Specified by:
setGraph
in interfaceNESTGraphItemObject
- Parameters:
graph
- The graph for this graphitem.
-
getSemanticDescriptor
Description copied from interface:NESTGraphItemObject
Returns the semantic description for the graph-object.- Specified by:
getSemanticDescriptor
in interfaceNESTGraphItemObject
- Returns:
- The semantic description for this graph-object.
-
setSemanticDescriptor
Description copied from interface:NESTGraphItemObject
Sets the semantic description for the graph-object.- Specified by:
setSemanticDescriptor
in interfaceNESTGraphItemObject
- Parameters:
content
- The semantic description for the graph-object.
-
addSemanticValue
public void addSemanticValue(String semanticDescriptorClass, String attributeName, String attributeValue) Description copied from interface:NESTGraphItemObject
Adds the given attributeValue with the given attributeName to the graphItem. If a semantic description is not yet available for the graphItem, an object of the type semanticDescriptorClass will be instantiated.- Specified by:
addSemanticValue
in interfaceNESTGraphItemObject
- Parameters:
semanticDescriptorClass
- The name of the CAKE I - DataObjectClass, which should be instantiated, if no semantic Descriptor is yet available with graphItem.attributeName
- The name of the attribute to write.attributeValue
- The String-value of the attribute, which should be written. The String will be encapsulated within a CAKE I - StringObject.
-
addSemanticValue
public void addSemanticValue(String semanticDescriptorClass, String attributeName, DataObject attributeValue) Description copied from interface:NESTGraphItemObject
Adds the given attributeValue with the given attributeName to the graphItem. If a semantic description is not yet available for the graphItem, an object of the type semanticDescriptorClass will be instantiated.- Specified by:
addSemanticValue
in interfaceNESTGraphItemObject
- Parameters:
semanticDescriptorClass
- The name of the CAKE I - DataObjectClass, which should be instantiated, if no semantic Descriptor is yet available with graphItem.attributeName
- The name of the attribute to write.attributeValue
- The CAKE I - DataObject-value of the attribute, which should be written.
-
getSemanticValueRecursively
Description copied from interface:NESTGraphItemObject
Returns the DataObject that is stored with the passed attribute name. Only the first matching object will be returned. Searches the semantic descriptor recursively using breadth-first search.- Specified by:
getSemanticValueRecursively
in interfaceNESTGraphItemObject
- Parameters:
attributeName
- the name of the attribute- Returns:
- the first detected DataObject with the given attribute name; null if no matching attribute was found
-
getSemanticDescriptorStringValue
public String getSemanticDescriptorStringValue(String attribute) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, ProCAKENoSuchAttributeException Description copied from interface:NESTGraphItemObject
Returns the string value of the attribute from the semantic descriptor of this node. Requires the semantic descriptor to be a subclass of aggregate class.- Specified by:
getSemanticDescriptorStringValue
in interfaceNESTGraphItemObject
- Parameters:
attribute
- The name of the string attribute, which value should be returned.- Returns:
- Returns the string value of the attribute from the semantic descriptor of this node or null if not available
- Throws:
NoSemanticDescriptorException
InvalidSemanticDescriptorException
ProCAKENoSuchAttributeException
-
getSemanticDescriptorBooleanValue
public Boolean getSemanticDescriptorBooleanValue(String attribute) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, ProCAKENoSuchAttributeException Description copied from interface:NESTGraphItemObject
Returns the boolean value of the attribute from the semantic descriptor of this node. Requires the semantic descriptor to be a subclass of aggregate class.- Specified by:
getSemanticDescriptorBooleanValue
in interfaceNESTGraphItemObject
- Parameters:
attribute
- The name of the boolean attribute, which value should be returned.- Returns:
- Returns the boolean value of the attribute from the semantic descriptor of this node or null if not available
- Throws:
NoSemanticDescriptorException
InvalidSemanticDescriptorException
ProCAKENoSuchAttributeException
-
getSemanticDescriptorValue
public DataObject getSemanticDescriptorValue(String attribute) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, ProCAKENoSuchAttributeException, NoSuchAttributeValueException Description copied from interface:NESTGraphItemObject
Returns the data object of the attribute from the semantic descriptor of this node. Requires the semantic descriptor to be a subclass of aggregate class.- Specified by:
getSemanticDescriptorValue
in interfaceNESTGraphItemObject
- Parameters:
attribute
- The name of the attribute, which value should be returned.- Returns:
- Returns the data object of the attribute from the semantic descriptor of this node or null if not available
- Throws:
NoSemanticDescriptorException
InvalidSemanticDescriptorException
ProCAKENoSuchAttributeException
NoSuchAttributeValueException
-
setSemanticDescriptorStringValue
public void setSemanticDescriptorStringValue(String attribute, String value) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, ProCAKEInvalidTypeException, ProCAKENoSuchAttributeException Description copied from interface:NESTGraphItemObject
Set the string value of the attribute from the semantic descriptor of this node. Requires the semantic descriptor to be a subclass of aggregate class.- Specified by:
setSemanticDescriptorStringValue
in interfaceNESTGraphItemObject
- Parameters:
attribute
- The name of the string attribute, which value should be set.- Throws:
NoSemanticDescriptorException
InvalidSemanticDescriptorException
ProCAKEInvalidTypeException
ProCAKENoSuchAttributeException
-
setSemanticDescriptorBooleanValue
public void setSemanticDescriptorBooleanValue(String attribute, boolean value) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, ProCAKEInvalidTypeException, ProCAKENoSuchAttributeException Description copied from interface:NESTGraphItemObject
Set the boolean value of the attribute from the semantic descriptor of this node. Requires the semantic descriptor to be a subclass of aggregate class.- Specified by:
setSemanticDescriptorBooleanValue
in interfaceNESTGraphItemObject
- Parameters:
attribute
- The name of the boolean attribute, which value should be set.- Throws:
NoSemanticDescriptorException
InvalidSemanticDescriptorException
ProCAKEInvalidTypeException
ProCAKENoSuchAttributeException
-
setSemanticDescriptorValue
public void setSemanticDescriptorValue(String attribute, DataObject value) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, ProCAKEInvalidTypeException, ProCAKENoSuchAttributeException Description copied from interface:NESTGraphItemObject
Set the data object of the attribute from the semantic descriptor of this node. Requires the semantic descriptor to be a subclass of aggregate class.- Specified by:
setSemanticDescriptorValue
in interfaceNESTGraphItemObject
- Parameters:
attribute
- The name of the attribute, which value should be set.- Throws:
NoSemanticDescriptorException
InvalidSemanticDescriptorException
ProCAKEInvalidTypeException
ProCAKENoSuchAttributeException
-
equalId
Description copied from interface:NESTGraphItemObject
Returns whether the nest graph item has the same id as the given nestItemObject- Specified by:
equalId
in interfaceNESTGraphItemObject
- Returns:
- true, if the nest graph item has the same id as the given nestItemObject
-
hasSemanticallyEqualDescriptor
public boolean hasSemanticallyEqualDescriptor(NESTGraphItemObject nestItemObject, SimilarityValuator simVal, String simMeasure) Description copied from interface:NESTGraphItemObject
Returns whether the nes graph item has a semantically equal descriptor as the given nestItemObject.- Specified by:
hasSemanticallyEqualDescriptor
in interfaceNESTGraphItemObject
- Returns:
-
hasSemanticallyEqualDescriptor
Description copied from interface:NESTGraphItemObject
Returns whether the nes graph item has a semantically equal descriptor as the given nestItemObject.- Specified by:
hasSemanticallyEqualDescriptor
in interfaceNESTGraphItemObject
- Returns:
-
computeSemanticDescriptorSimilarity
public double computeSemanticDescriptorSimilarity(NESTGraphItemObject nestItemObject, SimilarityValuator simVal, String simMeasure) - Specified by:
computeSemanticDescriptorSimilarity
in interfaceNESTGraphItemObject
- Returns:
-
toString
- Overrides:
toString
in classDataObjectImpl
-
toDetailedString
Description copied from interface:DataObject
Returns a detailed String, if the output of the standard toString() method would be to long.- Specified by:
toDetailedString
in interfaceDataObject
- Overrides:
toDetailedString
in classDataObjectImpl
- Returns:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<NESTGraphItemObject>
-