|
||||||||||
| 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
public abstract class ContainerElementBase
Model component for elements that can contain detailed binding information in the form of nested child components. Elements of this type include mapping, template, structure, and collection elements.
| Field Summary | |
|---|---|
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 | |
|---|---|
protected |
ContainerElementBase(int type)
Constructor. |
| Method Summary | |
|---|---|
protected void |
checkCompatibleChildren(ValidationContext vctx,
IClass type,
ArrayList children)
Check that child components are of types compatible with the container object type. |
protected void |
classifyComponents(ValidationContext vctx)
Classify child components as contributing attributes, content, or both. |
ArrayList |
getAttributeComponents()
Get list of child components contributing attribute items to this container element. |
IClass |
getChildObjectType()
Get class passed to child components. |
ArrayList |
getContentComponents()
Get list of child components contributing content items to this container element. |
IClass |
getCreateClass()
Get new instance creation class information. |
String |
getCreateType()
Get type to be used for creating new instance. |
IClassItem |
getFactory()
Get factory method information. |
String |
getFactoryName()
Get factory method name. |
IComponent |
getId()
Get ID property child. |
String |
getLabel()
Get label for this definition. |
IClass |
getMarshaller()
Get marshaller class information. |
String |
getMarshallerName()
Get marshaller class name. |
abstract IClass |
getObjectType()
Get class linked to binding element. |
IClassItem |
getPostset()
Get post-set method information. |
String |
getPostsetName()
Get post-set method name. |
IClassItem |
getPreget()
Get pre-get method information. |
String |
getPregetName()
Get pre-get method name. |
IClassItem |
getPreset()
Get pre-set method information. |
String |
getPresetName()
Get pre-set method name. |
IClass |
getUnmarshaller()
Get unmarshaller class information. |
String |
getUnmarshallerName()
Get unmarshaller class name. |
String |
getUsing()
Get label for definition to be used. |
abstract boolean |
hasObject()
Check if this container defines a context object. |
boolean |
isAllowRepeats()
Check if repeated child elements are allowed. |
boolean |
isChoice()
Check if child components are a choice. |
protected boolean |
isClassified()
Check for child components classified. |
boolean |
isFlexible()
Get flexible flag. |
boolean |
isNillable()
Check if nillable object. |
boolean |
isOrdered()
Check if child components are ordered. |
void |
prevalidate(ValidationContext vctx)
Prevalidate element information. |
void |
setAllowRepeats(boolean ignore)
Set repeated child elements allowed flag. |
void |
setChoice(boolean choice)
Set child components choice flag. |
protected void |
setComponents(ArrayList attribs,
ArrayList contents)
Set child attribute and content components directly. |
void |
setCreateType(String name)
Set new instance type class name. |
void |
setFactoryName(String name)
Set factory method name. |
void |
setFlexible(boolean flexible)
Set flexible flag. |
void |
setIdChild(IComponent child,
ValidationContext vctx)
Set ID property child. |
void |
setLabel(String label)
Set label for this definition. |
void |
setMarshallerName(String name)
Set marshaller class name. |
void |
setNillable(boolean nillable)
Set nillable flag. |
void |
setOrdered(boolean ordered)
Set child components ordered flag. |
void |
setPostsetName(String name)
Set post-set method name. |
void |
setPregetName(String name)
Set pre-get method name. |
void |
setPresetName(String name)
Set pre-set method name. |
void |
setUnmarshallerName(String name)
Set unmarshaller class name. |
void |
setUsing(String label)
Set label for definition to be used. |
void |
validate(ValidationContext vctx)
Validate element information. |
protected void |
verifyConstruction(ValidationContext vctx,
IClass type)
Check that there's a way to construct an instance of an object class for input bindings. |
| Methods inherited from class org.jibx.binding.model.NestingElementBase |
|---|
addChild, childIterator, children, getDefaultStyle, getDefinitions, getStyle, getStyleName, 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
| Constructor Detail |
|---|
protected ContainerElementBase(int type)
type - element type code| Method Detail |
|---|
public String getLabel()
public void setLabel(String label)
label - label for this definitionpublic String getUsing()
public void setUsing(String label)
label - label for definition to be usedpublic ArrayList getContentComponents()
public ArrayList getAttributeComponents()
public abstract boolean hasObject()
true if defines context object,
false if notpublic abstract IClass getObjectType()
public IClass getChildObjectType()
public final void setIdChild(IComponent child,
ValidationContext vctx)
child - child defining the ID propertyvctx - validation contextpublic IComponent getId()
public String getFactoryName()
null if none)public IClassItem getFactory()
prevalidate(ValidationContext).
null if none)public void setFactoryName(String name)
name - fully qualified class and method name for object factorypublic String getPresetName()
null if none)public IClassItem getPreset()
prevalidate(ValidationContext).
null if none)public void setPresetName(String name)
name - member method name to be called before unmarshallingpublic String getPostsetName()
null if none)public IClassItem getPostset()
prevalidate(ValidationContext).
null if none)public void setPostsetName(String name)
name - member method name to be called after unmarshallingpublic String getPregetName()
null if none)public IClassItem getPreget()
prevalidate(ValidationContext).
null if none)public void setPregetName(String name)
name - member method name to be called before marshallingpublic String getMarshallerName()
null if none)public IClass getMarshaller()
prevalidate(ValidationContext).
null if none)public void setMarshallerName(String name)
name - class name to be used for marshallingpublic String getUnmarshallerName()
null if none)public IClass getUnmarshaller()
prevalidate(ValidationContext).
null if none)public void setUnmarshallerName(String name)
name - class name to be used for unmarshallingpublic boolean isNillable()
public void setNillable(boolean nillable)
nillable - flagpublic String getCreateType()
null if none)public IClass getCreateClass()
prevalidate(ValidationContext).
null if
none)public void setCreateType(String name)
name - class name to be used for creating new instancepublic boolean isFlexible()
public void setFlexible(boolean flexible)
flexible - public boolean isOrdered()
true if ordered, false if notpublic void setOrdered(boolean ordered)
ordered - true if ordered, false if notpublic boolean isChoice()
true if choice, false if notpublic void setChoice(boolean choice)
choice - true if choice, false if notpublic boolean isAllowRepeats()
true if repeats allowed, false if notpublic void setAllowRepeats(boolean ignore)
ignore - true if repeated child elements to be allowed,
false if not
protected void verifyConstruction(ValidationContext vctx,
IClass type)
prevalidate(ValidationContext).
vctx - validation contexttype - constructed object type
protected void checkCompatibleChildren(ValidationContext vctx,
IClass type,
ArrayList children)
vctx - validation contexttype - structure object typechildren - list of child components to be checkedprotected boolean isClassified()
true if classified, false if notprotected void classifyComponents(ValidationContext vctx)
vctx -
protected void setComponents(ArrayList attribs,
ArrayList contents)
attribs - contents - public void prevalidate(ValidationContext vctx)
ElementBase
prevalidate in class NestingElementBasevctx - validation contextpublic 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 NestingElementBasevctx - validation context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||