Interface Model

  • All Known Implementing Classes:

    public interface Model
    The Model is the container of all DataClasses.

    Each DataClass belongs to exact one Model and each Model contains a unique list of DataClasses.

    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 DataClasses with the same name in the system. But they must belong to different Models.

    New DataClasses 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).

    Rainer Maximini
    See Also:
    • Method Detail

      • getAtomicSystemClass

        AtomicClass getAtomicSystemClass()
      • getBooleanSystemClass

        BooleanClass getBooleanSystemClass()
      • getClass

        <T extends DataClass> T getClass​(String className)
        Searches in the Model for a DataClass with the name className.
        className - The name of the DataClass
        The DataClass with the given name or null if no data class with the given name exists.
      • getClasses

        List<DataClass> getClasses()
        A list of all DataClasses of the Model. This includes the system as well as the user classes.
      • getDefinedClasses

        Set<String> getDefinedClasses()
        A list of all defined DataClasses of the Model. This includes only classes defined in the Model.
      • getDataSystemClass

        DataClass getDataSystemClass()
      • getDateSystemClass

        DateClass getDateSystemClass()
      • getDoubleSystemClass

        DoubleClass getDoubleSystemClass()
      • getIntegerSystemClass

        IntegerClass getIntegerSystemClass()
      • getListSystemClass

        ListClass getListSystemClass()
      • getNumericSystemClass

        NumericClass getNumericSystemClass()
      • getURISystemClass

        URIClass getURISystemClass()
      • getSetSystemClass

        SetClass getSetSystemClass()
      • getStringSystemClass

        StringClass getStringSystemClass()
      • getTimeSystemClass

        TimeClass getTimeSystemClass()
      • getUnionSystemClass

        UnionClass getUnionSystemClass()
      • getVoidSystemClass

        VoidClass getVoidSystemClass()
      • overwriteMatchingDataClasses

        void overwriteMatchingDataClasses​(Model other)
        Another data Model can be provided and all of the containing DataClasses matching the current class hierarchy will be reused in this Model, i.e. references of the DataClasses will be replaced and merged into the hierarchy including subClassLists and superclass references.
        other -
      • 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.
        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.
        The requested class
      • createObject

        <T extends DataObject> T createObject​(String name)
        Creates the CAKE I - object defined with the given parameters. Weakly typed return (you have to cast for yourself)
        Type Parameters:
        T -
        name - The internal name of the CAKE-class to instantiate.
        A new instantiated object.
      • addDefinedClassReference

        void addDefinedClassReference​(String className)
        className -