Class IntervalClassImpl
- java.lang.Object
-
- de.uni_trier.wi2.procake.data.model.impl.AbstractDataClassImpl
-
- de.uni_trier.wi2.procake.data.model.base.impl.IntervalClassImpl
-
- All Implemented Interfaces:
IntervalClass,DataClass,PropertyHandler
public class IntervalClassImpl extends AbstractDataClassImpl implements IntervalClass
IntervalClassImpl class.
- Author:
- Rainer Maximini
-
-
Field Summary
-
Fields inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
CLASS_NAME, COMPONENT, COMPONENT_KEY, 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, COMPONENT, COMPONENT_KEY, LOG_INCONSISTENT_ELEMENTCLASS, LOG_MISSING_ELEMENTCLASS, LOG_MISSING_TOTALLY_ORDERED_ELEMENT
-
-
Constructor Summary
Constructors Constructor Description IntervalClassImpl()Constructor for IntervalClassImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbeSystemClass()beSystemClass.voidcheckFinishEditing()This method only checks if it is possible to finish the class and does not change any internal status.protected voidcreateSystemSubClasses()createSystemSubClasses.AtomicClassgetElementClass()Receive the element class of the interval.Class<? extends DataObject>getObjectClass()getObjectClass.booleanincludeClass(DataClass other)This method checks if the data class contains a reference to another data class.booleanisInterval()isInterval.DataObjectnewObject()Creates a newDataObjectand initialize it.voidsetElementClass(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, 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
-
-
-
-
Method Detail
-
beSystemClass
protected void beSystemClass()
beSystemClass.
- Overrides:
beSystemClassin classAbstractDataClassImpl
-
checkFinishEditing
public void checkFinishEditing() throws ClassHierarchyConsistencyExceptionThis 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:
checkFinishEditingin classAbstractDataClassImpl- Throws:
ClassHierarchyConsistencyException- See Also:
AbstractDataClassImpl.finishEditing()
-
createSystemSubClasses
protected void createSystemSubClasses()
createSystemSubClasses.
- Specified by:
createSystemSubClassesin classAbstractDataClassImpl
-
getElementClass
public AtomicClass getElementClass()
Receive the element class of the interval.An interval can only be specified for another
AtomicClass. Additionally, theAtomicClassmust specify totally ordered instances.- Specified by:
getElementClassin interfaceIntervalClass- Returns:
- An
AtomicClasswith totally ordered instances.
-
setElementClass
public void setElementClass(AtomicClass elementClass) throws IllegalEditException
Specify the element class of the interval.An interval can only be specified for another
AtomicClass. Additionally, theAtomicClassmust specify totally ordered instances.- Specified by:
setElementClassin interfaceIntervalClass- Parameters:
elementClass- AnAtomicClasswith totally ordered instances.- Throws:
IllegalEditException
-
includeClass
public boolean includeClass(DataClass other)
This method checks if the data class contains a reference to another data class.Some data classes contain other data classes. For example,
AggregateClasses contain as attribute type other data classes orCollectionClasses 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:
includeClassin interfaceDataClass- Overrides:
includeClassin classAbstractDataClassImpl- Parameters:
other- The data class that has to be checked for references- Returns:
trueif the data class contains a reference to the giveanotherClass.
-
isInterval
public boolean isInterval()
isInterval.
- Specified by:
isIntervalin interfaceDataClass- Overrides:
isIntervalin classAbstractDataClassImpl- Returns:
trueif the data class can be casted toIntervalClass
-
newObject
public DataObject newObject() throws IllegalInstantiationException
Creates a newDataObjectand initialize it.DataObjects can not be created directly because they depend on theDataClassthat defines the object.The creation of a new object is only be possible if
DataClass.checkInstantiability()throws no exception.- Specified by:
newObjectin interfaceDataClass- Overrides:
newObjectin classAbstractDataClassImpl- Returns:
- a new
DataObject - Throws:
IllegalInstantiationException- is thrown if it is not possible to create an object this data class
-
getObjectClass
public Class<? extends DataObject> getObjectClass()
getObjectClass.
- Specified by:
getObjectClassin interfaceDataClass- Overrides:
getObjectClassin classAbstractDataClassImpl- Returns:
- Class of the corresponding data object
-
-