public class SchemaDocumentationGenerator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private class |
SchemaDocumentationGenerator.DocumentationVisitor
Visitor to write the filtered view of a schema definition matching the data structure of a class.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMENT_LEAD_TEXT
Leading text for comment lines.
|
private MarshallingContext |
m_context
Marshaller instance for writing schema fragments.
|
private IBindingFactory |
m_factory
Extract binding factory.
|
private java.util.Set |
m_namespaceSet
Set of namespace URIs defined in binding.
|
private int |
m_schemaIndex
Schema definitions namespace index.
|
private java.lang.String |
m_schemaPrefix
Schema definitions namespace prefix.
|
private static org.apache.log4j.Logger |
s_logger
Logger for class.
|
private static java.lang.String |
SCHEMA_DEFINITIONS_NS
Schema definitions namespace URI.
|
Constructor and Description |
---|
SchemaDocumentationGenerator()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
escapeText(char chr,
java.lang.String escape,
java.lang.String text,
java.lang.StringBuffer buff)
Escape a special character in a text string.
|
java.lang.String |
generate(GroupItem group,
boolean dropanno)
Generate documentation from the schema component corresponding to a class.
|
private void |
scanItemTree(GroupItem group,
java.util.Map comptoclas,
java.util.Set refcomps,
java.util.Map uritoprefix)
Scan schema component references from item tree.
|
public static final java.lang.String COMMENT_LEAD_TEXT
private static final java.lang.String SCHEMA_DEFINITIONS_NS
private static final org.apache.log4j.Logger s_logger
private final IBindingFactory m_factory
private final int m_schemaIndex
private final java.lang.String m_schemaPrefix
private final java.util.Set m_namespaceSet
private final MarshallingContext m_context
public SchemaDocumentationGenerator() throws JiBXException
JiBXException
- on error loading binding informationprivate void scanItemTree(GroupItem group, java.util.Map comptoclas, java.util.Set refcomps, java.util.Map uritoprefix)
group
- item grouping to be processedcomptoclas
- map from schema component to corresponding ClassHolder
refcomps
- set of schema global definitions incorporated into this treeuritoprefix
- map from namespaces used by referenced definitions to the corresponding prefixesprivate void escapeText(char chr, java.lang.String escape, java.lang.String text, java.lang.StringBuffer buff)
chr
- escape
- text
- buff
- public java.lang.String generate(GroupItem group, boolean dropanno)
group
- item group for classdropanno
- delete annotations from schema documentation flag