public class StructureElement extends StructureElementBase
hasProperty| Modifier and Type | Field and Description |
|---|---|
private TemplateElementBase |
m_effectiveMapping
Binding to use for this object.
|
private boolean |
m_hasMappingName
Flag for structure has a concrete mapping, possibly indeterminant.
|
private java.lang.String |
m_mapAsName
Mapping type name to use for this object.
|
private QName |
m_mapAsQName
Mapping qualified type name to use for this object.
|
static StringArray |
s_allowedAttributes
Enumeration of allowed attribute names
|
BINDING_ELEMENT, COLLECTION_ELEMENT, ELEMENT_NAMES, FORMAT_ELEMENT, INCLUDE_ELEMENT, INPUT_ELEMENT, MAPPING_ELEMENT, NAMESPACE_ELEMENT, OUTPUT_ELEMENT, SPLIT_ELEMENT, STRUCTURE_ELEMENT, TEMPLATE_ELEMENT, VALUE_ELEMENT| Constructor and Description |
|---|
StructureElement()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
checkNamespaceUsage(TemplateElementBase base,
ValidationContext vctx)
Check for conflicts on namespace prefix usage.
|
protected void |
classifyComponents(ValidationContext vctx)
Classify child components as contributing attributes, content, or both.
|
TemplateElementBase |
getEffectiveMapping()
Get actual type mapping.
|
java.lang.String |
getMapAsName()
Get name of mapping type.
|
QName |
getMapAsQName()
Get qualified name of mapping type.
|
java.lang.String |
getName()
Get name.
|
private java.lang.String |
getQualifiedMapAs(IMarshallingContext ictx)
JiBX access method to get mapping type name as qualified name.
|
IClass |
getType()
Get value type information.
|
java.lang.String |
getUri()
Get specified namespace URI.
|
boolean |
hasAttribute()
Check if component defines one or more attribute values of the
containing element.
|
boolean |
hasContent()
Check if component defines one or more elements or text values as
children of the containing element.
|
boolean |
hasDirectName()
Check if this structure defines a name directly.
|
boolean |
hasName()
Check if component has a name.
|
private void |
mergeNamespaces(DefinitionContext defc,
DefinitionContext addc,
ValidationContext vctx)
Merge namespaces from an implicit context to those defined for a
reference.
|
private void |
preSet(IUnmarshallingContext uctx)
Make sure all attributes are defined.
|
void |
setMapAsName(java.lang.String name)
Set name of mapping type.
|
void |
setMapAsQName(QName name)
Set qualified name of mapping type.
|
private void |
setMappingReference(ValidationContext vctx,
DefinitionContext dctx,
IClass type)
Validate mapping reference.
|
private void |
setQualifiedMapAs(java.lang.String text,
IUnmarshallingContext ictx)
JiBX access method to set mapping type name as qualified name.
|
void |
validate(ValidationContext vctx)
Validate element information.
|
getDeclaredType, getField, getFieldName, getFlag, getGet, getGetName, getGetType, getNamespace, getObjectType, getPrefix, getSet, getSetName, getSetType, getTest, getTestName, getUsage, getUsageName, hasObject, hasProperty, isFlagOnly, isImplicit, isOptional, prevalidate, setDeclaredType, setFieldName, setFlagName, setGetName, setName, setPrefix, setSetName, setTestName, setUri, setUsage, setUsageNamecheckCompatibleChildren, getAttributeComponents, getChildObjectType, getContentComponents, getCreateClass, getCreateType, getFactory, getFactoryName, getId, getLabel, getMarshaller, getMarshallerName, getPostset, getPostsetName, getPreget, getPregetName, getPreset, getPresetName, getUnmarshaller, getUnmarshallerName, getUsing, isAllowRepeats, isChoice, isClassified, isFlexible, isNillable, isOrdered, setAllowRepeats, setChoice, setComponents, setCreateType, setFactoryName, setFlexible, setIdChild, setLabel, setMarshallerName, setNillable, setOrdered, setPostsetName, setPregetName, setPresetName, setUnmarshallerName, setUsing, verifyConstructionaddChild, childIterator, children, getDefaultStyle, getDefinitions, getStyle, getStyleName, setDefinitions, setStyleNamegetComment, name, setComment, toString, type, validateAttributespublic static final StringArray s_allowedAttributes
private java.lang.String m_mapAsName
private QName m_mapAsQName
private boolean m_hasMappingName
private TemplateElementBase m_effectiveMapping
public java.lang.String getMapAsName()
null if none)public void setMapAsName(java.lang.String name)
name - mapping type name (or null if none)public QName getMapAsQName()
null if none)public void setMapAsQName(QName name)
name - mapping qualified type name (or null if none)public TemplateElementBase getEffectiveMapping()
null if none)public boolean hasDirectName()
true if name defined, false if notpublic boolean hasName()
IComponenthasName in interface IComponenthasName in class StructureElementBasetrue if component has a name, false if
notpublic java.lang.String getName()
StructureElementBasegetName in interface IComponentgetName in class StructureElementBasepublic java.lang.String getUri()
StructureElementBasegetUri in interface IComponentgetUri in class StructureElementBasenull if not set)public boolean hasAttribute()
IComponenthasAttribute in interface IComponenthasAttribute in class StructureElementBasetrue if one or more attribute values defined for
containing element, false if notpublic boolean hasContent()
IComponenthasContent in interface IComponenthasContent in class StructureElementBasetrue if one or more content values defined
for containing element, false if notpublic IClass getType()
IComponentgetType in interface IComponentgetType in class StructureElementBaseprivate void setQualifiedMapAs(java.lang.String text,
IUnmarshallingContext ictx)
throws JiBXException
text - mapping name text (null if none)ictx - unmarshalling contextJiBXException - on deserialization errorprivate java.lang.String getQualifiedMapAs(IMarshallingContext ictx) throws JiBXException
ictx - marshalling contextnull if none)JiBXException - on deserialization errorprivate void preSet(IUnmarshallingContext uctx) throws JiBXException
uctx - unmarshalling contextJiBXException - on unmarshalling errorprivate void mergeNamespaces(DefinitionContext defc, DefinitionContext addc, ValidationContext vctx)
defc - context supplying namespaces to be mergedaddc - context to be merged intovctx - private void checkNamespaceUsage(TemplateElementBase base, ValidationContext vctx)
base - vctx - protected void classifyComponents(ValidationContext vctx)
classifyComponents in class ContainerElementBasevctx - public void validate(ValidationContext vctx)
ElementBaseElementBase.prevalidate(org.jibx.binding.model.ValidationContext) method will always be called for every
element in the binding definition before this method is called for any
element. This empty base class implementation should be overridden by
each subclass that requires validation handling.validate in class StructureElementBasevctx - validation contextprivate void setMappingReference(ValidationContext vctx, DefinitionContext dctx, IClass type)
vctx - validation contextdctx - definition contexttype - referenced type