|
||||||||||
| 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.ValueElement
public class ValueElement
Model component for value element. This element defines a value that can be represented as a simple text string, which may be expressed as an attribute, element, or text component of the XML document.
| Field Summary | |
|---|---|
static int |
CDATA_STYLE
|
static int |
DEF_IDENT
|
static int |
NONE_IDENT
|
static int |
REF_IDENT
|
static StringArray |
s_allowedAttributes
Enumeration of allowed attribute names |
static int |
TEXT_STYLE
|
| 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 | |
|---|---|
ValueElement()
Constructor. |
|
| Method Summary | |
|---|---|
String |
getConstantValue()
Get constant value. |
String |
getDeclaredType()
Get declared type name. |
Object |
getDefault()
Get default value. |
String |
getDefaultText()
Get default value text. |
IClassItem |
getDeserializer()
Get deserializer method information. |
String |
getDeserializerName()
Get deserializer name. |
String |
getEffectiveStyleName()
Get name for style that applies to this value. |
IClassItem |
getEnumValue()
Get enum value method information. |
String |
getEnumValueName()
Get enum value method name. |
IClassItem |
getField()
Get field information. |
String |
getFieldName()
Get field name. |
String |
getFormatName()
Get base format name. |
QName |
getFormatQName()
Get format qualified name. |
IClassItem |
getGet()
Get get method information. |
String |
getGetName()
Get get method name. |
IClass |
getGetType()
Get type for value loaded to stack. |
int |
getIdent()
Get identity value. |
String |
getIdentName()
Get identity string value. |
String |
getName()
Get name. |
NamespaceElement |
getNamespace()
Get effective namespace information. |
String |
getPrefix()
Get specified namespace prefix. |
IClassItem |
getSerializer()
Get serializer method information. |
String |
getSerializerName()
Get serializer name. |
IClassItem |
getSet()
Get set method information. |
String |
getSetName()
Get set method name. |
IClass |
getSetType()
Get type for value stored from stack. |
int |
getStyle()
Get style value. |
String |
getStyleName()
Get style string value. |
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 |
hasProperty()
Check if property is defined. |
boolean |
isImplicit()
Check if this value implicitly uses the containing object. |
boolean |
isNillable()
Check if nillable object. |
boolean |
isOptional()
Check if component is an optional item. |
void |
prevalidate(ValidationContext vctx)
Prevalidate element information. |
void |
setConstantValue(String value)
Set constant value. |
void |
setDeclaredType(String type)
Set declared type name. |
void |
setDefaultText(String value)
Set default value text. |
void |
setDeserializerName(String name)
Set deserializer method name. |
void |
setEffectiveStyle(int style)
Set style that applies to this value. |
void |
setEnumValueName(String name)
Set enum value method name. |
void |
setFieldName(String field)
Set field name. |
void |
setFormatName(String name)
Set base format name. |
void |
setFormatQName(QName qname)
Set format qualified name. |
void |
setGetName(String get)
Set get method name. |
void |
setIdentName(String name)
Set identity name. |
void |
setName(String name)
Set name. |
void |
setNillable(boolean nillable)
Set nillable flag. |
void |
setPrefix(String prefix)
Set namespace prefix. |
void |
setSerializerName(String name)
Set serializer method name. |
void |
setSetName(String set)
Set set method name. |
void |
setStyleName(String name)
Set style 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.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
public static final int CDATA_STYLE
public static final int TEXT_STYLE
public static final int NONE_IDENT
public static final int DEF_IDENT
public static final int REF_IDENT
| Constructor Detail |
|---|
public ValueElement()
| Method Detail |
|---|
public String getConstantValue()
null if not a constantpublic void setConstantValue(String value)
value - constant value, or null if not a constantpublic String getStyleName()
public int getStyle()
public void setStyleName(String name)
name - style name (null if to use inherited default)public String getEffectiveStyleName()
public void setEffectiveStyle(int style)
style - style valuepublic String getIdentName()
public int getIdent()
public void setIdentName(String name)
name - identity namepublic 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 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 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 isNillable()
public void setNillable(boolean nillable)
nillable - flagpublic boolean isImplicit()
prevalidate(ValidationContext).
isImplicit in interface IComponenttrue if using the containing object,
false if own valuepublic String getDefaultText()
public Object getDefault()
public void setDefaultText(String value)
value - default value textpublic IClassItem getEnumValue()
validate(ValidationContext).
null if none)public String getEnumValueName()
null if none)public void setEnumValueName(String name)
name - enum value method name (null if none)public String getFormatName()
public void setFormatName(String name)
name - referenced base formatpublic QName getFormatQName()
null if none)public void setFormatQName(QName qname)
qname - format qualified name (null if none)public String getSerializerName()
null if none)public IClassItem getSerializer()
null if none)public void setSerializerName(String name)
name - fully qualified class and method name for serializerpublic String getDeserializerName()
null if none)public IClassItem getDeserializer()
null if none)public void setDeserializerName(String name)
name - fully qualified class and method name for deserializerpublic 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 isOptional()
IComponent
isOptional in interface IComponenttrue if optional, false if requiredpublic boolean hasName()
IComponent
hasName in interface IComponenttrue if component has a name, false if
notpublic IClass getType()
IComponent
getType in interface IComponentpublic void prevalidate(ValidationContext vctx)
ElementBase
prevalidate in class ElementBasevctx - 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 ElementBasevctx - validation context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||