|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.jibx.schema.elements.SchemaBase
org.jibx.schema.elements.OpenAttrBase
org.jibx.schema.elements.AnnotatedBase
org.jibx.schema.elements.AttributeElement
public class AttributeElement
Base representation for both local and global attribute element definition.
| Field Summary | |
|---|---|
private java.lang.String |
m_default
'default' attribute value. |
private DefRefAttributeGroup |
m_defRef
Name or reference. |
private java.lang.String |
m_fixed
'fixed' attribute value. |
private FormChoiceAttribute |
m_formChoice
Form of name. |
private FilteredSegmentList |
m_inlineTypeList
Filtered list of inline type definition elements (zero or one only). |
private QName |
m_qname
Qualified name. |
private AttributeElement |
m_refElement
Attribute definition (from 'ref' attribute - null if
none). |
private QName |
m_type
'type' attribute value. |
private CommonTypeDefinition |
m_typeDefinition
Simple type definition (from 'type' attribute, or inline definition - null if none). |
private int |
m_useType
'use' attribute value type code. |
static int |
OPTIONAL_USE
|
static int |
PROHIBITED_USE
|
static int |
REQUIRED_USE
|
static StringArray |
s_allowedAttributes
List of allowed attribute names. |
static EnumSet |
s_useValues
|
| Fields inherited from interface org.jibx.schema.IComponent |
|---|
SCHEMA_NAMESPACE |
| Constructor Summary | |
|---|---|
AttributeElement()
Constructor. |
|
| Method Summary | |
|---|---|
private void |
clearType()
Clear any type information. |
java.lang.String |
getDefault()
Get 'default' attribute value. |
QName |
getEffectiveQName()
Get effective qualified name for attribute (whether defined directly, or by reference). |
java.lang.String |
getFixed()
Get 'fixed' attribute value. |
int |
getForm()
Get 'form' attribute type code. |
java.lang.String |
getFormText()
Get 'form' attribute name value. |
java.lang.String |
getName()
Get 'name' attribute value. |
QName |
getQName()
Get qualified name set directly on attribute. |
QName |
getRef()
Get 'ref' attribute value. |
AttributeElement |
getReference()
Get the referenced attribute declaration. |
QName |
getType()
Get 'type' attribute value. |
CommonTypeDefinition |
getTypeDefinition()
Get type definition. |
int |
getUse()
Get 'use' attribute type code. |
java.lang.String |
getUseText()
Get 'use' attribute text. |
boolean |
isInlineType()
Check if the attribute uses an inline type definition. |
protected void |
preset(IUnmarshallingContext ictx)
Pre-set method to be called by data binding while parsing element start tag. |
void |
prevalidate(ValidationContext vctx)
Prevalidate component information. |
void |
setDefault(java.lang.String dflt)
Set the 'default' attribute value. |
void |
setFixed(java.lang.String fixed)
Set 'fixed' attribute value. |
void |
setForm(int type)
Set 'form' attribute type code. |
void |
setName(java.lang.String name)
Set 'name' attribute value. |
void |
setRef(QName ref)
Set 'ref' attribute value. |
void |
setType(QName type)
Set 'type' attribute value. |
void |
setTypeDefinition(CommonTypeDefinition def)
Set type definition. |
void |
setUse(int code)
Set 'use' attribute type code. |
private void |
setUseText(java.lang.String text,
IUnmarshallingContext ictx)
Set 'use' attribute text. |
void |
validate(ValidationContext vctx)
Validate component information. |
| Methods inherited from class org.jibx.schema.elements.AnnotatedBase |
|---|
getAnnotation, getId, setAnnotation, setId |
| Methods inherited from class org.jibx.schema.elements.OpenAttrBase |
|---|
addExtraAttribute, clearExtraAttributes, compactChildren, detachChild, getChild, getChildCount, getChildIterator, getChildrenWritable, getExtraAttributes, preget, replaceChild, validateAttributes |
| Methods inherited from class org.jibx.schema.elements.SchemaBase |
|---|
addNamespaceDeclaration, bit, clearNamespaceDeclarations, getExtension, getNamespaceDeclarations, getParent, getSchema, isGlobal, name, readNamespaces, setExtension, setParent, type, validateAttributes, writeNamespaces |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final StringArray s_allowedAttributes
public static final int OPTIONAL_USE
public static final int PROHIBITED_USE
public static final int REQUIRED_USE
public static final EnumSet s_useValues
private final FilteredSegmentList m_inlineTypeList
private DefRefAttributeGroup m_defRef
private FormChoiceAttribute m_formChoice
private QName m_type
private int m_useType
private java.lang.String m_default
private java.lang.String m_fixed
private AttributeElement m_refElement
null if
none).
private CommonTypeDefinition m_typeDefinition
null if none).
private QName m_qname
| Constructor Detail |
|---|
public AttributeElement()
| Method Detail |
|---|
private void clearType()
protected void preset(IUnmarshallingContext ictx)
throws JiBXException
SchemaBase
preset in class SchemaBaseictx - unmarshalling context
JiBXException - on errorpublic QName getType()
null if not set)public void setType(QName type)
type - (null if not set)public java.lang.String getDefault()
null if not set)public void setDefault(java.lang.String dflt)
dflt - (null if not set)public java.lang.String getFixed()
null if not set)public void setFixed(java.lang.String fixed)
fixed - (null if not set)public int getUse()
public void setUse(int code)
code - (-1 to unset)public java.lang.String getUseText()
null if not set)
private void setUseText(java.lang.String text,
IUnmarshallingContext ictx)
text - ictx - public QName getQName()
getQName in interface INamednull if a reference)public QName getEffectiveQName()
public AttributeElement getReference()
null if not a
referencepublic boolean isInlineType()
true if inline, false if notpublic CommonTypeDefinition getTypeDefinition()
public void setTypeDefinition(CommonTypeDefinition def)
def - type definitionpublic java.lang.String getName()
getName in interface INamedDefRefAttributeGroup.getName()public QName getRef()
getRef in interface IReferenceDefRefAttributeGroup.getRef()public void setName(java.lang.String name)
name - DefRefAttributeGroup.setName(java.lang.String)public void setRef(QName ref)
ref - DefRefAttributeGroup.setRef(org.jibx.runtime.QName)public int getForm()
FormChoiceAttribute.getForm()public java.lang.String getFormText()
FormChoiceAttribute.getFormText()public void setForm(int type)
type - FormChoiceAttribute.setForm(int)public void prevalidate(ValidationContext vctx)
SchemaBase
prevalidate in interface IComponentprevalidate in class AnnotatedBasevctx - validation contextpublic void validate(ValidationContext vctx)
SchemaBaseSchemaBase.prevalidate(org.jibx.schema.validation.ValidationContext) method will always be called for every
component in the schema definition before this method is called for any component. This empty base class
implementation should be overridden by each subclass that requires validation handling.
validate in interface IComponentvalidate in class SchemaBasevctx - validation context
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||