Class IntervalClassImpl
- All Implemented Interfaces:
IntervalClass
,DataClass
,PropertyHandler
IntervalClassImpl class.
- Author:
- Rainer Maximini
-
Field Summary
Fields inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
CLASS_NAME, 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
Fields inherited from interface de.uni_trier.wi2.procake.data.model.base.IntervalClass
CLASS_NAME, LOG_INCONSISTENT_ELEMENTCLASS, LOG_MISSING_ELEMENTCLASS, LOG_MISSING_TOTALLY_ORDERED_ELEMENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
beSystemClass.void
This method only checks if it is possible to finish the class and does not change any internal status.protected void
createSystemSubClasses.Receive the element class of the interval.Class<? extends DataObject>
getObjectClass.boolean
includeClass
(DataClass other) This method checks if the data class contains a reference to another data class.boolean
isInterval.Creates a newDataObject
and initialize it.void
setElementClass
(AtomicClass elementClass) Specify the element class of the interval.Methods inherited from class de.uni_trier.wi2.procake.data.model.impl.AbstractDataClassImpl
addProperty, addProperty, addSubclass, addSubClass, checkEditability, checkInstantiability, clearSubClasses, createSubclass, createSystemClassTree, finishEditing, getAllProperties, getAllPropertyNodes, getModel, getName, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, getRootClass, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, hasProperties, isAbstract, isAdaptationCase, isAggregate, isAtomic, isBoolean, isByteArray, isCake2DataReference, isChronologic, isCollection, isControlflowItem, isDataflowWrapper, isDate, isDouble, isEditable, isInstantiable, isInteger, isList, isNESTAdaptationQuery, isNESTAdaptationRule, isNESTAdaptationSession, isNESTAdaptationStep, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTGraphItem, isNESTNode, isNESTPartOfEdge, isNESTQuery, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isParentItem, isSequence, isSet, isString, isSubclassOf, isSubWorkflow, isSystemClass, isTask, isTime, isTimestamp, isUnion, isURI, isVoid, isWorkflow, isWorkflowCase, isWorkflowItem, removeProperty, removeSubclass, removeSubClass, setAbstract, setName, setPropertyRootNode, setSuperClass, toString
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.model.DataClass
addSubclass, checkInstantiability, createSubclass, finishEditing, getModel, getName, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, isAbstract, isAggregate, isAtomic, isBoolean, isByteArray, isCake2DataReference, isChronologic, isCollection, isControlflowItem, isDataflowWrapper, isDate, isDouble, isEditable, isInstantiable, isInteger, 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, removeSubclass, setAbstract, setName
Methods inherited from interface de.uni_trier.wi2.procake.data.PropertyHandler
addProperty, addProperty, getAllProperties, getAllPropertyNodes, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasProperties, removeProperty, setPropertyRootNode
-
Constructor Details
-
IntervalClassImpl
public IntervalClassImpl()Constructor for IntervalClassImpl.
-
-
Method Details
-
beSystemClass
protected void beSystemClass()beSystemClass.
- Overrides:
beSystemClass
in classAbstractDataClassImpl
-
checkFinishEditing
This method only checks if it is possible to finish the class and does not change any internal status. To initialize internal caches use the methodAbstractDataClassImpl.finishEditing()
.Sub classes are allowed to overwrite this method with own code but they must follow some instructions. It is very important to call the
AbstractDataClassImpl.checkFinishEditing()
method in the super class. This can be done before or after the own check methods. But it is advisable to implement the methods like inAbstractDataClassImpl.finishEditing()
where first the super class is called. For example:protected void checkFinishEditing() throws ClassHierarchyConsistencyException { super.checkFinishEditing(); // put your code here }
- Overrides:
checkFinishEditing
in classAbstractDataClassImpl
- Throws:
ClassHierarchyConsistencyException
- See Also:
-
createSystemSubClasses
protected void createSystemSubClasses()createSystemSubClasses.
- Specified by:
createSystemSubClasses
in classAbstractDataClassImpl
-
getElementClass
Receive the element class of the interval.An interval can only be specified for another
AtomicClass
. Additionally, theAtomicClass
must specify totally ordered instances.- Specified by:
getElementClass
in interfaceIntervalClass
- Returns:
- An
AtomicClass
with totally ordered instances.
-
setElementClass
Specify the element class of the interval.An interval can only be specified for another
AtomicClass
. Additionally, theAtomicClass
must specify totally ordered instances.- Specified by:
setElementClass
in interfaceIntervalClass
- Parameters:
elementClass
- AnAtomicClass
with totally ordered instances.- Throws:
IllegalEditException
-
includeClass
This method checks if the data class contains a reference to another data class.Some data classes contain other data classes. For example,
AggregateClass
es contain as attribute type other data classes orCollectionClass
es have one element type which is also a data class.To prevent an infinite loop, this method does not recursive navigates through all element classes. Only the element of the class are checked but not, if the elements include the given anotherClass.
- Specified by:
includeClass
in interfaceDataClass
- Overrides:
includeClass
in classAbstractDataClassImpl
- Parameters:
other
- The data class that has to be checked for references- Returns:
true
if the data class contains a reference to the giveanotherClass
.
-
isInterval
public boolean isInterval()isInterval.
- Specified by:
isInterval
in interfaceDataClass
- Overrides:
isInterval
in classAbstractDataClassImpl
- Returns:
true
if the data class can be casted toIntervalClass
-
newObject
Creates a newDataObject
and initialize it.DataObject
s can not be created directly because they depend on theDataClass
that defines the object.The creation of a new object is only be possible if
DataClass.checkInstantiability()
throws no exception.- Specified by:
newObject
in interfaceDataClass
- Overrides:
newObject
in classAbstractDataClassImpl
- Returns:
- a new
DataObject
- Throws:
IllegalInstantiationException
- is thrown if it is not possible to create an object this data class
-
getObjectClass
getObjectClass.
- Specified by:
getObjectClass
in interfaceDataClass
- Overrides:
getObjectClass
in classAbstractDataClassImpl
- Returns:
- Class of the corresponding data object
-