|
||||||||||
| 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.TemplateElementBase
public abstract class TemplateElementBase
Model component for elements that define how instances of a particular class are converted to or from XML. This includes both mapping and template elements.
| Field Summary | |
|---|---|
protected ArrayList |
m_topChildren
List of child elements. |
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 | |
|---|---|
TemplateElementBase(int type)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
addExtensionType(TemplateElementBase ext)
Add template or mapping which derives from this one. |
void |
addTopChild(Object child)
Add top-level child element. |
String |
getClassName()
Get mapped class name. |
ArrayList |
getExtensionTypes()
Get templates or mappings which derive from this one. |
IClass |
getHandledClass()
Get handled class information. |
IClass |
getObjectType()
Get class linked to binding element. |
IClass |
getType()
|
boolean |
hasObject()
Check if this container defines a context object. |
abstract boolean |
isDefaultTemplate()
Check if default template for type. |
boolean |
isImplicit()
|
boolean |
isOptional()
|
void |
prevalidate(ValidationContext vctx)
Prevalidate element information. |
void |
setClassName(String name)
Set mapped class name. |
Iterator |
topChildIterator()
Get iterator for top-level child elements. |
ArrayList |
topChildren()
Get list of top-level child elements. |
void |
validate(ValidationContext vctx)
Validate element information. |
| 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
protected ArrayList m_topChildren
| Constructor Detail |
|---|
public TemplateElementBase(int type)
type - element type code| Method Detail |
|---|
public void setClassName(String name)
name - mapped class namepublic String getClassName()
public IClass getHandledClass()
protected void addExtensionType(TemplateElementBase ext)
ext - derived template or mapping informationpublic ArrayList getExtensionTypes()
public abstract boolean isDefaultTemplate()
true if default for type, false if notpublic void addTopChild(Object child)
child - element to be added as child of this elementpublic ArrayList topChildren()
null if nonepublic Iterator topChildIterator()
public boolean isOptional()
public IClass getType()
public boolean isImplicit()
public boolean hasObject()
ContainerElementBase
hasObject in class ContainerElementBasetrue if defines context object,
false if notpublic IClass getObjectType()
ContainerElementBase
getObjectType in class ContainerElementBasepublic void prevalidate(ValidationContext vctx)
ElementBase
prevalidate in class ContainerElementBasevctx - 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 ContainerElementBasevctx - validation context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||