Package org.apache.axis2.schema.writer
Interface BeanWriter
-
- All Known Implementing Classes:
CStructWriter,JavaBeanWriter
public interface BeanWriterThe bean writer interface. The schema compiler expects one of these to be presented to it and calls the appropriate methods
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetDefaultAttribArrayClassName()StringgetDefaultAttribClassName()StringgetDefaultClassArrayName()StringgetDefaultClassName()StringgetExtensionMapperPackageName()Find whether the mapper class name is presentMapgetModelMap()Gets a map of models.voidinit(CompilerOptions options)Initializes the writer with compiler options.StringmakeFullyQualifiedClassName(QName qName)Make the fully qualified class name for an element or named typevoidregisterExtensionMapperPackageName(String mapperPackageName)Registers the mapper package name - this is relevant to languages that enforce packaging such as Java or C#.Stringwrite(QName qname, Map<QName,String> typeMap, Map<QName,String> groupTypeMap, BeanWriterMetaInfoHolder metainf, boolean isAbstract)Write a complex typeStringwrite(org.apache.ws.commons.schema.XmlSchemaElement element, Map<QName,String> typeMap, Map<QName,String> groupTypeMap, BeanWriterMetaInfoHolder metainf)Write a elementStringwrite(org.apache.ws.commons.schema.XmlSchemaSimpleType simpleType, Map<QName,String> typeMap, Map<QName,String> groupTypeMap, BeanWriterMetaInfoHolder metainf)Write a simple typevoidwriteBatch()Writes a wrapped class.voidwriteExtensionMapper(BeanWriterMetaInfoHolder[] metainfArray)Write the extensions mapper component - this is relevant to only the OOP languages and a particular implementation may ignore this
-
-
-
Method Detail
-
init
void init(CompilerOptions options) throws SchemaCompilationException
Initializes the writer with compiler options.- Parameters:
options-- Throws:
IOExceptionSchemaCompilationException
-
writeBatch
void writeBatch() throws SchemaCompilationExceptionWrites a wrapped class. This will have effect only if the CompilerOptions wrapclassses returns true.- Throws:
SchemaCompilationException
-
getModelMap
Map getModelMap()
Gets a map of models. This is useful for tight integrations where the internal workings of the schema compiler may be exposed.
-
makeFullyQualifiedClassName
String makeFullyQualifiedClassName(QName qName)
Make the fully qualified class name for an element or named type- Parameters:
qName- the qualified Name for this element or type in the schema- Returns:
- the appropriate fully qualified class name to use in generated code
-
write
String write(QName qname, Map<QName,String> typeMap, Map<QName,String> groupTypeMap, BeanWriterMetaInfoHolder metainf, boolean isAbstract) throws SchemaCompilationException
Write a complex type- Parameters:
complexType-typeMap-metainf-fullyQualifiedClassName- the name returned by makeFullyQualifiedClassName() or null if it wasn't called- Returns:
- Returns String.
- Throws:
SchemaCompilationException
-
write
String write(org.apache.ws.commons.schema.XmlSchemaElement element, Map<QName,String> typeMap, Map<QName,String> groupTypeMap, BeanWriterMetaInfoHolder metainf) throws SchemaCompilationException
Write a element- Parameters:
element-typeMap-metainf-- Returns:
- Returns String.
- Throws:
SchemaCompilationException
-
write
String write(org.apache.ws.commons.schema.XmlSchemaSimpleType simpleType, Map<QName,String> typeMap, Map<QName,String> groupTypeMap, BeanWriterMetaInfoHolder metainf) throws SchemaCompilationException
Write a simple type- Parameters:
simpleType-typeMap-metainf-- Returns:
- Returns String.
- Throws:
SchemaCompilationException
-
getExtensionMapperPackageName
String getExtensionMapperPackageName()
Find whether the mapper class name is present- Parameters:
mapperPackageName-
-
registerExtensionMapperPackageName
void registerExtensionMapperPackageName(String mapperPackageName)
Registers the mapper package name - this is relevant to languages that enforce packaging such as Java or C#. May be ignored in other languages- Parameters:
mapperPackageName-
-
writeExtensionMapper
void writeExtensionMapper(BeanWriterMetaInfoHolder[] metainfArray) throws SchemaCompilationException
Write the extensions mapper component - this is relevant to only the OOP languages and a particular implementation may ignore this- Parameters:
metainfArray-namespaceToUse-- Throws:
SchemaCompilationException
-
getDefaultClassName
String getDefaultClassName()
-
getDefaultClassArrayName
String getDefaultClassArrayName()
-
getDefaultAttribClassName
String getDefaultAttribClassName()
-
getDefaultAttribArrayClassName
String getDefaultAttribArrayClassName()
-
-