org.modelsphere.jack.baseDb.meta
Class MetaClass

java.lang.Object
  extended by org.modelsphere.jack.baseDb.meta.MetaClass

public final class MetaClass
extends java.lang.Object

The central concept of the meta package. Each DbObject instance is associated to a MetaClass (in a similar manner than any java.lang.Object is associated to a java.lang.Class).

MetaClass provides the following functionalities:

  • getGUIName(): returns the display name (singular or plural) of a meta class. The string is language-dependent.
  • getIcon(): returns the icon associated to a meta-class and used in the explorer.
  • getMetaFields(): returns the list all meta-fields.
  • getSuperMetaClass(): returns the meta-class from which it inherits.
  • getSubMetaClasses(): returns the list of meta-classes inheriting from this class.


    Field Summary
    static int ACCESS_CTL
               
    static int CLUSTER_ROOT
               
    static int MATCHABLE
               
    static int NAMING_ROOT
               
    static int NO_UDF
               
    static int UML_EXTENSIBILITY_FILTER
               
     
    Constructor Summary
    MetaClass(java.lang.String GUIName, java.lang.Class jClass, MetaField[] metaFields, int flags)
               
     
    Method Summary
     boolean compositeIsAllowed(MetaClass compositeMetaClass)
               
    static java.util.Enumeration enumMetaClasses()
               
     java.util.Enumeration enumMetaClassHierarchy(boolean leafOnly)
               
    static MetaClass find(java.lang.String className)
               
     MetaField[] getAllMetaFields()
              Returns the list all the meta-fields of this meta-class, and all its superclasses.
     MetaClass getCommonSuperMetaClass(MetaClass otherClass)
               
     MetaClass[] getComponentMetaClasses()
              Returns the list of meta-classes that can be components of this meta-class.
     MetaClass[] getComponentMetaClasses(boolean includeSuper, boolean leafOnly)
              Returns the components MetaClasses for this MetaClass.
     int getFlags()
               
     java.lang.String getGUIName()
               
     java.lang.String getGUIName(boolean plural)
               
     java.lang.String getGUIName(boolean plural, boolean withTargetSys)
              Returns the display name (singular or plural) of a meta class.
     javax.swing.Icon getIcon()
              Returns the icon associated to a meta-class and used in the explorer.
     java.lang.Class getJClass()
               
     int getLevel()
               
     MetaField getMetaField(java.lang.String name)
              Returns the meta-field that has this name.
     MetaField[] getMetaFields()
              Returns the list all the meta-fields of this meta-class.
    static int getNbMetaClasses()
               
     java.util.ArrayList getScreenMetaFields()
              Returns all the fields visible on a ScreenView, in the order specified by the method getScreenOrder() of each field.
     int getSeqNo()
               
     MetaClass[] getSubMetaClasses()
              Returns the list of meta-classes inheriting from this class.
     MetaClass getSuperMetaClass()
              Returns the meta-class from which it inherits.
    static void initMetaClasses()
               
     boolean isAssignableFrom(MetaClass metaClass)
               
     boolean[] markComponentsPaths(boolean leafOnly)
              Returns an array of booleans indicating the metaClasses (leaf) that may have as parent in the composition hierarchy.
     boolean[] markCompositePaths()
              Returns an array of booleans indicating the metaClasses that may have as descendant in the composition hierarchy.
    static boolean[] markCompositePaths(MetaClass[] mClasses)
              Return an array of booleans indicating the metaClasses that may have any of mClasses as descendant in the composition hierarchy.
     void setComponentMetaClasses(MetaClass[] componentMetaClasses)
               
     void setIcon(java.lang.String gifName)
               
     void setSuperMetaClass(MetaClass superMetaClass)
               
     java.lang.String toString()
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    ACCESS_CTL

    public static final int ACCESS_CTL
    See Also:
    Constant Field Values

    CLUSTER_ROOT

    public static final int CLUSTER_ROOT
    See Also:
    Constant Field Values

    NAMING_ROOT

    public static final int NAMING_ROOT
    See Also:
    Constant Field Values

    MATCHABLE

    public static final int MATCHABLE
    See Also:
    Constant Field Values

    NO_UDF

    public static final int NO_UDF
    See Also:
    Constant Field Values

    UML_EXTENSIBILITY_FILTER

    public static final int UML_EXTENSIBILITY_FILTER
    See Also:
    Constant Field Values
    Constructor Detail

    MetaClass

    public MetaClass(java.lang.String GUIName,
                     java.lang.Class jClass,
                     MetaField[] metaFields,
                     int flags)
    Method Detail

    initMetaClasses

    public static void initMetaClasses()

    find

    public static MetaClass find(java.lang.String className)

    enumMetaClasses

    public static java.util.Enumeration enumMetaClasses()

    getNbMetaClasses

    public static int getNbMetaClasses()

    getGUIName

    public final java.lang.String getGUIName()

    getGUIName

    public final java.lang.String getGUIName(boolean plural)

    getGUIName

    public final java.lang.String getGUIName(boolean plural,
                                             boolean withTargetSys)
    Returns the display name (singular or plural) of a meta class. The string is language-dependent.

    Parameters:
    plural - (optional, default false) if true, returns the plural form of the meta class name
    withTargetSys - (optional, default true) if true, concatenate the target system to the name
    Returns:

    getIcon

    public final javax.swing.Icon getIcon()
    Returns the icon associated to a meta-class and used in the explorer.

    Returns:
    the icon representing this meta class

    setIcon

    public final void setIcon(java.lang.String gifName)

    getSuperMetaClass

    public final MetaClass getSuperMetaClass()
    Returns the meta-class from which it inherits.

    Returns:
    the super-class, if any

    setSuperMetaClass

    public final void setSuperMetaClass(MetaClass superMetaClass)

    getSubMetaClasses

    public final MetaClass[] getSubMetaClasses()
    Returns the list of meta-classes inheriting from this class.

    Returns:
    the list (eventually empty) of subclasses.

    getComponentMetaClasses

    public final MetaClass[] getComponentMetaClasses()
    Returns the list of meta-classes that can be components of this meta-class.

    Returns:
    the list (eventually empty) of subclasses.

    setComponentMetaClasses

    public final void setComponentMetaClasses(MetaClass[] componentMetaClasses)

    getJClass

    public final java.lang.Class getJClass()

    getMetaFields

    public final MetaField[] getMetaFields()
    Returns the list all the meta-fields of this meta-class. This includes meta-relationships.

    Returns:
    the list of meta-fields defined on this meta-class

    getAllMetaFields

    public final MetaField[] getAllMetaFields()
    Returns the list all the meta-fields of this meta-class, and all its superclasses. This includes meta-relationships.

    Returns:
    the list of meta-fields defined on this meta-class

    getMetaField

    public final MetaField getMetaField(java.lang.String name)
    Returns the meta-field that has this name.

    Returns:
    the meta-field, null if no meta-field has this name.

    getLevel

    public final int getLevel()

    getSeqNo

    public final int getSeqNo()

    getFlags

    public final int getFlags()

    toString

    public final java.lang.String toString()
    Overrides:
    toString in class java.lang.Object

    getCommonSuperMetaClass

    public final MetaClass getCommonSuperMetaClass(MetaClass otherClass)

    isAssignableFrom

    public final boolean isAssignableFrom(MetaClass metaClass)

    enumMetaClassHierarchy

    public final java.util.Enumeration enumMetaClassHierarchy(boolean leafOnly)

    compositeIsAllowed

    public final boolean compositeIsAllowed(MetaClass compositeMetaClass)

    markCompositePaths

    public final boolean[] markCompositePaths()
    Returns an array of booleans indicating the metaClasses that may have as descendant in the composition hierarchy.


    markCompositePaths

    public static boolean[] markCompositePaths(MetaClass[] mClasses)
    Return an array of booleans indicating the metaClasses that may have any of mClasses as descendant in the composition hierarchy.


    markComponentsPaths

    public final boolean[] markComponentsPaths(boolean leafOnly)
    Returns an array of booleans indicating the metaClasses (leaf) that may have as parent in the composition hierarchy.


    getComponentMetaClasses

    public final MetaClass[] getComponentMetaClasses(boolean includeSuper,
                                                     boolean leafOnly)
    Returns the components MetaClasses for this MetaClass.


    getScreenMetaFields

    public final java.util.ArrayList getScreenMetaFields()
    Returns all the fields visible on a ScreenView, in the order specified by the method getScreenOrder() of each field.



    Open ModelSphere 2007. All Rights Reserved.