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
public abstract class NESTGraphItemObjectImpl extends DataObjectImpl implements NESTGraphItemObject
Abstract definition of a Graph-Item. Refer to the corresponding InterfaceNESTGraphItemObjectfor more information.- Author:
- Alexander Stromer
-
-
Field Summary
Fields Modifier and Type Field Description protected NESTGraphObjectgraphStores the reference to the graph-
Fields inherited from class de.uni_trier.wi2.procake.data.object.impl.DataObjectImpl
objectId
-
-
Constructor Summary
Constructors Constructor Description NESTGraphItemObjectImpl(NESTGraphItemClass cakeclazz)Standard constructor of CAKE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSemanticValue(String semanticDescriptorClass, String attributeName, DataObject attributeValue)Adds the given attributeValue with the given attributeName to the graphItem.voidaddSemanticValue(String semanticDescriptorClass, String attributeName, String attributeValue)Adds the given attributeValue with the given attributeName to the graphItem.voidassertSameValueAsIn(DataObject object)intcompareTo(NESTGraphItemObject o)doublecomputeSemanticDescriptorSimilarity(NESTGraphItemObject nestItemObject, SimilarityValuator simVal, String simMeasure)booleanequalId(NESTGraphItemObject nestItemObject)Returns whether the nest graph item has the same id as the given nestItemObjectNESTGraphObjectgetGraph()Returns the graph this object is related to.DataObjectgetSemanticDescriptor()Returns the semantic description for the graph-object.BooleangetSemanticDescriptorBooleanValue(String attribute)Returns the boolean value of the attribute from the semantic descriptor of this node.StringgetSemanticDescriptorStringValue(String attribute)Returns the string value of the attribute from the semantic descriptor of this node.DataObjectgetSemanticDescriptorValue(String attribute)Returns the data object of the attribute from the semantic descriptor of this node.DataObjectgetSemanticValueRecursively(String attributeName)Returns the DataObject that is stored with the passed attribute name.booleanhasSameValueAsIn(DataObject object)This method makes a deep compare.booleanhasSemanticallyEqualDescriptor(NESTGraphItemObject nestItemObject)Returns whether the nes graph item has a semantically equal descriptor as the given nestItemObject.booleanhasSemanticallyEqualDescriptor(NESTGraphItemObject nestItemObject, SimilarityValuator simVal, String simMeasure)Returns whether the nes graph item has a semantically equal descriptor as the given nestItemObject.voidsetGraph(NESTGraphObject graph)Sets the graph this object is related to.voidsetSemanticDescriptor(DataObject content)Sets the semantic description for the graph-object.voidsetSemanticDescriptorBooleanValue(String attribute, boolean value)Set the boolean value of the attribute from the semantic descriptor of this node.voidsetSemanticDescriptorStringValue(String attribute, String value)Set the string value of the attribute from the semantic descriptor of this node.voidsetSemanticDescriptorValue(String attribute, DataObject value)Set the data object of the attribute from the semantic descriptor of this node.StringtoDetailedString()Returns a detailed String, if the output of the standard toString() method would be to long.StringtoString()-
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, 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
-
-
-
-
Field Detail
-
graph
protected NESTGraphObject graph
Stores the reference to the graph
-
-
Constructor Detail
-
NESTGraphItemObjectImpl
public NESTGraphItemObjectImpl(NESTGraphItemClass cakeclazz)
Standard constructor of CAKE- Parameters:
cakeclazz-
-
-
Method Detail
-
hasSameValueAsIn
public boolean hasSameValueAsIn(DataObject object)
Description copied from interface:DataObjectThis method makes a deep compare. For atomic objects this is equal to theequalmethod. For sets, lists, aggregates, and others a deeper comparision is performed.- Specified by:
hasSameValueAsInin interfaceDataObject- Overrides:
hasSameValueAsInin classDataObjectImpl- Parameters:
object- The object to compare.- Returns:
trueif the givenobjecthas the same value(s) as this one.
-
assertSameValueAsIn
public void assertSameValueAsIn(DataObject object) throws AssertSameValueAsInException
- Specified by:
assertSameValueAsInin interfaceDataObject- Overrides:
assertSameValueAsInin classDataObjectImpl- Throws:
AssertSameValueAsInException
-
getGraph
public NESTGraphObject getGraph()
Description copied from interface:NESTGraphItemObjectReturns the graph this object is related to.- Specified by:
getGraphin interfaceNESTGraphItemObject- Returns:
- The graph for this item; NULL, if the object is not related to any graph.
-
setGraph
public void setGraph(NESTGraphObject graph)
Description copied from interface:NESTGraphItemObjectSets the graph this object is related to.- Specified by:
setGraphin interfaceNESTGraphItemObject- Parameters:
graph- The graph for this graphitem.
-
getSemanticDescriptor
public DataObject getSemanticDescriptor()
Description copied from interface:NESTGraphItemObjectReturns the semantic description for the graph-object.- Specified by:
getSemanticDescriptorin interfaceNESTGraphItemObject- Returns:
- The semantic description for this graph-object.
-
setSemanticDescriptor
public void setSemanticDescriptor(DataObject content)
Description copied from interface:NESTGraphItemObjectSets the semantic description for the graph-object.- Specified by:
setSemanticDescriptorin interfaceNESTGraphItemObject- Parameters:
content- The semantic description for the graph-object.
-
addSemanticValue
public void addSemanticValue(String semanticDescriptorClass, String attributeName, String attributeValue)
Description copied from interface:NESTGraphItemObjectAdds 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:
addSemanticValuein 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:NESTGraphItemObjectAdds 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:
addSemanticValuein 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
public DataObject getSemanticValueRecursively(String attributeName)
Description copied from interface:NESTGraphItemObjectReturns 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:
getSemanticValueRecursivelyin 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, NoSuchAttributeException
Description copied from interface:NESTGraphItemObjectReturns 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:
getSemanticDescriptorStringValuein 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:
NoSemanticDescriptorExceptionInvalidSemanticDescriptorExceptionNoSuchAttributeException
-
getSemanticDescriptorBooleanValue
public Boolean getSemanticDescriptorBooleanValue(String attribute) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, NoSuchAttributeException
Description copied from interface:NESTGraphItemObjectReturns 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:
getSemanticDescriptorBooleanValuein 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:
NoSemanticDescriptorExceptionInvalidSemanticDescriptorExceptionNoSuchAttributeException
-
getSemanticDescriptorValue
public DataObject getSemanticDescriptorValue(String attribute) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, NoSuchAttributeException, NoSuchAttributeValueException
Description copied from interface:NESTGraphItemObjectReturns 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:
getSemanticDescriptorValuein 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:
NoSemanticDescriptorExceptionInvalidSemanticDescriptorExceptionNoSuchAttributeExceptionNoSuchAttributeValueException
-
setSemanticDescriptorStringValue
public void setSemanticDescriptorStringValue(String attribute, String value) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, InvalidTypeException, NoSuchAttributeException
Description copied from interface:NESTGraphItemObjectSet 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:
setSemanticDescriptorStringValuein interfaceNESTGraphItemObject- Parameters:
attribute- The name of the string attribute, which value should be set.- Throws:
NoSemanticDescriptorExceptionInvalidSemanticDescriptorExceptionInvalidTypeExceptionNoSuchAttributeException
-
setSemanticDescriptorBooleanValue
public void setSemanticDescriptorBooleanValue(String attribute, boolean value) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, InvalidTypeException, NoSuchAttributeException
Description copied from interface:NESTGraphItemObjectSet 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:
setSemanticDescriptorBooleanValuein interfaceNESTGraphItemObject- Parameters:
attribute- The name of the boolean attribute, which value should be set.- Throws:
NoSemanticDescriptorExceptionInvalidSemanticDescriptorExceptionInvalidTypeExceptionNoSuchAttributeException
-
setSemanticDescriptorValue
public void setSemanticDescriptorValue(String attribute, DataObject value) throws NoSemanticDescriptorException, InvalidSemanticDescriptorException, InvalidTypeException, NoSuchAttributeException
Description copied from interface:NESTGraphItemObjectSet 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:
setSemanticDescriptorValuein interfaceNESTGraphItemObject- Parameters:
attribute- The name of the attribute, which value should be set.- Throws:
NoSemanticDescriptorExceptionInvalidSemanticDescriptorExceptionInvalidTypeExceptionNoSuchAttributeException
-
equalId
public boolean equalId(NESTGraphItemObject nestItemObject)
Description copied from interface:NESTGraphItemObjectReturns whether the nest graph item has the same id as the given nestItemObject- Specified by:
equalIdin 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:NESTGraphItemObjectReturns whether the nes graph item has a semantically equal descriptor as the given nestItemObject.- Specified by:
hasSemanticallyEqualDescriptorin interfaceNESTGraphItemObject- Returns:
-
hasSemanticallyEqualDescriptor
public boolean hasSemanticallyEqualDescriptor(NESTGraphItemObject nestItemObject)
Description copied from interface:NESTGraphItemObjectReturns whether the nes graph item has a semantically equal descriptor as the given nestItemObject.- Specified by:
hasSemanticallyEqualDescriptorin interfaceNESTGraphItemObject- Returns:
-
computeSemanticDescriptorSimilarity
public double computeSemanticDescriptorSimilarity(NESTGraphItemObject nestItemObject, SimilarityValuator simVal, String simMeasure)
- Specified by:
computeSemanticDescriptorSimilarityin interfaceNESTGraphItemObject- Returns:
-
toString
public String toString()
- Overrides:
toStringin classDataObjectImpl
-
toDetailedString
public String toDetailedString()
Description copied from interface:DataObjectReturns a detailed String, if the output of the standard toString() method would be to long.- Specified by:
toDetailedStringin interfaceDataObject- Overrides:
toDetailedStringin classDataObjectImpl- Returns:
-
compareTo
public int compareTo(NESTGraphItemObject o)
- Specified by:
compareToin interfaceComparable<NESTGraphItemObject>
-
-