public abstract class TemplateElementBase extends ContainerElementBase
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
m_className
Name of handled class.
|
private java.util.ArrayList |
m_extensionTypes
Templates or mappings that can be used in place of this one (as
substitution group using mapping, or xsi:type with template).
|
private IClass |
m_handledClass
Handled class information.
|
protected java.util.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(java.lang.Object child)
Add top-level child element.
|
java.lang.String |
getClassName()
Get mapped class name.
|
java.util.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(java.lang.String name)
Set mapped class name.
|
java.util.Iterator |
topChildIterator()
Get iterator for top-level child elements.
|
java.util.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, setDefinitions, setStyleNamegetComment, name, setComment, toString, type, validateAttributespublic static final StringArray s_allowedAttributes
private java.lang.String m_className
private IClass m_handledClass
protected java.util.ArrayList m_topChildren
private java.util.ArrayList m_extensionTypes
public TemplateElementBase(int type)
type - element type codepublic void setClassName(java.lang.String name)
name - mapped class namepublic java.lang.String getClassName()
public IClass getHandledClass()
protected void addExtensionType(TemplateElementBase ext)
ext - derived template or mapping informationpublic java.util.ArrayList getExtensionTypes()
public abstract boolean isDefaultTemplate()
true if default for type, false if notpublic void addTopChild(java.lang.Object child)
child - element to be added as child of this elementpublic java.util.ArrayList topChildren()
null if nonepublic java.util.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 context