Class AggregateObjectImpl
java.lang.Object
de.uni_trier.wi2.procake.data.object.impl.DataObjectImpl
de.uni_trier.wi2.procake.data.object.base.impl.AggregateObjectImpl
- All Implemented Interfaces:
AggregateObject
,DataObject
,PropertyHandler
- Author:
- Rainer Maximini
-
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.base.AggregateObject
LOG_CREATING_VOID_OBJECT_FAILED, LOG_SET_ATTRIBUTE_TYPE_CONFLICT, LOG_UNKOWN_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assertSameValueAsIn
(DataObject object) copy()
Makes a deep copy of the data objectReturns an unmodifiable map of all attributes and values of this aggregate.Returns a collection of all attribute names.getAttributeValue
(String name) The method returns the value for a specific Attribute, which can be a subclass ofDataObject
.boolean
hasAttributeValue
(String string) Checks if the aggregate object contains an attribute with the given name whose value is not nullboolean
hasSameValueAsIn
(DataObject object) This method makes a deep compare.boolean
isEmpty()
Checks, if the aggregate object contains any values.void
setAttributeValue
(String attributeName, DataObject value) Sets a value for the given attribute.int
size()
Returns the size of the underlying map of attributes.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, 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
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
-
Constructor Details
-
AggregateObjectImpl
-
-
Method Details
-
getAggregateClass
- Specified by:
getAggregateClass
in interfaceAggregateObject
-
getAttributeValue
Description copied from interface:AggregateObject
The method returns the value for a specific Attribute, which can be a subclass ofDataObject
. If the given AggregateObject doesn't contain the attribute, null will be returned.- Specified by:
getAttributeValue
in interfaceAggregateObject
- Parameters:
name
- the name of the requested attribute- Returns:
- the DataObject value of the requested attribute name.
-
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
-
resolveAttributeClass
- Specified by:
resolveAttributeClass
in interfaceAggregateObject
- Throws:
ProCAKENoSuchAttributeException
-
resolveAttributeValue
- Specified by:
resolveAttributeValue
in interfaceAggregateObject
- Throws:
ProCAKENoSuchAttributeException
-
setAttributeValue
public void setAttributeValue(String attributeName, DataObject value) throws ProCAKEInvalidTypeException, ProCAKENoSuchAttributeException Description copied from interface:AggregateObject
Sets a value for the given attribute. Values can be removed by setting null.- Specified by:
setAttributeValue
in interfaceAggregateObject
- Parameters:
attributeName
- An existing attribute name for the AggregateObject.value
- A new DataObject object that matches to the specified type, a VoidObject object, or null.- Throws:
ProCAKEInvalidTypeException
- if the types of the given value and the attribute doesn't matchProCAKENoSuchAttributeException
- if the AggregateObject doesn't contain a attribute with this name
-
getAttributeMap
Description copied from interface:AggregateObject
Returns an unmodifiable map of all attributes and values of this aggregate.- Specified by:
getAttributeMap
in interfaceAggregateObject
- Returns:
- an unmodifiable map of all attributes and values
-
isEmpty
public boolean isEmpty()Description copied from interface:AggregateObject
Checks, if the aggregate object contains any values.- Specified by:
isEmpty
in interfaceAggregateObject
- Returns:
-
hasAttributeValue
Description copied from interface:AggregateObject
Checks if the aggregate object contains an attribute with the given name whose value is not null- Specified by:
hasAttributeValue
in interfaceAggregateObject
- Parameters:
string
- the name of the attribute- Returns:
-
getAttributeNames
Description copied from interface:AggregateObject
Returns a collection of all attribute names.- Specified by:
getAttributeNames
in interfaceAggregateObject
- Returns:
- a collection of all attribute names
-
size
public int size()Description copied from interface:AggregateObject
Returns the size of the underlying map of attributes.- Specified by:
size
in interfaceAggregateObject
- Returns:
- the number of attributes
-
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
-
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:
-