|
||||||
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.ElementElement
public class ElementElement
<element> element definition. The same code is used for both global and local element definitions, with the differences checked during validation. TODO: implement common base class for attribute and element?
Field Summary | |
---|---|
static int |
EXTENSION_BLOCK
|
static int |
EXTENSION_FINAL
|
private long |
IDENTITY_CONSTRAINT_MASK
Mask bits for identity constraint children. |
private long |
INLINE_TYPE_MASK
Mask bits for inline type definition child. |
private boolean |
m_abstract
'abstract' attribute value. |
private AllEnumSet |
m_block
'block' attribute value. |
private java.lang.String |
m_default
'default' attribute value. |
private DefRefAttributeGroup |
m_defRef
Name or reference. |
private AllEnumSet |
m_final
'final' attribute value. |
private java.lang.String |
m_fixed
'fixed' attribute value. |
private FormChoiceAttribute |
m_formChoice
Form of name. |
private FilteredSegmentList |
m_identityConstraintList
Filtered list of identity constraint elements (zero or more). |
private FilteredSegmentList |
m_inlineTypeList
Filtered list of inline type definition elements (zero or one only). |
private boolean |
m_nillable
'nillable' attribute value. |
private OccursAttributeGroup |
m_occurs
Occurs attribute group. |
private QName |
m_qname
Qualified name (only defined after validation). |
private ElementElement |
m_refElement
Element definition (from 'ref' attribute - null if none). |
private QName |
m_substitutionGroup
'substitutionGroup' attribute information. |
private QName |
m_type
'type' attribute value. |
private CommonTypeDefinition |
m_typeDefinition
Complex or simple type definition (from 'type' attribute, or inline definition - null if none). |
static int |
RESTRICTION_BLOCK
|
static int |
RESTRICTION_FINAL
|
static StringArray |
s_allowedAttributes
List of allowed attribute names. |
static EnumSet |
s_blockValues
|
static EnumSet |
s_derivationValues
|
static int |
SUBSTITUTION_BLOCK
|
Fields inherited from interface org.jibx.schema.IComponent |
---|
SCHEMA_NAMESPACE |
Constructor Summary | |
---|---|
ElementElement()
Constructor. |
Method Summary | |
---|---|
private void |
clearType()
Clear any type information. |
AllEnumSet |
getBlock()
Get 'block' attribute. |
java.lang.String |
getDefault()
Get 'default' attribute value. |
AllEnumSet |
getFinal()
Get 'final' attribute. |
java.lang.String |
getFixed()
Get 'fixed' attribute value. |
int |
getForm()
Get 'form' attribute type code. |
java.lang.String |
getFormText()
Get 'form' attribute name value. |
FilteredSegmentList |
getIdentityConstraintList()
Get list of identity constraint child elements. |
Count |
getMaxOccurs()
Get 'maxOccurs' attribute value. |
Count |
getMinOccurs()
Get 'minOccurs' attribute value. |
java.lang.String |
getName()
Get 'name' attribute value. |
QName |
getQName()
Get qualified name for element. |
QName |
getRef()
Get 'ref' attribute value. |
ElementElement |
getReference()
Get the referenced element declaration. |
QName |
getSubstitutionGroup()
Get 'substitutionGroup' attribute value. |
QName |
getType()
Get 'type' attribute value. |
CommonTypeDefinition |
getTypeDefinition()
Get type definition. |
boolean |
isAbstract()
Check 'abstract' attribute value. |
boolean |
isInlineType()
Check if the element uses an inline type definition. |
boolean |
isNillable()
Check 'nillable' attribute value. |
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 |
setAbstract(boolean abs)
Set 'abstract' attribute value. |
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 |
setMaxOccurs(Count count)
Set 'maxOccurs' attribute value. |
void |
setMinOccurs(Count count)
Get 'maxOccurs' attribute value. |
void |
setName(java.lang.String name)
Set 'name' attribute value. |
void |
setNillable(boolean nil)
Set 'nillable' attribute value. |
void |
setRef(QName ref)
Set 'ref' attribute value. |
void |
setSubstitutionGroup(QName qname)
Set 'substitutionGroup' attribute value. |
void |
setType(QName type)
Set 'type' attribute value. |
void |
setTypeDefinition(CommonTypeDefinition def)
Set type definition (either inline, or as reference). |
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
private long INLINE_TYPE_MASK
private long IDENTITY_CONSTRAINT_MASK
public static final int EXTENSION_BLOCK
public static final int RESTRICTION_BLOCK
public static final int SUBSTITUTION_BLOCK
public static final EnumSet s_blockValues
public static final int EXTENSION_FINAL
public static final int RESTRICTION_FINAL
public static final EnumSet s_derivationValues
private final FilteredSegmentList m_inlineTypeList
private final FilteredSegmentList m_identityConstraintList
private DefRefAttributeGroup m_defRef
private FormChoiceAttribute m_formChoice
private OccursAttributeGroup m_occurs
private QName m_type
private java.lang.String m_default
private java.lang.String m_fixed
private boolean m_abstract
private boolean m_nillable
private AllEnumSet m_block
private AllEnumSet m_final
private QName m_substitutionGroup
private ElementElement m_refElement
null
if none).
private CommonTypeDefinition m_typeDefinition
null
if none).
private QName m_qname
Constructor Detail |
---|
public ElementElement()
Method Detail |
---|
private void clearType()
protected void preset(IUnmarshallingContext ictx) throws JiBXException
SchemaBase
preset
in class SchemaBase
ictx
- 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 boolean isAbstract()
public void setAbstract(boolean abs)
abs
- abstract attribute valuepublic boolean isNillable()
null
if not set)public void setNillable(boolean nil)
nil
- nillable attribute value (null
if not set)public AllEnumSet getFinal()
public AllEnumSet getBlock()
public QName getSubstitutionGroup()
null
if not set)public void setSubstitutionGroup(QName qname)
qname
- (null
if not set)public ElementElement getReference()
null
if not a referencepublic QName getQName()
getQName
in interface INamed
null
if a reference)public boolean isInlineType()
true
if inline, false
if notpublic CommonTypeDefinition getTypeDefinition()
null
if empty type definition)public void setTypeDefinition(CommonTypeDefinition def)
def
- inline type definitionpublic FilteredSegmentList getIdentityConstraintList()
public java.lang.String getName()
getName
in interface INamed
DefRefAttributeGroup.getName()
public QName getRef()
getRef
in interface IReference
DefRefAttributeGroup.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 Count getMaxOccurs()
getMaxOccurs
in interface IArity
OccursAttributeGroup.getMaxOccurs()
public Count getMinOccurs()
getMinOccurs
in interface IArity
OccursAttributeGroup.getMinOccurs()
public void setMaxOccurs(Count count)
setMaxOccurs
in interface IArity
count
- OccursAttributeGroup.setMaxOccurs(org.jibx.schema.types.Count)
public void setMinOccurs(Count count)
setMinOccurs
in interface IArity
count
- OccursAttributeGroup.setMinOccurs(org.jibx.schema.types.Count)
public void prevalidate(ValidationContext vctx)
SchemaBase
prevalidate
in interface IComponent
prevalidate
in class AnnotatedBase
vctx
- validation contextpublic void validate(ValidationContext vctx)
SchemaBase
SchemaBase.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 IComponent
validate
in class SchemaBase
vctx
- validation context
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |