|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.binding.def.NestedBase
public abstract class NestedBase
Base class for structure and collection binding definitions. This handles one or more child components, which may be ordered or unordered.
| Field Summary | |
|---|---|
protected int |
m_accessLevel
Access level for default mappings. |
protected ArrayList |
m_attributes
Included attribute definitions (lazy create, only if needed). |
protected int |
m_autoLink
Auto-link style for default mappings. |
protected IContainer |
m_container
Containing binding component. |
protected ArrayList |
m_contents
Nested content definitions (initially used for all child components). |
protected boolean |
m_isFlexible
Flag for flexible element handling (used by subclasses). |
protected boolean |
m_isOrdered
Flag for ordered child content (used by subclasses). |
protected int |
m_nameStyle
Style used for generating element or attribute names. |
protected String |
m_stripPrefix
Prefix text to be stripped from names. |
protected String |
m_stripSuffix
Suffix text to be stripped from names. |
protected int |
m_styleDefault
Default style for value expression. |
| Constructor Summary | |
|---|---|
NestedBase(IContainer contain,
IContextObj objc,
boolean ord,
boolean flex,
boolean defc)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addComponent(IComponent comp)
Add child component to nested structure. |
void |
genContentPresentTest(ContextMethodBuilder mb)
Generate code to test for content present. |
ArrayList |
getAttributes()
Get the attribute children of this mapping. |
BindingDefinition |
getBindingRoot()
Get root of binding definition. |
ArrayList |
getContents()
Get the content children of this mapping. |
DefinitionContext |
getDefinitionContext()
Get definition context for binding element. |
int |
getStyleDefault()
|
String |
getType()
Get type expected by component. |
NameDefinition |
getWrapperName()
Get element wrapper name. |
boolean |
hasContent()
Check if component defines one or more elements or text values as children of the containing element. |
boolean |
hasNamespaces()
|
boolean |
isContentOrdered()
Check if content children are ordered. |
boolean |
isFlexible()
Check if flexible unmarshalling. |
boolean |
isOptional()
Check if component is an optional item. |
void |
setObjectContext(IContextObj objc)
Set the object context. |
void |
unmarshal(UnmarshallingContext ctx)
Unmarshal common container attributes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jibx.binding.def.IComponent |
|---|
genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentUnmarshal, genLoadId, genNewInstance, hasAttribute, hasId, print |
| Methods inherited from interface org.jibx.binding.def.ILinkable |
|---|
setLinkages |
| Methods inherited from interface org.jibx.binding.def.IContainer |
|---|
getStyleDefault |
| Field Detail |
|---|
protected final boolean m_isOrdered
protected final boolean m_isFlexible
protected ArrayList m_attributes
protected ArrayList m_contents
protected IContainer m_container
protected int m_styleDefault
protected int m_autoLink
protected int m_accessLevel
protected String m_stripPrefix
protected String m_stripSuffix
protected int m_nameStyle
| Constructor Detail |
|---|
public NestedBase(IContainer contain,
IContextObj objc,
boolean ord,
boolean flex,
boolean defc)
contain - containing binding definition contextobjc - current object contextord - ordered content flagflex - flexible element handling flagdefc - define context for structure flag| Method Detail |
|---|
public void setObjectContext(IContextObj objc)
objc - object contextpublic ArrayList getAttributes()
null if none; should not
be modified)public ArrayList getContents()
public void addComponent(IComponent comp)
ILinkable.setLinkages() is called the
components are checked to determine whether they actually supply
attribute(s), content, or both.
comp - child component to be added to structurepublic boolean isFlexible()
public boolean isContentOrdered()
IContainer
isContentOrdered in interface IContainertrue if ordered, false if notpublic boolean hasNamespaces()
public BindingDefinition getBindingRoot()
IContainer
getBindingRoot in interface IContainerpublic DefinitionContext getDefinitionContext()
IContainer
getDefinitionContext in interface IContainerpublic boolean isOptional()
IComponent
isOptional in interface IComponenttrue if optional, false if requiredpublic boolean hasContent()
IComponentILinkable.setLinkages().
hasContent in interface IComponenttrue if one or more content values defined
for containing element, false if not
public void genContentPresentTest(ContextMethodBuilder mb)
throws JiBXException
IComponent
genContentPresentTest in interface IComponentmb - method builder
JiBXException - if configuration errorpublic String getType()
IComponent
getType in interface IComponentpublic NameDefinition getWrapperName()
IComponent
getWrapperName in interface IComponentnull if no wrapper element
public void unmarshal(UnmarshallingContext ctx)
throws JiBXException
ctx - unmarshalling context information
JiBXException - if error in unmarshallingpublic int getStyleDefault()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||