public abstract class StructureElementBase extends ContainerElementBase implements IComponent
Type | Property and Description |
---|---|
boolean |
has
Check if property is defined.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
m_collectionItem
Flag for child of collection element (only meaningful after
prevalidation).
|
private NameAttributes |
m_nameAttrs
Name attributes information for nesting.
|
private PropertyAttributes |
m_propertyAttrs
Property attributes information for nesting.
|
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
Modifier | Constructor and Description |
---|---|
protected |
StructureElementBase(int type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDeclaredType()
Get declared type name.
|
IClassItem |
getField()
Get field information.
|
java.lang.String |
getFieldName()
Get field name.
|
IClassItem |
getFlag()
Get flag method information.
|
IClassItem |
getGet()
Get get method information.
|
java.lang.String |
getGetName()
Get get method name.
|
IClass |
getGetType()
Get type for value loaded to stack.
|
java.lang.String |
getName()
Get name.
|
NamespaceElement |
getNamespace()
Get effective namespace information.
|
IClass |
getObjectType()
Get class linked to binding element.
|
java.lang.String |
getPrefix()
Get specified namespace prefix.
|
IClassItem |
getSet()
Get set method information.
|
java.lang.String |
getSetName()
Get set method name.
|
IClass |
getSetType()
Get type for value stored from stack.
|
IClassItem |
getTest()
Get test method information.
|
java.lang.String |
getTestName()
Get test method name.
|
IClass |
getType()
Get value type information.
|
java.lang.String |
getUri()
Get specified namespace URI.
|
int |
getUsage()
Get usage value.
|
java.lang.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(java.lang.String type)
Set declared type name.
|
void |
setFieldName(java.lang.String field)
Set field name.
|
void |
setFlagName(java.lang.String flag)
Set flag method name.
|
void |
setGetName(java.lang.String get)
Set get method name.
|
void |
setName(java.lang.String name)
Set name.
|
void |
setPrefix(java.lang.String prefix)
Set namespace prefix.
|
void |
setSetName(java.lang.String set)
Set set method name.
|
void |
setTestName(java.lang.String test)
Set test method name.
|
void |
setUri(java.lang.String uri)
Set namespace URI.
|
void |
setUsage(int use)
Set usage value.
|
void |
setUsageName(java.lang.String name)
Set usage name.
|
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, verifyConstruction
addChild, childIterator, children, getDefaultStyle, getDefinitions, getStyle, getStyleName, setDefinitions, setStyleName
getComment, name, setComment, toString, type, validateAttributes
public boolean hasProperty
prevalidate(ValidationContext)
.public static final StringArray s_allowedAttributes
private PropertyAttributes m_propertyAttrs
private NameAttributes m_nameAttrs
private boolean m_collectionItem
protected StructureElementBase(int type)
type
- element type codepublic java.lang.String getName()
getName
in interface IComponent
public void setName(java.lang.String name)
name
- text for namepublic java.lang.String getUri()
getUri
in interface IComponent
null
if not set)public void setUri(java.lang.String uri)
uri
- namespace URI (null
if not set)public java.lang.String getPrefix()
null
if not set)public void setPrefix(java.lang.String prefix)
prefix
- namespace prefix (null
if not set)public NamespaceElement getNamespace()
public java.lang.String getUsageName()
public int getUsage()
prevalidate(ValidationContext)
.public void setUsageName(java.lang.String name)
name
- usage namepublic void setUsage(int use)
use
- valuepublic boolean hasProperty()
prevalidate(ValidationContext)
.public boolean isFlagOnly()
prevalidate(ValidationContext)
.true
if flag property, false
if notpublic java.lang.String getDeclaredType()
null
if none)public void setDeclaredType(java.lang.String type)
type
- name (or null
if none)public java.lang.String getFieldName()
null
if none)public IClassItem getField()
prevalidate(ValidationContext)
.null
if none)public void setFieldName(java.lang.String field)
field
- field name (or null
if none)public java.lang.String getTestName()
null
if none)public IClassItem getTest()
prevalidate(ValidationContext)
.null
if none)public void setTestName(java.lang.String test)
test
- test method name (or null
if none)public IClassItem getFlag()
prevalidate(ValidationContext)
.null
if none)public void setFlagName(java.lang.String flag)
flag
- flag method name (or null
if none)public java.lang.String getGetName()
null
if none)public IClassItem getGet()
prevalidate(ValidationContext)
.null
if none)public IClass getGetType()
prevalidate(ValidationContext)
.null
if none)public void setGetName(java.lang.String get)
get
- get method name (or null
if none)public java.lang.String getSetName()
null
if none)public IClassItem getSet()
prevalidate(ValidationContext)
.null
if none)public IClass getSetType()
prevalidate(ValidationContext)
.null
if none)public void setSetName(java.lang.String set)
set
- set method name (or null
if none)public boolean isImplicit()
prevalidate(ValidationContext)
.isImplicit
in interface IComponent
true
if using the containing object,
false
if own valuepublic boolean isOptional()
IComponent
isOptional
in interface IComponent
true
if optional, false
if requiredpublic boolean hasObject()
ContainerElementBase
hasObject
in class ContainerElementBase
true
if defines context object,
false
if notpublic boolean hasAttribute()
IComponent
hasAttribute
in interface IComponent
true
if one or more attribute values defined for
containing element, false
if notpublic boolean hasContent()
IComponent
hasContent
in interface IComponent
true
if one or more content values defined
for containing element, false
if notpublic boolean hasName()
IComponent
hasName
in interface IComponent
true
if component has a name, false
if
notpublic IClass getType()
IComponent
getType
in interface IComponent
public 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