com.ebm_ws.infra.xmlmapping.impl
Class SchemaImpl

java.lang.Object
  extended by com.ebm_ws.infra.xmlmapping.impl.SchemaImpl
All Implemented Interfaces:
ISchema

public class SchemaImpl
extends java.lang.Object
implements ISchema

This class is a program (main) that allows generating the XML schema (XSD) from Java code that support the implicit mapping (see XmlObject.java)


Constructor Summary
SchemaImpl(SchemasManager iMgr, java.lang.String iName, java.lang.String iLocator, java.lang.String iPackage)
          Schema constructor.
 
Method Summary
 void buildFromClassPath()
          Builds the schema (i.e. looks for all elements) by searching the classpath for classes.
 void buildFromClassPathOFF()
          Ancienne méthode se basant sur le CLASSPATH.
 void buildFromSource(java.lang.String iSourceDir)
          Parses recursively all classes in the given source directory
 void buildFromXsd(org.w3c.dom.Document iDoc)
          Builds the schema (i.e. looks for all elements) by parsing the XSD file.
 void buildFromXsd(java.io.InputStream iInput)
          Builds the schema (i.e. looks for all elements) by parsing the XSD file.
 void generateXSD(org.w3c.dom.Document iXmlDoc)
          Generates the XSD structure for this schema.
 ISchemaElement[] getAllElements()
          Returns all elements belonging to this schema.
 ISchemaElement getElement(java.lang.Class iClass)
           
 java.lang.String getLocator()
          Returns the schema location (this is the xsd file).
 java.lang.String getName()
          Returns the schema name.
 java.lang.String getRootPackage()
          Returns the schema root code package
 ISchema[] getUsedSchemas()
          Returns a list of schemas referenced by this schema.
 boolean isFullyBuilt()
          Determines whether this schema has been loaded.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SchemaImpl

public SchemaImpl(SchemasManager iMgr,
                  java.lang.String iName,
                  java.lang.String iLocator,
                  java.lang.String iPackage)
Schema constructor.

Parameters:
iName - The schema name (generally used as the filename and the prefix).
iPackage - The root code package
Method Detail

getName

public java.lang.String getName()
Returns the schema name.

Specified by:
getName in interface ISchema
Returns:

getLocator

public java.lang.String getLocator()
Description copied from interface: ISchema
Returns the schema location (this is the xsd file).

Specified by:
getLocator in interface ISchema

getRootPackage

public java.lang.String getRootPackage()
Returns the schema root code package

Specified by:
getRootPackage in interface ISchema
Returns:

isFullyBuilt

public boolean isFullyBuilt()
Description copied from interface: ISchema
Determines whether this schema has been loaded.

Specified by:
isFullyBuilt in interface ISchema
Returns:

toString

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

getElement

public ISchemaElement getElement(java.lang.Class iClass)
Specified by:
getElement in interface ISchema
Parameters:
iSourceRootDir -
Returns:

getUsedSchemas

public ISchema[] getUsedSchemas()
Description copied from interface: ISchema
Returns a list of schemas referenced by this schema.

Specified by:
getUsedSchemas in interface ISchema
Returns:

getAllElements

public ISchemaElement[] getAllElements()
Description copied from interface: ISchema
Returns all elements belonging to this schema.

Specified by:
getAllElements in interface ISchema
Returns:

buildFromClassPath

public void buildFromClassPath()
Description copied from interface: ISchema
Builds the schema (i.e. looks for all elements) by searching the classpath for classes.

Specified by:
buildFromClassPath in interface ISchema

buildFromClassPathOFF

public void buildFromClassPathOFF()
Ancienne méthode se basant sur le CLASSPATH. Moins puissant et surtout non compatible avec ANT.


buildFromSource

public void buildFromSource(java.lang.String iSourceDir)
                     throws java.lang.Exception
Parses recursively all classes in the given source directory

Specified by:
buildFromSource in interface ISchema
Parameters:
iSourceRootDir -
Throws:
java.lang.Exception

generateXSD

public void generateXSD(org.w3c.dom.Document iXmlDoc)
Description copied from interface: ISchema
Generates the XSD structure for this schema.

Specified by:
generateXSD in interface ISchema

buildFromXsd

public void buildFromXsd(java.io.InputStream iInput)
                  throws java.lang.Exception
Description copied from interface: ISchema
Builds the schema (i.e. looks for all elements) by parsing the XSD file.

Specified by:
buildFromXsd in interface ISchema
Throws:
java.lang.Exception

buildFromXsd

public void buildFromXsd(org.w3c.dom.Document iDoc)
Description copied from interface: ISchema
Builds the schema (i.e. looks for all elements) by parsing the XSD file.

Specified by:
buildFromXsd in interface ISchema


Copyright © 2008 eBMWebsourcing. All Rights Reserved.