Package org.jibx.schema.codegen
Class SchemaDocumentationGenerator
java.lang.Object
org.jibx.schema.codegen.SchemaDocumentationGenerator
Visitor to write a filtered view of a schema definition matching the data structure of a class. This is used when
schema fragments are included in class documentation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Visitor to write the filtered view of a schema definition matching the data structure of a class. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Leading text for comment lines.private final MarshallingContext
Marshaller instance for writing schema fragments.private final IBindingFactory
Extract binding factory.private final Set
Set of namespace URIs defined in binding.private final int
Schema definitions namespace index.private final String
Schema definitions namespace prefix.private static final Logger
Logger for class.private static final String
Schema definitions namespace URI. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
escapeText
(char chr, String escape, String text, StringBuffer buff) Escape a special character in a text string.Generate documentation from the schema component corresponding to a class.private void
scanItemTree
(GroupItem group, Map comptoclas, Set refcomps, Map uritoprefix) Scan schema component references from item tree.
-
Field Details
-
COMMENT_LEAD_TEXT
Leading text for comment lines.- See Also:
-
SCHEMA_DEFINITIONS_NS
Schema definitions namespace URI.- See Also:
-
s_logger
private static final Logger s_loggerLogger for class. -
m_factory
Extract binding factory. -
m_schemaIndex
private final int m_schemaIndexSchema definitions namespace index. -
m_schemaPrefix
Schema definitions namespace prefix. -
m_namespaceSet
Set of namespace URIs defined in binding. -
m_context
Marshaller instance for writing schema fragments.
-
-
Constructor Details
-
SchemaDocumentationGenerator
Constructor.- Throws:
JiBXException
- on error loading binding information
-
-
Method Details
-
scanItemTree
Scan schema component references from item tree. This recursively constructs (1) a map from schema components represented by separate classes to the corresponding class information, (2) a set of schema global definitions included in the item tree, and (3) a set of namespace URIs for referenced components.- Parameters:
group
- item grouping to be processedcomptoclas
- map from schema component to correspondingClassHolder
refcomps
- set of schema global definitions incorporated into this treeuritoprefix
- map from namespaces used by referenced definitions to the corresponding prefixes
-
escapeText
Escape a special character in a text string.- Parameters:
chr
-escape
-text
-buff
-
-
generate
Generate documentation from the schema component corresponding to a class.- Parameters:
group
- item group for classdropanno
- delete annotations from schema documentation flag- Returns:
- schema extract documentation
-