Interface DataClass

All Superinterfaces:
PropertyHandler
All Known Subinterfaces:
AbstractWorkflowItemClass, AggregateClass, AtomicClass, BooleanClass, ByteArrayClass, ChronologicClass, CollectionClass, ControlflowItemClass, DataflowWrapperClass, DataReferenceClass, DateClass, DoubleClass, IntegerClass, IntervalClass, ListClass, NESTAndEndNodeClass, NESTAndStartNodeClass, NESTConstraintEdgeClass, NESTControlflowEdgeClass, NESTControlflowNodeClass, NESTDataflowEdgeClass, NESTDataNodeClass, NESTEdgeClass, NESTGraphClass, NESTGraphItemClass, NESTLoopEndNodeClass, NESTLoopStartNodeClass, NESTNodeClass, NESTOrEndNodeClass, NESTOrStartNodeClass, NESTPartOfEdgeClass, NESTSequenceNodeClass, NESTSequentialWorkflowClass, NESTSubWorkflowNodeClass, NESTTaskNodeClass, NESTWorkflowClass, NESTWorkflowNodeClass, NESTXorEndNodeClass, NESTXorStartNodeClass, NodeClass, NumericClass, ParentItemClass, SequenceClass, SetClass, StatusableClass, StringClass, SubWorkflowClass, TaskClass, TimeClass, TimestampClass, UnionClass, URIClass, VoidClass, WorkflowClass
All Known Implementing Classes:
AbstractDataClassImpl, AbstractWorkflowItemClassImpl, AggregateClassImpl, AtomicClassImpl, BooleanClassImpl, ByteArrayClassImpl, ChronologicClassImpl, CollectionClassImpl, ControlflowItemClassImpl, DataClassImpl, DataflowWrapperClassImpl, DataReferenceClassImpl, DateClassImpl, DoubleClassImpl, IntegerClassImpl, IntervalClassImpl, ListClassImpl, NESTAndEndNodeClassImpl, NESTAndStartNodeClassImpl, NESTConstraintEdgeClassImpl, NESTControlflowEdgeClassImpl, NESTControlflowNodeClassImpl, NESTDataflowEdgeClassImpl, NESTDataNodeClassImpl, NESTEdgeClassImpl, NESTGraphClassImpl, NESTGraphItemClassImpl, NESTLoopEndNodeClassImpl, NESTLoopStartNodeClassImpl, NESTNodeClassImpl, NESTOrEndNodeClassImpl, NESTOrStartNodeClassImpl, NESTPartOfEdgeClassImpl, NESTSequenceNodeClassImpl, NESTSequentialWorkflowClassImpl, NESTSubWorkflowNodeClassImpl, NESTTaskNodeClassImpl, NESTWorkflowClassImpl, NESTWorkflowNodeClassImpl, NESTXorEndNodeClassImpl, NESTXorStartNodeClassImpl, NodeClassImpl, NumericClassImpl, ParentItemClassImpl, SequenceClassImpl, SetClassImpl, StatusableClassImpl, StringClassImpl, SubWorkflowClassImpl, TaskClassImpl, TimeClassImpl, TimeStampClassImpl, UnionClassImpl, URIClassImpl, VoidClassImpl, WorkflowClassImpl

public interface DataClass extends PropertyHandler

DataClass

The DataClass is the root of all classes in the data model.

Some Constraints

  • Subclasses can only be declared as finish if all superclasses are not editable.
  • The name must be unique in the Model
