|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.schema.generator.DetailDirectory
public class DetailDirectory
Directory for components included in schema generation. This includes both <mapping> elements of the bindings and special formats, with the latter currently limited to enumeration types. The building code works from a supplied list of bindings, walking the tree structure of the bindings to find all mappings and processing each mapping directly using the lists of child components. It creates mapping details and sets flags for the types of access to each mapping, as well as creating enumeration details and counting usage to select globals.
Nested Class Summary | |
---|---|
class |
DetailDirectory.AnalysisVisitor
Model visitor for analyzing the structure of bindings and determining the appropriate schema components. |
Field Summary | |
---|---|
private ValidationContext |
m_context
Validation context for bindings. |
private GlobalCustom |
m_custom
Binding customization information. |
private java.util.Map |
m_enumMap
Map from class name to enumeration detail. |
private java.util.Set |
m_forceTypeMappings
Set of <mapping> definitions used as base types. |
private java.util.Map |
m_mappingMap
Map from <mapping> definition to mapping detail. |
Constructor Summary | |
---|---|
DetailDirectory(GlobalCustom custom,
ValidationContext vctx)
Constructor. |
Method Summary | |
---|---|
private MappingDetail |
addDetail(MappingElement map)
Create the detail information for a <mapping>. |
private void |
checkReferences(ContainerElementBase cont,
ContainerElementBase base)
Check references to mappings or enumeration types from component children of binding container element. |
private void |
countEnumUsage(java.lang.String type)
Count the usage of an enumeration type. |
protected MappingDetail |
forceMappingDetail(MappingElement map)
Find detail information for a <mapping>. |
java.util.Collection |
getComplexDetails()
Get all complex type details. |
MappingDetail |
getMappingDetail(MappingElementBase map)
Get detail information for a <mapping>. |
EnumDetail |
getSimpleDetail(java.lang.String type)
Get detail information for a simple type. |
java.util.Collection |
getSimpleDetails()
Get all simple type details. |
private boolean |
isEnumeration(IClass clas)
Check if class is an enumeration type. |
private boolean |
isSimpleValue(IClass clas)
Check if class is a simple value type. |
private static boolean |
isTypeDerivation(StructureElement struct)
Check if a <structure> element represents a type derivation. |
void |
populate(java.util.List bindings)
Populate the mapping directory from a supplied list of root bindings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final GlobalCustom m_custom
private final ValidationContext m_context
private final java.util.Map m_mappingMap
private final java.util.Map m_enumMap
private final java.util.Set m_forceTypeMappings
Constructor Detail |
---|
public DetailDirectory(GlobalCustom custom, ValidationContext vctx)
custom
- binding customization information (used for creating names as needed)vctx
- binding validation contextMethod Detail |
---|
public void populate(java.util.List bindings)
bindings
- private static boolean isTypeDerivation(StructureElement struct)
struct
-
true
if a type derivation, false
if notprivate boolean isEnumeration(IClass clas)
clas
-
private boolean isSimpleValue(IClass clas)
clas
-
private void countEnumUsage(java.lang.String type)
type
- private void checkReferences(ContainerElementBase cont, ContainerElementBase base)
cont
- container elementbase
- child element representing base mapping reference (null
if none)private MappingDetail addDetail(MappingElement map)
map
-
protected MappingDetail forceMappingDetail(MappingElement map)
map
-
public MappingDetail getMappingDetail(MappingElementBase map)
map
-
public EnumDetail getSimpleDetail(java.lang.String type)
type
-
public java.util.Collection getComplexDetails()
MappingDetail
public java.util.Collection getSimpleDetails()
EnumDetail
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |