Interface CollectionClass
-
- All Superinterfaces:
DataClass
,PropertyHandler
- All Known Implementing Classes:
CollectionClassImpl
,ListClassImpl
,SetClassImpl
public interface CollectionClass extends DataClass
The Collection ClassesSetClass
andListClass
are both containers that can store each kind of data objects. Typical restrictions are the maximum and minimum number of elements and the base data class of whom the element objects must be instances. The difference between List and Set is that a List stores the elements in a fixed order, whereby a Set uses an arbitrary order.Properties of collection classes:
Data Class Equal Element Types? Elements Ordered? Duplicates Possible? Element Access Number of Elements SetClass
yes no no iterator variable ListClass
yes yes yes iterator variable Properties of collection classes
-
-
Field Summary
Fields Modifier and Type Field Description static String
CLASS_NAME
The name of the class.static String
COMPONENT
Component: "cake.data.model" (LogComponentIdentifier.COMPONENT
)static String
COMPONENT_KEY
Component-Key: "05" (LogComponentIdentifier.COMPONENT_KEY_COLLECTIONCLASS
)static String
LOG_INCONSISTENT_ELEMENTCLASS
Inconsistency between this class' element-class and the super-class' element class.static String
LOG_MISSING_ELEMENTCLASS
No element class specified for this class.-
Fields inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
LOG_ABSTRACT_CLASS_NOT_INSTANTIABLE, LOG_ABSTRACT_SYSTEM_SUBCLASS_CREATION_FAILED, LOG_CLASS_NOT_EDITABLE, LOG_CLASS_NOT_INSTANTIABLE, LOG_EDITABLE_CLASS_NOT_INSTANTIABLE, LOG_FINISH_EDIT_FAILED, LOG_GET_SUPERCLASSES_FAILED, LOG_SUBCLASS_CREATION_FAILED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataClass
getElementClass()
Each collection can contain elements of one special type.int
getMaxCardinality()
getMaxCardinality.int
getMinCardinality()
getMinCardinality.void
setElementClass(DataClass elementClass)
Each collection can contain elements of one special type.void
setMaxCardinality(int maxCardinality)
setMaxCardinality.void
setMinCardinality(int minCardinality)
setMinCardinality.-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
addSubclass, checkInstantiability, createSubclass, finishEditing, getModel, getName, getObjectClass, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, includeClass, isAbstract, isAggregate, isAtomic, isBoolean, isByteArray, isCake2DataReference, isChronologic, isCollection, isControlflowItem, isDataflowWrapper, isDate, isDouble, isEditable, isInstantiable, isInteger, isInterval, isList, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTGraphItem, isNESTNode, isNESTPartOfEdge, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isParentItem, isSequence, isSet, isString, isSubclassOf, isSubWorkflow, isSystemClass, isTask, isTime, isTimestamp, isUnion, isURI, isVoid, isWorkflow, isWorkflowItem, newObject, removeSubclass, setAbstract, setName
-
Methods inherited from interface de.uni_trier.wi2.procake.data.PropertyHandler
addProperty, addProperty, getAllProperties, getAllPropertyNodes, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasProperties, removeProperty
-
-
-
-
Field Detail
-
CLASS_NAME
static final String CLASS_NAME
The name of the class. This name should be used inModel.getClass(String)
to receive the system class. The value is * "Collection" .- See Also:
- Constant Field Values
-
COMPONENT
static final String COMPONENT
Component: "cake.data.model" (LogComponentIdentifier.COMPONENT
)- See Also:
- Constant Field Values
-
COMPONENT_KEY
static final String COMPONENT_KEY
Component-Key: "05" (LogComponentIdentifier.COMPONENT_KEY_COLLECTIONCLASS
)- See Also:
- Constant Field Values
-
LOG_INCONSISTENT_ELEMENTCLASS
static final String LOG_INCONSISTENT_ELEMENTCLASS
Inconsistency between this class' element-class and the super-class' element class.- Component:
COMPONENT
- Key: "0501"
- this
- Element class
- Super-Class element class
- Super-Class
- See Also:
- Constant Field Values
- Component:
-
LOG_MISSING_ELEMENTCLASS
static final String LOG_MISSING_ELEMENTCLASS
No element class specified for this class.- Component:
COMPONENT
- Key: "0500"
- this
- See Also:
- Constant Field Values
- Component:
-
-
Method Detail
-
getElementClass
DataClass getElementClass()
Each collection can contain elements of one special type. This type can be received with this method.If several
DataClass
es should be used as type, you must summarize these classes in anUnionClass
.- Returns:
- The
DataClass
of the elements.
-
setElementClass
void setElementClass(DataClass elementClass) throws IllegalEditException
Each collection can contain elements of one special type. This type can be received with this method.If several
DataClass
es should be used as type, you must summarize these classes in anUnionClass
.- Parameters:
elementClass
- TheDataClass
of the collection elements.- Throws:
IllegalEditException
- if any.
-
getMaxCardinality
int getMaxCardinality()
getMaxCardinality.
- Returns:
- the maximum number of elements that are allowed in the
CollectionObject
-
setMaxCardinality
void setMaxCardinality(int maxCardinality) throws IllegalEditException
setMaxCardinality.
- Parameters:
maxCardinality
- The maximum number of elements that are allowed in theCollectionObject
.- Throws:
IllegalEditException
- is thrown if the class is not editable, e.g., the class is already declared as finished.
-
getMinCardinality
int getMinCardinality()
getMinCardinality.
- Returns:
- the minimum number of elements that are required in the
CollectionObject
-
setMinCardinality
void setMinCardinality(int minCardinality) throws IllegalEditException
setMinCardinality.
- Parameters:
minCardinality
- The minimum number of elements that are required in theCollectionObject
.- Throws:
IllegalEditException
- is thrown if the class is not editable, e.g., the class is already declared as finished.
-
-