org.objectweb.jorm.metainfo.api
Interface Schema

All Superinterfaces:
MetaObject, java.io.Serializable

public interface Schema
extends MetaObject

Schema object defines an object able to gather a set of classes. It is a similar approach to the package keyword from java.

Author:
X. Spengler

Method Summary
 void addClass(Class aClass)
          Adds an existing Class to the current Schema
 void addCompositeName(CompositeName composite)
          Adds an existing CompositeName to the current Schema
 Class createClass(java.lang.String className, boolean isAbstract)
          Returns a new Class created with a class name.
 CompositeName createCompositeName(java.lang.String CN_Name)
          Returns a new compositename identified by its name.
 GenClass createGenClass(java.lang.String genClassName, boolean isAbstract)
          Returns a new GenClass created with a generic class name.
 Class createHiddenClass(java.lang.String className, boolean isAbstract)
          Returns a new Class created with a class name.
 CompositeName createHiddenCompositeName(java.lang.String cn_Name)
          Returns a new compositename created with its name.
 Class getClass(java.lang.String className)
          Returns a Class created with a class name.
 CompositeName getCompositeName(java.lang.String cn_Name)
          Returns a compositename identified with its name.
 GenClass getGenClass(java.lang.String genClassName)
          Returns a GenClass created with a generic class name.
 Class getHiddenClass(java.lang.String className)
          Returns an hidden class.
 CompositeName getHiddenCompositeName(java.lang.String cn_Name)
          Returns an hidden compositename.
 java.lang.String getName()
          Returns the name of the schema.
 java.util.Iterator iterateClass()
          Allows to know all the registered classes into the current schema.
 java.util.Iterator iterateCompositeName()
          Allows to know all the registered compositename into the current schema.
 java.util.Iterator iterateGenClass()
          Allows to know all the registered generic classes into the current schema.
 java.util.Iterator iterateHiddenClass()
          Allows to know all the not yet completly registered classes into the current schema.
 java.util.Iterator iterateHiddenCompositeName()
          Allows to know all the not yet completly registered compositename into the current schema.
 void moveHiddenToClass(java.lang.String className)
          Moves an hidden class to a known class.
 void moveHiddenToCompositeName(java.lang.String cn_Name)
          Moves an hidden compositename to a known compositename.
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the schema.
Returns:
the string representation of the name of the schema. Null is returned if there is no schema name else a not empty dotted string.

getClass

public Class getClass(java.lang.String className)
Returns a Class created with a class name.
Parameters:
className - the string representation of the class name
Returns:
a Class corresponding to its name. If the Class does not exist, null is returned.

getHiddenClass

public Class getHiddenClass(java.lang.String className)
Returns an hidden class. An Hidden class is a class which is not yet totally defined. If the class is not found into the current schema, null is returned.
Parameters:
className - the name of the class to search
Returns:
the Class object corresponding to its name or null if not present in the current structure

moveHiddenToClass

public void moveHiddenToClass(java.lang.String className)
Moves an hidden class to a known class. A known class is known when it is defined in an XML description file.
Parameters:
className - the name of the class to move

createClass

public Class createClass(java.lang.String className,
                         boolean isAbstract)
Returns a new Class created with a class name. The MetaObject is added to the list of classes managed by the current schema. An isAbstract boolean is defined to know if the current class is an abstract class or not.
Parameters:
className - the string representation of the class name
isAbstract - true, if the current class is an abstract class, else false, if the current class is not an abstract class
Returns:
a Class corresponding to the created class and registered, or an existing one if already defined

addClass

public void addClass(Class aClass)
Adds an existing Class to the current Schema
Parameters:
aClass - the Class object to add

addCompositeName

public void addCompositeName(CompositeName composite)
Adds an existing CompositeName to the current Schema
Parameters:
composite - the CompositeName object to add

createHiddenClass

public Class createHiddenClass(java.lang.String className,
                               boolean isAbstract)
