Package org.apache.axis2.schema.writer
Interface BeanWriter
- All Known Implementing Classes:
CStructWriter,JavaBeanWriter
public interface BeanWriter
The bean writer interface. The schema compiler expects one of these to be
presented to it and calls the appropriate methods
-
Method Summary
Modifier and TypeMethodDescriptionFind whether the mapper class name is presentGets a map of models.voidinit(CompilerOptions options) Initializes the writer with compiler options.makeFullyQualifiedClassName(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#.write(QName qname, Map<QName, String> typeMap, Map<QName, String> groupTypeMap, BeanWriterMetaInfoHolder metainf, boolean isAbstract) Write a complex typewrite(org.apache.ws.commons.schema.XmlSchemaElement element, Map<QName, String> typeMap, Map<QName, String> groupTypeMap, BeanWriterMetaInfoHolder metainf) Write a elementwrite(org.apache.ws.commons.schema.XmlSchemaSimpleType simpleType, Map<QName, String> typeMap, Map<QName, String> groupTypeMap, BeanWriterMetaInfoHolder metainf) Write a simple typevoidWrites 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 Details
-
init
Initializes the writer with compiler options.- Parameters:
options-- Throws:
IOExceptionSchemaCompilationException
-
writeBatch
Writes 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
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, throws SchemaCompilationExceptionString> groupTypeMap, BeanWriterMetaInfoHolder metainf, boolean isAbstract) 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, throws SchemaCompilationExceptionString> groupTypeMap, BeanWriterMetaInfoHolder metainf) 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, throws SchemaCompilationExceptionString> groupTypeMap, BeanWriterMetaInfoHolder metainf) 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
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()
-