Author:
rmaximi
  • Field Details

  • Method Details

    • checkInstantiability

      void checkInstantiability() throws IllegalInstantiationException
      This method checks if the data class can be instantiated.
      Throws:
      IllegalInstantiationException
    • createSubclass

      This method creates none system sub classes that are defined by the user. It is not possible to create sub-classes for abstract system classes. In that case a IllegalInstantiationException will be thrown.

      Each data class has a unique name. This name must be given to this method. If the name already exists, a NameAlreadyExistsException will be thrown. The name can be used to access the data class from the data model by using the method Model.getClass(String).

      The class is automatically added to the model. To remove the class again you must use the method Model.removeClass(String).

      Parameters:
      name - The uniqe name of the new sub class.
      Returns:
      The new sub class.
      Throws:
      IllegalInstantiationException
      NameAlreadyExistsException
      See Also:
    • addSubclass

      void addSubclass(DataClass subclass)
      Adds a givenn subclass to the subclassList.
      Parameters:
      subclass - The subclass which gets added to the subclassList
    • removeSubclass

      void removeSubclass(DataClass subclass)
      Removes a subclass from the subclassList.
      Parameters:
      subclass - The subclass which gets removed from the subclassList
    • finishEditing

      void finishEditing() throws ClassHierarchyConsistencyException
      To instantiate classes it is necessary to know if the class can be edited further. Only finished classes can be instantiated. Therefore, it is necessary to call this method to tell the system that the class is ready defined. Nevertheless, finishing a class can fail because of an inconsistency in the class hierarchy. One of the superclasses is not consistence with this class.
      Throws:
      ClassHierarchyConsistencyException - if any.
    • getModel

      Model getModel()
      Each data class knows the Model to that the class belongs.
      Returns:
      The Model of the data class.
    • getName

      String getName()
      Each data class has a name that must be unique in the Model.
      Returns:
      the unique name of the data class
    • getSystemClassName

      String getSystemClassName()
      Each data class belongs to a system class with a unique name.
      Returns:
      the unique system class name
    • getSubClasses

      List<DataClass> getSubClasses()
      This methods returns an array of all direct sub classes of this class. This does not include system classes or sub sub classes and so on. Only the direct ones.
      Returns:
      An array of sub classes for this DataClasses or an empty array but never null.
    • getSuperClass

      DataClass getSuperClass()
      Each data class has a super class from that the class is inherited. This class can be get with this method. If this method is used on the root data class null will be returned.
      Returns:
      The parent class or super class of this class or null if this class is the root class.
    • getSuperClasses

      DataClass[] getSuperClasses()
      Sometimes it can be necessary to have the inheritance hierarchy of the class. This hierarchy can be accessed with this method.
      Returns:
      All super classes in the class hierarchy including the system super classes.
    • getSystemSuperClass

      DataClass getSystemSuperClass()
      Instead of receiving the super class of this class ( getSuperClass()) this class returns the first super class in the class hierarchy that is a system class.
      Returns:
      The first system super class in the class hierarchy.
    • includeClass

      boolean includeClass(DataClass anotherClass)
      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 or CollectionClasses 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.

      Parameters:
      anotherClass - The data class that has to be checked for references
      Returns:
      true if the data class contains a reference to the give anotherClass.
    • isAbstract

      boolean isAbstract()

      isAbstract.

      Returns:
      true if the class is abstract and can not be instantiated
    • setAbstract

      void setAbstract(boolean value) throws IllegalEditException
      It is possible to model abstract user classes. The default is that a user class is not abstract. But in special cases it can be useful to change this behavior.
      Parameters:
      value - true if the user class should be an abstract class.
      Throws:
      IllegalEditException - if any.
    • isAggregate

      boolean isAggregate()

      isAggregate.

      Returns:
      true if the data class can be casted to AggregateClass
    • isAtomic

      boolean isAtomic()

      isAtomic.

      Returns:
      true if the data class can be casted to AtomicClass
    • isBoolean

      boolean isBoolean()

      isBoolean.

      Returns:
      true if the data class can be casted to BooleanClass
    • isByteArray

      boolean isByteArray()

      isByteArray.

      Returns:
      true if the data class can be casted to ByteArrayClass
    • isChronologic

      boolean isChronologic()

      isChronologic.

      Returns:
      true if the data class can be casted to ChronologicClass
    • isCollection

      boolean isCollection()

      isCollection.

      Returns:
      true if the data class can be casted to CollectionClass
    • isDate

      boolean isDate()

      isDate.

      Returns:
      true if the data class can be casted to DateClass
    • isDouble

      boolean isDouble()

      isDouble.

      Returns:
      true if the data class can be casted to DoubleClass
    • isEditable

      boolean isEditable()

      isEditable.

      Returns:
      true if the class can be edited
    • isInstantiable

      boolean isInstantiable()
      To instantiate a class it is not allowed that the class is editable or abstract. Some system classes are also not instantiable
      Returns:
      true if this class can be instantiated.
    • isInteger

      boolean isInteger()

      isInteger.

      Returns:
      true if the data class can be casted to IntegerClass
    • isInterval

      boolean isInterval()

      isInterval.

      Returns:
      true if the data class can be casted to IntervalClass
    • isList

      boolean isList()

      isList.

      Returns:
      true if the data class can be casted to ListClass
    • isNumeric

      boolean isNumeric()

      isNumeric.

      Returns:
      true if the data class can be casted to NumericClass
    • isURI

      boolean isURI()

      isURI.

      Returns:
      true if the data class can be casted to URIClass
    • isSet

      boolean isSet()

      isSet.

      Returns:
      true if the data class can be casted to SetClass
    • isString

      boolean isString()

      isString.

      Returns:
      true if the data class can be casted to StringClass
    • isSubclassOf

      boolean isSubclassOf(DataClass anotherClass)
      Checks if this class is inherited from anotherClass or from a sub class of anotherClass.
      Parameters:
      anotherClass - a DataClass object
      Returns:
      true if this class is a subclass of anotherClass
    • isSystemClass

      boolean isSystemClass()

      isSystemClass.

      Returns:
      true if this class is a system class.
    • isTime

      boolean isTime()

      isTime.

      Returns:
      true if the data class can be casted to TimeClass
    • isTimestamp

      boolean isTimestamp()

      isTimestamp.

      Returns:
      true if the data class can be casted to TimestampClass
    • isUnion

      boolean isUnion()

      isUnion.

      Returns:
      true if the data class can be casted to UnionClass
    • isVoid

      boolean isVoid()

      isVoid.

      Returns:
      true if the data class can be casted to VoidClass
    • isTask

      boolean isTask()

      isTask.

      Returns:
      true if the data class can be casted to TaskClass
    • isWorkflowItem

      boolean isWorkflowItem()

      isWorkflowItem.

      Returns:
      true if the data class can be casted to AbstractWorkflowItemClass
    • isSubWorkflow

      boolean isSubWorkflow()

      isSubWorkflow.

      Returns:
      true if the data class can be casted to SubWorkflowClass
    • isControlflowItem

      boolean isControlflowItem()

      isControlflowItem.

      Returns:
      true if the data class can be casted to ControlflowItemClass
    • isParentItem

      boolean isParentItem()

      isParentItem.

      Returns:
      true if the data class can be casted to ParentItemClass
    • isWorkflow

      boolean isWorkflow()

      isWorkflow.

      Returns:
      true if the data class can be casted to WorkflowClass
    • isSequence

      boolean isSequence()

      isSequence.

      Returns:
      true if the data class can be casted to SequenceClass
    • isNode

      boolean isNode()

      isNode.

      Returns:
      true if the data class can be casted to NodeClass
    • isDataflowWrapper

      boolean isDataflowWrapper()

      isDataflowWrapper.

      Returns:
      true if the data class can be casted to DataflowWrapperClass
    • isNESTNode

      boolean isNESTNode()

      isNESTNode.

      Returns:
      true if the data class can be casted to NESTNodeClass
    • isNESTEdge

      boolean isNESTEdge()

      isNESTEdge.

      Returns:
      true if the data class can be casted to NESTEdgeClass
    • isNESTGraph

      boolean isNESTGraph()

      isNESTGraph.

      Returns:
      true if the data class can be casted to NESTGraphClass
    • isNESTSequentialWorkflow

      boolean isNESTSequentialWorkflow()

      isNESTSequentialWorkflow.

      Returns:
      true if the data class can be casted to NESTSequentialWorkflowClass
    • isNESTWorkflow

      boolean isNESTWorkflow()

      isNESTWorkflow.

      Returns:
      true if the data class can be casted to NESTWorkflowClass
    • isNESTGraphItem

      boolean isNESTGraphItem()

      isNESTGraphItem.

      Returns:
      true if the data class can be casted to NESTGraphItemClass
    • isNESTConstraintEdge

      boolean isNESTConstraintEdge()

      isNESTConstraintEdge.

      Returns:
      true if the data class can be casted to NESTConstraintEdgeClass
    • isNESTControlflowEdge

      boolean isNESTControlflowEdge()

      isNESTControlflowEdge.

      Returns:
      true if the data class can be casted to NESTControlflowEdgeClass
    • isNESTControlflowNode

      boolean isNESTControlflowNode()

      isNESTControlflowNode.

      Returns:
      true if the data class can be casted to NESTControlflowNodeClass
    • isNESTDataflowEdge

      boolean isNESTDataflowEdge()

      isNESTDataflowEdge.

      Returns:
      true if the data class can be casted to NESTDataflowEdgeClass
    • isNESTDataNode

      boolean isNESTDataNode()

      isNESTDataNode.

      Returns:
      true if the data class can be casted to NESTDataNodeClass
    • isNESTPartOfEdge

      boolean isNESTPartOfEdge()

      isNESTPartOfEdge.

      Returns:
      true if the data class can be casted to NESTPartOfEdgeClass
    • isNESTTaskNode

      boolean isNESTTaskNode()

      isNESTTaskNode.

      Returns:
      true if the data class can be casted to NESTTaskNodeClass
    • isNESTSequenceNode

      boolean isNESTSequenceNode()

      isNESTSequenceNode.

      Returns:
      true if the data class can be casted to NESTTaskNodeClass or NESTControlflowNodeClass
    • isCake2DataReference

      boolean isCake2DataReference()

      isCake2DataReference.

      Returns:
      true if the data class can be casted to DataReferenceClass
    • isNESTWorkflowNode

      boolean isNESTWorkflowNode()

      isNESTWorkflowNode.

      Returns:
      true if the data class can be casted to NESTWorkflowNodeClass
    • isNESTSubWorkflowNode

      boolean isNESTSubWorkflowNode()

      isNESTSubWorkflowNode.

      Returns:
      true if the data class can be casted to NESTSubWorkflowNodeClass
    • newObject

      Creates a new DataObject and initialize it. DataObjects can not be created directly because they depend on the DataClass that defines the object.

      The creation of a new object is only be possible if checkInstantiability() throws no exception.

      Returns:
      a new DataObject
      Throws:
      IllegalInstantiationException - is thrown if it is not possible to create an object this data class
    • getObjectClass

      Class<? extends DataObject> getObjectClass()

      getObjectClass.

      Returns:
      Class of the corresponding data object
    • setName

      The name of a data class must be unique in the data model. If this is not the case, the NameAlreadyExistsException will be thrown. To rename the data class tthis method can be used, too.
      Parameters:
      name - A unique name of the data class.
      Returns:
      The name of the class.
      Throws:
      IllegalEditException
      NameAlreadyExistsException