Returns a new Class created with a class name. The MetaObject is added to the list of unknown classes managed by the current schema. An isAbstract boolean is defined to know if the current class is an abstract class or not.
Parameters:
className - the string representation of the class name
isAbstract - true, if the current class is an abstract class, else false, if the current class is not an abstract class
Returns:
a Class corresponding to the created class and registered, or an existing one if already defined

getGenClass

public GenClass getGenClass(java.lang.String genClassName)
Returns a GenClass created with a generic class name.
Parameters:
genClassName - the string representation of the generic class name
Returns:
a GenClass corresponding to its name. If the GenClass does not exist, null is returned.

createGenClass

public GenClass createGenClass(java.lang.String genClassName,
                               boolean isAbstract)
Returns a new GenClass created with a generic class name. The MetaObject is added to the list of generic classes managed by the current schema. If the generic class already exists, it is returned.
Parameters:
genClassName - the string representation of the generic class name
isAbstract - true, if the generic class is abstract, else false, if the generic class is not abstract
Returns:
a GenClass corresponding to the created generic class and registered, or an existing one if already defined

iterateClass

public java.util.Iterator iterateClass()
Allows to know all the registered classes into the current schema. This method returns an iterator on Class object.
Returns:
an iterator for Class object. If there is no class, an empty iterator is returned.

iterateGenClass

public java.util.Iterator iterateGenClass()
Allows to know all the registered generic classes into the current schema. This method returns an iterator on GenClass object.
Returns:
an iterator for GenClass object. If there is no generic class, an empty iterator is returned.

iterateHiddenClass

public java.util.Iterator iterateHiddenClass()
Allows to know all the not yet completly registered classes into the current schema. This method returns an iterator on Class object.
Returns:
an iterator for Class object. If there is no class, an empty iterator is returned.

moveHiddenToCompositeName

public void moveHiddenToCompositeName(java.lang.String cn_Name)
Moves an hidden compositename to a known compositename. A known compositename is known when it is defined in an XML description file.
Parameters:
cn_Name - the name of the compositename to move

getCompositeName

public CompositeName getCompositeName(java.lang.String cn_Name)
Returns a compositename identified with its name.
Parameters:
cn_Name - the string representation of the name of the composite name.
Returns:
a compositename corresponding to its name. If the compositename does not exist, null is returned.

getHiddenCompositeName

public CompositeName getHiddenCompositeName(java.lang.String cn_Name)
Returns an hidden compositename. An Hidden compositename is a compositename which is not yet totally defined. If the compositename is not found into the current schema, null is returned.
Parameters:
cn_Name - the name of the compositename to search
Returns:
the compositename object corresponding to its name or null if not present in the current structure

createCompositeName

public CompositeName createCompositeName(java.lang.String CN_Name)
Returns a new compositename identified by its name. The MetaObject is added to the list of compositename classes managed by the current schema. If the compositename already exists, it is returned.
Parameters:
cn_Name - the string representation of the name of the compositename
Returns:
a compositename corresponding to the created compositename and registered, or an existing one if already defined

createHiddenCompositeName

public CompositeName createHiddenCompositeName(java.lang.String cn_Name)
Returns a new compositename created with its name. The MetaObject is added to the list of unknown compositename managed by the current schema.
Parameters:
cn_Name - the string representation of the name of the compositename
Returns:
a Class corresponding to the created class and registered, or an existing one if already defined

iterateCompositeName

public java.util.Iterator iterateCompositeName()
Allows to know all the registered compositename into the current schema. This method returns an iterator on compositename object.
Returns:
an iterator for compositename object. If there is no class, an empty iterator is returned.

iterateHiddenCompositeName

public java.util.Iterator iterateHiddenCompositeName()
Allows to know all the not yet completly registered compositename into the current schema. This method returns an iterator on compositename object.
Returns:
an iterator for compositename object. If there is no compositename, an empty iterator is returned.