|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.binding.model.ElementBase
org.jibx.binding.model.NestingElementBase
org.jibx.binding.model.ContainerElementBase
org.jibx.binding.model.StructureElementBase
org.jibx.binding.model.StructureElement
public class StructureElement
Model component for structure element of binding definition.
Field Summary | |
---|---|
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 |
Fields inherited from class org.jibx.binding.model.ElementBase |
---|
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 Summary | |
---|---|
StructureElement()
Default constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.jibx.binding.model.StructureElementBase |
---|
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, setUsageName |
Methods inherited from class org.jibx.binding.model.NestingElementBase |
---|
addChild, childIterator, children, getDefaultStyle, getDefinitions, getStyle, getStyleName, setDefinitions, setStyleName |
Methods inherited from class org.jibx.binding.model.ElementBase |
---|
getComment, name, setComment, toString, type, validateAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final StringArray s_allowedAttributes
private java.lang.String m_mapAsName
private QName m_mapAsQName
private boolean m_hasMappingName
private TemplateElementBase m_effectiveMapping
Constructor Detail |
---|
public StructureElement()
Method Detail |
---|
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()
IComponent
hasName
in interface IComponent
hasName
in class StructureElementBase
true
if component has a name, false
if
notpublic java.lang.String getName()
StructureElementBase
getName
in interface IComponent
getName
in class StructureElementBase
public java.lang.String getUri()
StructureElementBase
getUri
in interface IComponent
getUri
in class StructureElementBase
null
if not set)public boolean hasAttribute()
IComponent
hasAttribute
in interface IComponent
hasAttribute
in class StructureElementBase
true
if one or more attribute values defined for
containing element, false
if notpublic boolean hasContent()
IComponent
hasContent
in interface IComponent
hasContent
in class StructureElementBase
true
if one or more content values defined
for containing element, false
if notpublic IClass getType()
IComponent
getType
in interface IComponent
getType
in class StructureElementBase
private void setQualifiedMapAs(java.lang.String text, IUnmarshallingContext ictx) throws JiBXException
text
- mapping name text (null
if none)ictx
- unmarshalling context
JiBXException
- on deserialization errorprivate java.lang.String getQualifiedMapAs(IMarshallingContext ictx) throws JiBXException
ictx
- marshalling context
null
if none)
JiBXException
- on deserialization errorprivate void preSet(IUnmarshallingContext uctx) throws JiBXException
uctx
- unmarshalling context
JiBXException
- 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 ContainerElementBase
vctx
- public void validate(ValidationContext vctx)
ElementBase
ElementBase.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 StructureElementBase
vctx
- validation contextprivate void setMappingReference(ValidationContext vctx, DefinitionContext dctx, IClass type)
vctx
- validation contextdctx
- definition contexttype
- referenced type
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |