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
public class AggregateObjectImpl extends DataObjectImpl implements AggregateObject
- 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
COMPONENT, COMPONENT_KEY, LOG_CREATING_VOID_OBJECT_FAILED, LOG_SET_ATTRIBUTE_TYPE_CONFLICT, LOG_UNKOWN_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description AggregateObjectImpl(AggregateClass dataClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertSameValueAsIn(DataObject object)DataObjectcopy()Makes a deep copy of the data objectAggregateClassgetAggregateClass()Map<String,DataObject>getAttributeMap()Returns an unmodifiable map of all attributes and values of this aggregate.Collection<String>getAttributeNames()Returns a collection of all attribute names.DataObjectgetAttributeValue(String name)The method returns the value for a specific Attribute, which can be a subclass ofDataObject.booleanhasAttributeValue(String string)Checks if the aggregate object contains an attribute with the given name whose value is not nullbooleanhasSameValueAsIn(DataObject object)This method makes a deep compare.booleanisEmpty()Checks, if the aggregate object contains any values.DataClassresolveAttributeClass(AttributePath path)DataObjectresolveAttributeValue(AttributePath path)voidsetAttributeValue(String attributeName, DataObject value)Sets a value for the given attribute.intsize()Returns the size of the underlying map of attributes.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, 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
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
-
-
-
-
Constructor Detail
-
AggregateObjectImpl
public AggregateObjectImpl(AggregateClass dataClass)
-
-
Method Detail
-
getAggregateClass
public AggregateClass getAggregateClass()
- Specified by:
getAggregateClassin interfaceAggregateObject
-
getAttributeValue
public DataObject getAttributeValue(String name)
Description copied from interface:AggregateObjectThe 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:
getAttributeValuein interfaceAggregateObject- Parameters:
name- the name of the requested attribute- Returns:
- the DataObject value of the requested attribute name.
-
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
-
resolveAttributeClass
public DataClass resolveAttributeClass(AttributePath path) throws NoSuchAttributeException
- Specified by:
resolveAttributeClassin interfaceAggregateObject- Throws:
NoSuchAttributeException
-
resolveAttributeValue
public DataObject resolveAttributeValue(AttributePath path) throws NoSuchAttributeException
- Specified by:
resolveAttributeValuein interfaceAggregateObject- Throws:
NoSuchAttributeException
-
setAttributeValue
public void setAttributeValue(String attributeName, DataObject value) throws InvalidTypeException, NoSuchAttributeException
Description copied from interface:AggregateObjectSets a value for the given attribute. Values can be removed by setting null.- Specified by:
setAttributeValuein 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:
InvalidTypeException- if the types of the given value and the attribute doesn't matchNoSuchAttributeException- if the AggregateObject doesn't contain a attribute with this name
-
getAttributeMap
public Map<String,DataObject> getAttributeMap()
Description copied from interface:AggregateObjectReturns an unmodifiable map of all attributes and values of this aggregate.- Specified by:
getAttributeMapin interfaceAggregateObject- Returns:
- an unmodifiable map of all attributes and values
-
isEmpty
public boolean isEmpty()
Description copied from interface:AggregateObjectChecks, if the aggregate object contains any values.- Specified by:
isEmptyin interfaceAggregateObject- Returns:
-
hasAttributeValue
public boolean hasAttributeValue(String string)
Description copied from interface:AggregateObjectChecks if the aggregate object contains an attribute with the given name whose value is not null- Specified by:
hasAttributeValuein interfaceAggregateObject- Parameters:
string- the name of the attribute- Returns:
-
getAttributeNames
public Collection<String> getAttributeNames()
Description copied from interface:AggregateObjectReturns a collection of all attribute names.- Specified by:
getAttributeNamesin interfaceAggregateObject- Returns:
- a collection of all attribute names
-
size
public int size()
Description copied from interface:AggregateObjectReturns the size of the underlying map of attributes.- Specified by:
sizein interfaceAggregateObject- Returns:
- the number of attributes
-
copy
public DataObject copy()
Description copied from interface:DataObjectMakes a deep copy of the data object- Specified by:
copyin interfaceDataObject- Overrides:
copyin classDataObjectImpl- Returns:
- deep copy of the data object
-
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:
-
-