Package org.jibx.schema.codegen.custom
Class NestingCustomBase
java.lang.Object
org.jibx.schema.codegen.custom.CustomBase
org.jibx.schema.codegen.custom.NestingCustomBase
- All Implemented Interfaces:
TypeReplacer
- Direct Known Subclasses:
ComponentCustom,SchemaRootBase
Base class for all standard schema customizations that can contain other customizations.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intprivate longMask for facets active at this level (all facets not in scope of an ignore state).private intCode for xs:any representation (-1if not set at level).private final LazyListChild customizations.private intCode for xs:choice handling (-1if not set at level).private BooleanExpose choice selection state directly to user.private longMask for facets enforced at this level.private longMask for facets ignored at this level.private QName[]List of type substitution pairs.private MapMap of type substitutions.private intCode for xs:union handling (-1if not set at level).private BooleanExpose union selection state directly to user.static final StringArrayEnumeration of allowed attribute namesstatic final EnumSetstatic final EnumSetstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGet the bitmask of facet element flags to be processed.Get the xs:any handling text value set specifically for this element.intGet the xs:any handling type code to be applied for this component and all nested components.Get child customizations.Get the xs:choice handling text value set specifically for this element.intGet the xs:choice handling type code to be applied for this component and all nested components.getReplacement(QName qname) Get replacement type.QName[]Get type substitution pairs list.Get the xs:union handling text value set specifically for this element.intGet the xs:union handling type code to be applied for this component and all nested components.booleanCheck whether xs:attribute definitions should always be inlined, even when used in multiple locations.booleanCheck whether xs:choice selection states should be exposed to the user.booleanCheck whether xs:union selection states should be exposed to the user.private voidsetAnyHandling(String text, IUnmarshallingContext ictx) Set the xs:any handling text value.voidsetAnyType(int code) Set the xs:any handling type code.private voidsetChoiceHandling(String text, IUnmarshallingContext ictx) Set the xs:choice handling text value.voidsetChoiceType(int code) Set the xs:choice handling type code.voidsetEnforcedFacets(String[] facets, IUnmarshallingContext ictx) Set the list of facet elements to be enforced.voidsetIgnoredFacets(String[] facets, IUnmarshallingContext ictx) Set the list of facet elements to be ignored.protected voidsetReplacement(QName original, QName replace) Set a type replacement.voidsetSubstitutions(QName[] subs) Set type substitution pairs list.private voidsetUnionHandling(String text, IUnmarshallingContext ictx) Set the xs:union handling text value.voidsetUnionType(int code) Set the xs:union handling type code.booleanvalidate(ValidationContext vctx) Validate and finalize customization information.Methods inherited from class org.jibx.schema.codegen.custom.CustomBase
getContainingObject, getParent, getSchemaRoot, setParent, validateAttributes
-
Field Details
-
s_allowedAttributes
Enumeration of allowed attribute names -
ANY_DISCARD
public static final int ANY_DISCARD- See Also:
-
ANY_DOM
public static final int ANY_DOM- See Also:
-
ANY_MAPPED
public static final int ANY_MAPPED- See Also:
-
s_anyValues
-
SELECTION_UNCHECKED
public static final int SELECTION_UNCHECKED- See Also:
-
SELECTION_CHECKEDSET
public static final int SELECTION_CHECKEDSET- See Also:
-
SELECTION_CHECKEDBOTH
public static final int SELECTION_CHECKEDBOTH- See Also:
-
SELECTION_OVERRIDESET
public static final int SELECTION_OVERRIDESET- See Also:
-
SELECTION_OVERRIDEBOTH
public static final int SELECTION_OVERRIDEBOTH- See Also:
-
s_selectionValues
-
m_substitutions
List of type substitution pairs. -
m_enforcedFacetsMask
private long m_enforcedFacetsMaskMask for facets enforced at this level. -
m_ignoredFacetsMask
private long m_ignoredFacetsMaskMask for facets ignored at this level. -
m_choiceExposed
Expose choice selection state directly to user. -
m_choiceCode
private int m_choiceCodeCode for xs:choice handling (-1if not set at level). -
m_unionExposed
Expose union selection state directly to user. -
m_unionCode
private int m_unionCodeCode for xs:union handling (-1if not set at level). -
m_anyCode
private int m_anyCodeCode for xs:any representation (-1if not set at level). -
m_children
Child customizations. -
m_typeSubstitutionMap
Map of type substitutions. -
m_activeFacetsMask
private long m_activeFacetsMaskMask for facets active at this level (all facets not in scope of an ignore state).
-
-
Constructor Details
-
NestingCustomBase
Constructor.- Parameters:
parent-
-
-
Method Details
-
getSubstitutions
Get type substitution pairs list.- Returns:
- substitutions
-
setSubstitutions
Set type substitution pairs list.- Parameters:
subs-
-
setEnforcedFacets
Set the list of facet elements to be enforced.- Parameters:
facets-ictx-
-
setIgnoredFacets
Set the list of facet elements to be ignored.- Parameters:
facets-ictx-
-
getActiveFacetsMask
public long getActiveFacetsMask()Get the bitmask of facet element flags to be processed.- Returns:
- bitmask
-
getChildren
Get child customizations.- Returns:
- children
-
setReplacement
Set a type replacement.- Parameters:
original-replace-
-
getReplacement
Get replacement type.- Specified by:
getReplacementin interfaceTypeReplacer- Parameters:
qname-- Returns:
- replacement type (
nullif deletion; original type, if no replacement defined)
-
getAnyType
public int getAnyType()Get the xs:any handling type code to be applied for this component and all nested components. The default value isANY_DOMif not overridden at any level.- Returns:
- code
-
setAnyType
public void setAnyType(int code) Set the xs:any handling type code.- Parameters:
code- handling code,-1if to be unset
-
getAnyHandling
Get the xs:any handling text value set specifically for this element.- Returns:
- text (
nullif not set)
-
setAnyHandling
Set the xs:any handling text value. This method is provided only for use when unmarshalling.- Parameters:
text- (nullif not set)ictx-
-
isChoiceExposed
public boolean isChoiceExposed()Check whether xs:choice selection states should be exposed to the user. The default isfalseif not overridden at any level.- Returns:
- expose choice state flag
-
getChoiceType
public int getChoiceType()Get the xs:choice handling type code to be applied for this component and all nested components. The default value isSELECTION_CHECKEDSETif not overridden at any level.- Returns:
- code
-
setChoiceType
public void setChoiceType(int code) Set the xs:choice handling type code.- Parameters:
code- handling code,-1if to be unset
-
getChoiceHandling
Get the xs:choice handling text value set specifically for this element.- Returns:
- text (
nullif not set)
-
setChoiceHandling
Set the xs:choice handling text value. This method is provided only for use when unmarshalling.- Parameters:
text- (nullif not set)ictx-
-
isUnionExposed
public boolean isUnionExposed()Check whether xs:union selection states should be exposed to the user. The default isfalseif not overridden at any level.- Returns:
- expose union state flag
-
getUnionType
public int getUnionType()Get the xs:union handling type code to be applied for this component and all nested components. The default value isSELECTION_CHECKEDSETif not overridden at any level.- Returns:
- code
-
setUnionType
public void setUnionType(int code) Set the xs:union handling type code.- Parameters:
code- handling code,-1if to be unset
-
getUnionHandling
Get the xs:union handling text value set specifically for this element.- Returns:
- text (
nullif not set)
-
setUnionHandling
Set the xs:union handling text value. This method is provided only for use when unmarshalling.- Parameters:
text- (nullif not set)ictx-
-
isAttributeInlined
public boolean isAttributeInlined()Check whether xs:attribute definitions should always be inlined, even when used in multiple locations. The default isfalseif not overridden at any level. TODO: implement in customizations- Returns:
- inline attribute flag
-
validate
Validate and finalize customization information. This creates a new type substitution map and active facets mask, or inherits unchanged values from the parent customization.- Parameters:
vctx- validation context- Returns:
trueif valid,falseif not
-