|
||||||
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 | |
---|---|
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 |
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(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. |
Methods inherited from class org.jibx.binding.model.NestingElementBase |
---|
addChild, childIterator, children, getDefaultStyle, getDefinitions, getStyle, getStyleName, setDefinitions, 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
private java.lang.String m_className
private IClass m_handledClass
protected java.util.ArrayList m_topChildren
private java.util.ArrayList m_extensionTypes
Constructor Detail |
---|
public TemplateElementBase(int type)
type
- element type codeMethod Detail |
---|
public 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()
ContainerElementBase
hasObject
in class ContainerElementBase
true
if defines context object,
false
if notpublic IClass getObjectType()
ContainerElementBase
getObjectType
in class ContainerElementBase
public void prevalidate(ValidationContext vctx)
ElementBase
prevalidate
in class ContainerElementBase
vctx
- validation contextpublic void validate(ValidationContext vctx)
ElementBase
ElementBase.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 ContainerElementBase
vctx
- validation context
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |