com.ebm_ws.infra.xmlmapping.schema
Class SchemasManager

java.lang.Object
  extended by com.ebm_ws.infra.xmlmapping.schema.SchemasManager

public class SchemasManager
extends java.lang.Object

Main object to instanciate and manage schemas.


Constructor Summary
SchemasManager()
           
 
Method Summary
 void buildAllFromClassPath()
           
 void buildAllFromSource(java.lang.String iSourceRootDir)
          Builds all declared schemas from the given source code directory.
 ISchema declareSchema(java.lang.String iName, java.lang.String iLocator, java.lang.String iPackage)
          Declares a schema.
 ISchemaElement[] getAllImplementors(java.lang.Class iSubstitutionGroup)
          Returns all schema elements that are compatible with the given class
 ISchema[] getAllSchemas()
          Returns all declared schemas
 ISchema getDeclaringSchema(java.lang.Class iClass)
          Returns the schema the given class belongs to (if any)
 ISchemaElement getElement(java.lang.Class iClass)
          Returns the schema element describing the given class, if found in any declard schema.
 ISchema getSchema(java.lang.String iPackage)
          Returns a schema by its root package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemasManager

public SchemasManager()
Method Detail

declareSchema

public ISchema declareSchema(java.lang.String iName,
                             java.lang.String iLocator,
                             java.lang.String iPackage)
Declares a schema.

Parameters:
iName - The schema prefix
iLocator - The schema locator (xsd file location)
iPackage - The root schema package
Returns:

getSchema

public ISchema getSchema(java.lang.String iPackage)
Returns a schema by its root package.

Parameters:
iPackage - The schema root package
Returns:
The matching schema.

buildAllFromSource

public void buildAllFromSource(java.lang.String iSourceRootDir)
                        throws java.lang.Exception
Builds all declared schemas from the given source code directory.

Parameters:
iSourceRootDir - The source code directory.
Throws:
java.lang.Exception

buildAllFromClassPath

public void buildAllFromClassPath()
                           throws java.lang.Exception
Throws:
java.lang.Exception

getAllSchemas

public ISchema[] getAllSchemas()
Returns all declared schemas

Returns:

getElement

public ISchemaElement getElement(java.lang.Class iClass)
Returns the schema element describing the given class, if found in any declard schema.

Parameters:
iClass - An object class
Returns:
The correcponding schema element

getAllImplementors

public ISchemaElement[] getAllImplementors(java.lang.Class iSubstitutionGroup)
Returns all schema elements that are compatible with the given class

Parameters:
iSubstitutionGroup -
Returns:

getDeclaringSchema

public ISchema getDeclaringSchema(java.lang.Class iClass)
Returns the schema the given class belongs to (if any)

Parameters:
iClass -
Returns:


Copyright © 2008 eBMWebsourcing. All Rights Reserved.