public abstract class TemplateElementBase extends ContainerElementBase
| Modifier and Type | Field and Description |
|---|---|
protected ArrayList |
m_topChildren
List of child elements.
|
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 |
|---|
TemplateElementBase(int type)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
checkCompatibleChildren, classifyComponents, 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, setStyleNamegetComment, name, setComment, toString, type, validateAttributespublic static final StringArray s_allowedAttributes
protected ArrayList m_topChildren
public TemplateElementBase(int type)
type - element type codepublic 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()
ContainerElementBasehasObject in class ContainerElementBasetrue if defines context object,
false if notpublic IClass getObjectType()
ContainerElementBasegetObjectType in class ContainerElementBasepublic void prevalidate(ValidationContext vctx)
ElementBaseprevalidate 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 contextCopyright © 2005–2016 jibx.org. All rights reserved.