Interface Model
- All Known Implementing Classes:
ModelImpl
Model
is the container of all DataClass
es.
Each DataClass
belongs to exact one Model
and each Model contains a
unique list of DataClass
es.
The Model provides several methods (getXSystemClass()
) to access the system
classes directly. To receive an arbitrary class use the method getClass(String)
. The
name of the system classes can be accessed by the constant CLASS_NAME
that is
defined in each DataClass
, e.g. IntegerClass.CLASS_NAME
.
Conceptually, the Model can be interpreted as the namespace of a DataClass
. It is
possible to have several DataClass
es with the same name in the system. But they must
belong to different Models.
New DataClass
es can be created by using the method DataClass.createSubclass(String)
. The new data class will be automatically added to the Model.
To remove a data class use the method removeClass(String)
.
- Author:
- Rainer Maximini
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a class to the loaded classes.void
addDefinedClassReference
(String className) <TCakeDataClass extends DataClass,
TCakeDataObject extends DataObject>
TCakeDataObjectcreateObject
(Class<TCakeDataClass> clazz1, Class<TCakeDataObject> clazz2, String className) Creates the CAKE I - object defined with the given parameters.<T extends DataObject>
TcreateObject
(String name) Creates the CAKE I - object defined with the given parameters.<T extends DataClass>
TSearches in the Model for aDataClass
with the nameclassName
.void
Another data Model can be provided and all of the containingDataClass
es matching the current class hierarchy will be reused in this Model, i.e.void
removeClass
(String className) Removes aDataClass
from the Model.
-
Field Details
-
LOG_CANNOT_REMOVE_CLASS_WITH_SUBCLASSES
- See Also:
-
LOG_CANNOT_REMOVE_SYSTEM_CLASS
- See Also:
-
LOG_CANNOT_RENAME_SYSTEM_CLASS
- See Also:
-
LOG_CLASS_NAME_ALREADY_EXIST
- See Also:
-
LOG_CLASSNAME_NOT_FOUND
- See Also:
-
LOG_CREATE_SYSTEMCLASSTREE
- See Also:
-
LOG_ROOT_CLASS_INSTANTIATION
- See Also:
-
LOG_OBJECT_INSTANTIATION
- See Also:
-
-
Method Details
-
getAggregateSystemClass
AggregateClass getAggregateSystemClass() -
getAtomicSystemClass
AtomicClass getAtomicSystemClass() -
getBooleanSystemClass
BooleanClass getBooleanSystemClass() -
getByteArraySystemClass
ByteArrayClass getByteArraySystemClass() -
getChronologicSystemClass
ChronologicClass getChronologicSystemClass() -
getClass
Searches in the Model for aDataClass
with the nameclassName
. -
getClasses
- Returns:
- A list of all
DataClass
es of the Model. This includes the system as well as the user classes.
-
getDefinedClasses
- Returns:
- A list of all defined
DataClass
es of the Model. This includes only classes defined in the Model.
-
getCollectionSystemClass
CollectionClass getCollectionSystemClass() -
getDataSystemClass
DataClass getDataSystemClass() -
getDateSystemClass
DateClass getDateSystemClass() -
getDoubleSystemClass
DoubleClass getDoubleSystemClass() -
getIntegerSystemClass
IntegerClass getIntegerSystemClass() -
getIntervalSystemClass
IntervalClass getIntervalSystemClass() -
getListSystemClass
ListClass getListSystemClass() -
getNumericSystemClass
NumericClass getNumericSystemClass() -
getURISystemClass
URIClass getURISystemClass() -
getRootClass
DataClassImpl getRootClass() -
getSetSystemClass
SetClass getSetSystemClass() -
getStringSystemClass
StringClass getStringSystemClass() -
getTimestampSystemClass
TimestampClass getTimestampSystemClass() -
getTimeSystemClass
TimeClass getTimeSystemClass() -
getUnionSystemClass
UnionClass getUnionSystemClass() -
getVoidSystemClass
VoidClass getVoidSystemClass() -
getWorkflowClass
WorkflowClass getWorkflowClass() -
getSubWorkflowClass
SubWorkflowClass getSubWorkflowClass() -
getDataflowWrapperClass
DataflowWrapperClass getDataflowWrapperClass() -
getTaskClass
TaskClass getTaskClass() -
getNodeClass
NodeClass getNodeClass() -
getSequenceClass
SequenceClass getSequenceClass() -
getNESTGraphClass
NESTGraphClass getNESTGraphClass() -
getNESTSequentialWorkflowClass
NESTSequentialWorkflowClass getNESTSequentialWorkflowClass() -
getNESTWorkflowClass
NESTWorkflowClass getNESTWorkflowClass() -
getNESTNodeClass
NESTNodeClass getNESTNodeClass() -
getNESTGraphItemClass
NESTGraphItemClass getNESTGraphItemClass() -
getNESTControlflowNodeClass
NESTControlflowNodeClass getNESTControlflowNodeClass() -
getNESTAndEndNodeClass
NESTAndEndNodeClass getNESTAndEndNodeClass() -
getNESTAndStartNodeClass
NESTAndStartNodeClass getNESTAndStartNodeClass() -
getNESTLoopStartNodeClass
NESTLoopStartNodeClass getNESTLoopStartNodeClass() -
getNESTLoopEndNodeClass
NESTLoopEndNodeClass getNESTLoopEndNodeClass() -
getNESTOrEndNodeClass
NESTOrEndNodeClass getNESTOrEndNodeClass() -
getNESTOrStartNodeClass
NESTOrStartNodeClass getNESTOrStartNodeClass() -
getNESTXorEndNodeClass
NESTXorEndNodeClass getNESTXorEndNodeClass() -
getNESTXorStartNodeClass
NESTXorStartNodeClass getNESTXorStartNodeClass() -
getNESTTaskNodeClass
NESTTaskNodeClass getNESTTaskNodeClass() -
getNESTDataNodeClass
NESTDataNodeClass getNESTDataNodeClass() -
getNESTWorkflowNodeClass
NESTWorkflowNodeClass getNESTWorkflowNodeClass() -
getNESTSubWorkflowNodeClass
NESTSubWorkflowNodeClass getNESTSubWorkflowNodeClass() -
getNESTEdgeClass
NESTEdgeClass getNESTEdgeClass() -
getNESTControlflowEdgeClass
NESTControlflowEdgeClass getNESTControlflowEdgeClass() -
getNESTConstraintEdgeClass
NESTConstraintEdgeClass getNESTConstraintEdgeClass() -
getNESTDataflowEdgeClass
NESTDataflowEdgeClass getNESTDataflowEdgeClass() -
getNESTPartOfEdgeClass
NESTPartOfEdgeClass getNESTPartOfEdgeClass() -
overwriteMatchingDataClasses
Another data Model can be provided and all of the containingDataClass
es matching the current class hierarchy will be reused in this Model, i.e. references of theDataClass
es will be replaced and merged into the hierarchy including subClassLists and superclass references.- Parameters:
other
-
-
removeClass
Removes aDataClass
from the Model. After removing, theDataClass
cannot be used any more. Reading is not possible.The
DataClass
can only be removed if no references to this class exists. For example, If the class has sub-classes or is used by anAggregateClass
in an attribute anIllegalEditException
will be thrown.- Parameters:
className
- The name of theDataClass
that should be removed from the Model.- Throws:
IllegalEditException
- is thrown if a reference from another class exists
-
addClass
Adds a class to the loaded classes. This might be useful if classes need to be added at runtime.- Parameters:
clazz
- an instance ofDataClass
that should be added to the list of classes- Throws:
NameAlreadyExistsException
- if this class name already exists
-
createObject
<TCakeDataClass extends DataClass,TCakeDataObject extends DataObject> TCakeDataObject createObject(Class<TCakeDataClass> clazz1, Class<TCakeDataObject> clazz2, String className) throws ClassNotFoundException Creates the CAKE I - object defined with the given parameters. Strongly typed return.- Type Parameters:
TCakeDataClass
- The CAKE1-DataClass, which should be used for instantiating the CAKE1-DataObject.TCakeDataObject
- The CAKE1-DataObject, which should be returned by this method.- Parameters:
clazz1
- The CAKE1-DataClass, which should be used for instantiating the CAKE1-DataObject.clazz2
- The CAKE1-DataObject, which should be returned by this method.className
- The name of the CAKE1-class, which should be instantiated. This parameters is redundant to clazz1/clazz2 because they already pindown a specific class/object to instantiate, but due to lack of time we leave it this way.- Returns:
- The requested class
- Throws:
ClassNotFoundException
-
createObject
Creates the CAKE I - object defined with the given parameters. Weakly typed return (you have to cast for yourself)- Type Parameters:
T
-- Parameters:
name
- The internal name of the CAKE-class to instantiate.- Returns:
- A new instantiated object.
-
addDefinedClassReference
- Parameters:
className
-
-