Package org.apache.axis2.schema
Class SchemaCompiler
- java.lang.Object
-
- org.apache.axis2.schema.SchemaCompiler
-
public class SchemaCompiler extends Object
Schema compiler for ADB. Based on WS-Commons schema object model.
-
-
Field Summary
Fields Modifier and Type Field Description static StringANY_ELEMENT_FIELD_NAMEstatic intCOMPONENT_ATTRIBUTEstatic intCOMPONENT_ATTRIBUTE_GROUPstatic intCOMPONENT_ELEMENTstatic intCOMPONENT_GROUPstatic intCOMPONENT_TYPEstatic StringEXTRA_ATTRIBUTE_FIELD_NAMEstatic StringUSE_NONEstatic StringUSE_OPTIONALstatic StringUSE_REQUIRED
-
Constructor Summary
Constructors Constructor Description SchemaCompiler(CompilerOptions options)Constructor - Accepts a options bean
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompile(List<org.apache.ws.commons.schema.XmlSchema> schemalist)Compile a list of schemas This actually calls the compile (XmlSchema s) method repeatedlyvoidcompile(org.apache.ws.commons.schema.XmlSchema schema)Compile (rather codegen) a single schema elementPropertiesgetCompilerProperties()Map<String,org.apache.ws.commons.schema.XmlSchema>getLoadedSchemaMap()HashMap<QName,String>getProcessedElementMap()MapgetProcessedModelMap()static booleanisSOAP_ENC(String s)Returns true if SOAP_ENC Namespace.voidprocessAttribute(org.apache.ws.commons.schema.XmlSchemaAttribute att, BeanWriterMetaInfoHolder metainf, org.apache.ws.commons.schema.XmlSchema parentSchema)Process the attributevoidprocessSimpleExtensionBaseType(QName extBaseType, BeanWriterMetaInfoHolder metaInfHolder, org.apache.ws.commons.schema.XmlSchema parentSchema)Process Simple Extension Base Type.voidprocessSimpleRestrictionBaseType(QName qName, QName resBaseType, BeanWriterMetaInfoHolder metaInfHolder, org.apache.ws.commons.schema.XmlSchema parentSchema)Process Simple Restriction Base Type.
-
-
-
Field Detail
-
COMPONENT_TYPE
public static final int COMPONENT_TYPE
- See Also:
- Constant Field Values
-
COMPONENT_ELEMENT
public static final int COMPONENT_ELEMENT
- See Also:
- Constant Field Values
-
COMPONENT_ATTRIBUTE
public static final int COMPONENT_ATTRIBUTE
- See Also:
- Constant Field Values
-
COMPONENT_ATTRIBUTE_GROUP
public static final int COMPONENT_ATTRIBUTE_GROUP
- See Also:
- Constant Field Values
-
COMPONENT_GROUP
public static final int COMPONENT_GROUP
- See Also:
- Constant Field Values
-
ANY_ELEMENT_FIELD_NAME
public static final String ANY_ELEMENT_FIELD_NAME
- See Also:
- Constant Field Values
-
EXTRA_ATTRIBUTE_FIELD_NAME
public static final String EXTRA_ATTRIBUTE_FIELD_NAME
- See Also:
- Constant Field Values
-
USE_OPTIONAL
public static final String USE_OPTIONAL
- See Also:
- Constant Field Values
-
USE_REQUIRED
public static final String USE_REQUIRED
- See Also:
- Constant Field Values
-
USE_NONE
public static final String USE_NONE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SchemaCompiler
public SchemaCompiler(CompilerOptions options) throws SchemaCompilationException
Constructor - Accepts a options bean- Parameters:
options-- Throws:
SchemaCompilationException
-
-
Method Detail
-
getProcessedElementMap
public HashMap<QName,String> getProcessedElementMap()
- Returns:
- the processes element map includes the Qname of the element as the key and a String representing the fully qualified class name
-
getProcessedModelMap
public Map getProcessedModelMap()
- Returns:
- a map of Qname vs models. A model can be anything, ranging from a DOM document to a stream. This is taken from the writer and the schema compiler has no control over it
-
compile
public void compile(List<org.apache.ws.commons.schema.XmlSchema> schemalist) throws SchemaCompilationException
Compile a list of schemas This actually calls the compile (XmlSchema s) method repeatedly- Parameters:
schemalist-- Throws:
SchemaCompilationException- See Also:
compile(org.apache.ws.commons.schema.XmlSchema)
-
compile
public void compile(org.apache.ws.commons.schema.XmlSchema schema) throws SchemaCompilationExceptionCompile (rather codegen) a single schema element- Parameters:
schema-- Throws:
SchemaCompilationException
-
getCompilerProperties
public Properties getCompilerProperties()
- Returns:
- the property map of the schemacompiler. In this case it would be the property map loaded from the configuration file
-
isSOAP_ENC
public static boolean isSOAP_ENC(String s)
Returns true if SOAP_ENC Namespace.- Parameters:
s- a string representing the URI to check- Returns:
- true if
smatches a SOAP ENCODING namespace URI, false otherwise
-
processSimpleExtensionBaseType
public void processSimpleExtensionBaseType(QName extBaseType, BeanWriterMetaInfoHolder metaInfHolder, org.apache.ws.commons.schema.XmlSchema parentSchema) throws SchemaCompilationException
Process Simple Extension Base Type.- Parameters:
extBaseType-metaInfHolder-- Throws:
SchemaCompilationException
-
processSimpleRestrictionBaseType
public void processSimpleRestrictionBaseType(QName qName, QName resBaseType, BeanWriterMetaInfoHolder metaInfHolder, org.apache.ws.commons.schema.XmlSchema parentSchema) throws SchemaCompilationException
Process Simple Restriction Base Type.- Parameters:
resBaseType-metaInfHolder-- Throws:
SchemaCompilationException
-
processAttribute
public void processAttribute(org.apache.ws.commons.schema.XmlSchemaAttribute att, BeanWriterMetaInfoHolder metainf, org.apache.ws.commons.schema.XmlSchema parentSchema) throws SchemaCompilationExceptionProcess the attribute- Parameters:
att-metainf-- Throws:
SchemaCompilationException
-
-