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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getDefaultAttribArrayClassName()
String
getDefaultAttribClassName()
String
getDefaultClassArrayName()
String
getDefaultClassName()
String
getExtensionMapperPackageName()
Find whether the mapper class name is presentMap
getModelMap()
Gets a map of models.void
init(CompilerOptions options)
Initializes the writer with compiler options.String
makeFullyQualifiedClassName(QName qName)
Make the fully qualified class name for an element or named typevoid
registerExtensionMapperPackageName(String mapperPackageName)
Registers the mapper package name - this is relevant to languages that enforce packaging such as Java or C#.String
write(QName qname, Map<QName,String> typeMap, Map<QName,String> groupTypeMap, BeanWriterMetaInfoHolder metainf, boolean isAbstract)
Write a complex typeString
write(org.apache.ws.commons.schema.XmlSchemaElement element, Map<QName,String> typeMap, Map<QName,String> groupTypeMap, BeanWriterMetaInfoHolder metainf)
Write a elementString
write(org.apache.ws.commons.schema.XmlSchemaSimpleType simpleType, Map<QName,String> typeMap, Map<QName,String> groupTypeMap, BeanWriterMetaInfoHolder metainf)
Write a simple typevoid
writeBatch()
Writes a wrapped class.void
writeExtensionMapper(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:
IOException
SchemaCompilationException
-
writeBatch
void writeBatch() throws SchemaCompilationException
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
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()
-
-