|
||||||||||
| 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.StructureElementBase
public abstract class StructureElementBase
Model component for elements that define the binding structure for an object property. This is the base class for 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 |
StructureElementBase(int type)
Constructor. |
| Method Summary | |
|---|---|
String |
getDeclaredType()
Get declared type name. |
IClassItem |
getField()
Get field information. |
String |
getFieldName()
Get field name. |
IClassItem |
getFlag()
Get flag method information. |
IClassItem |
getGet()
Get get method information. |
String |
getGetName()
Get get method name. |
IClass |
getGetType()
Get type for value loaded to stack. |
String |
getName()
Get name. |
NamespaceElement |
getNamespace()
Get effective namespace information. |
IClass |
getObjectType()
Get class linked to binding element. |
String |
getPrefix()
Get specified namespace prefix. |
IClassItem |
getSet()
Get set method information. |
String |
getSetName()
Get set method name. |
IClass |
getSetType()
Get type for value stored from stack. |
IClassItem |
getTest()
Get test method information. |
String |
getTestName()
Get test method name. |
IClass |
getType()
Get value type information. |
String |
getUri()
Get specified namespace URI. |
int |
getUsage()
Get usage value. |
String |
getUsageName()
Get usage name. |
boolean |
hasAttribute()
Check if component defines one or more attribute values of the containing element. |
boolean |
hasContent()
Check if component defines one or more elements or text values as children of the containing element. |
boolean |
hasName()
Check if component has a name. |
boolean |
hasObject()
Check if this container defines a context object. |
boolean |
hasProperty()
Check if property is defined. |
boolean |
isFlagOnly()
Check if property is flag only. |
boolean |
isImplicit()
Check if this value implicitly uses the containing object. |
boolean |
isOptional()
Check if component is an optional item. |
void |
prevalidate(ValidationContext vctx)
Prevalidate element information. |
void |
setDeclaredType(String type)
Set declared type name. |
void |
setFieldName(String field)
Set field name. |
void |
setFlagName(String flag)
Set flag method name. |
void |
setGetName(String get)
Set get method name. |
void |
setName(String name)
Set name. |
void |
setPrefix(String prefix)
Set namespace prefix. |
void |
setSetName(String set)
Set set method name. |
void |
setTestName(String test)
Set test method name. |
void |
setUri(String uri)
Set namespace URI. |
void |
setUsage(int use)
Set usage value. |
void |
setUsageName(String name)
Set usage name. |
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
| Constructor Detail |
|---|
protected StructureElementBase(int type)
type - element type code| Method Detail |
|---|
public String getName()
getName in interface IComponentpublic void setName(String name)
name - text for namepublic String getUri()
getUri in interface IComponentnull if not set)public void setUri(String uri)
uri - namespace URI (null if not set)public String getPrefix()
null if not set)public void setPrefix(String prefix)
prefix - namespace prefix (null if not set)public NamespaceElement getNamespace()
public String getUsageName()
public int getUsage()
prevalidate(ValidationContext).
public void setUsageName(String name)
name - usage namepublic void setUsage(int use)
use - valuepublic boolean hasProperty()
prevalidate(ValidationContext).
true if property defined, false if notpublic boolean isFlagOnly()
prevalidate(ValidationContext).
true if flag property, false if notpublic String getDeclaredType()
null if none)public void setDeclaredType(String type)
type - name (or null if none)public String getFieldName()
null if none)public IClassItem getField()
prevalidate(ValidationContext).
null if none)public void setFieldName(String field)
field - field name (or null if none)public String getTestName()
null if none)public IClassItem getTest()
prevalidate(ValidationContext).
null if none)public void setTestName(String test)
test - test method name (or null if none)public IClassItem getFlag()
prevalidate(ValidationContext).
null if none)public void setFlagName(String flag)
flag - flag method name (or null if none)public String getGetName()
null if none)public IClassItem getGet()
prevalidate(ValidationContext).
null if none)public IClass getGetType()
prevalidate(ValidationContext).
null if none)public void setGetName(String get)
get - get method name (or null if none)public String getSetName()
null if none)public IClassItem getSet()
prevalidate(ValidationContext).
null if none)public IClass getSetType()
prevalidate(ValidationContext).
null if none)public void setSetName(String set)
set - set method name (or null if none)public boolean isImplicit()
prevalidate(ValidationContext).
isImplicit in interface IComponenttrue if using the containing object,
false if own valuepublic boolean isOptional()
IComponent
isOptional in interface IComponenttrue if optional, false if requiredpublic boolean hasObject()
ContainerElementBase
hasObject in class ContainerElementBasetrue if defines context object,
false if notpublic boolean hasAttribute()
IComponent
hasAttribute in interface IComponenttrue if one or more attribute values defined for
containing element, false if notpublic boolean hasContent()
IComponent
hasContent in interface IComponenttrue if one or more content values defined
for containing element, false if notpublic boolean hasName()
IComponent
hasName in interface IComponenttrue if component has a name, false if
notpublic IClass getType()
IComponent
getType in interface IComponentpublic 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 | |||||||||