public class DetailDirectory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
DetailDirectory.AnalysisVisitor
Model visitor for analyzing the structure of bindings and determining the appropriate schema components.
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
DetailDirectory(GlobalCustom custom,
ValidationContext vctx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
public DetailDirectory(GlobalCustom custom, ValidationContext vctx)
custom
- binding customization information (used for creating names as needed)vctx
- binding validation contextpublic 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