|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.schema.Structure
org.exolab.castor.xml.schema.Annotated
org.exolab.castor.xml.schema.Particle
org.exolab.castor.xml.schema.ElementDecl
public class ElementDecl
An XML Schema ElementDecl
Field Summary |
---|
Fields inherited from class org.exolab.castor.xml.schema.Particle |
---|
UNBOUNDED |
Fields inherited from class org.exolab.castor.xml.schema.Structure |
---|
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, MODELGROUP, MODELGROUP_REF, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD |
Constructor Summary | |
---|---|
ElementDecl(Schema schema)
Creates a new default element definition |
|
ElementDecl(Schema schema,
java.lang.String name)
Creates a new default element definition |
Method Summary | |
---|---|
void |
addIdentityConstraint(IdentityConstraint constraint)
Adds the given IdentityConstraint to this element definition. |
BlockList |
getBlock()
Returns the value of the 'block' attribute for this element |
java.lang.String |
getDefaultValue()
Returns the default value of this element definition. |
FinalList |
getFinal()
Returns the value of the 'final' attribute for this element definition. |
java.lang.String |
getFixedValue()
Returns the fixed value of this element definition. |
Form |
getForm()
Returns the Form for this element definition. |
java.lang.String |
getId()
Returns the 'id' for this element definition. |
java.util.Enumeration |
getIdentityConstraints()
Returns an Enumeration of IdentityConstraint objects contained within this element definition. |
java.lang.String |
getName()
Returns the name of this Element declaration. |
java.lang.String |
getName(boolean ignoreRef)
Returns the name of this Element declaration. |
Structure |
getParent()
Returns the parent of this ElementDecl, this value may be null if no parent has been set. |
ElementDecl |
getReference()
Returns the ElementDecl that this element definition references. |
java.lang.String |
getReferenceId()
Returns the Id used to Refer to this Object |
java.lang.String |
getReferenceName()
Returns the actual reference name of this AttributeDecl, or null if this AttributeDecl is not a reference. |
Schema |
getSchema()
Returns the XML Schema to which this element declaration belongs. |
short |
getStructureType()
Returns the type of this Schema Structure |
java.lang.String |
getSubstitutionGroup()
Returns the substitutionGroup for this element declaration, or null if it's absent. |
java.util.Enumeration |
getSubstitutionGroupMembers()
Returns an enumeration of the elements that can be substitute to this element declaration. |
XMLType |
getType()
Returns the XMLType (ComplexType or SimpleType) of this ElementDecl. |
boolean |
hasChildren()
Returns true if this element has children (i.e if it holds attributes or elements). |
boolean |
isAbstract()
Returns true if this element definition is abstract |
boolean |
isNillable()
Returns whether or not instances of this element definition may appear with no content. |
boolean |
isReference()
Returns true if this element definition simply references another element Definition |
boolean |
removeIdentityConstraint(IdentityConstraint constraint)
Removes the given IdentityConstraint from this element definition. |
void |
setAbstract(boolean isAbstract)
Sets whether or not this element definition is abstract |
void |
setBlock(BlockList block)
Sets the value of the 'block' attribute for this element |
void |
setBlock(java.lang.String block)
Sets the value of the 'block' attribute for this element |
void |
setDefaultValue(java.lang.String value)
Sets the default value for this element definition. |
void |
setFinal(FinalList finalList)
Sets the value of the 'final' attribute for this element definition. |
void |
setFinal(java.lang.String finalValue)
Sets the value of the 'final' attribute for this element definition. |
void |
setFixedValue(java.lang.String value)
Sets the fixed value for this element definition. |
void |
setForm(Form form)
Sets the Form for this element definition. |
void |
setId(java.lang.String id)
Sets the Id for this element definition. |
void |
setName(java.lang.String name)
Sets the name of the element that this Element definition defines. |
void |
setNillable(boolean nillable)
Sets whether or not instances of this element definition may contain empty content |
protected void |
setParent(Structure parent)
Sets the parent for this ElementDecl. |
void |
setReference(ElementDecl reference)
Sets the reference for this element definition |
void |
setReference(java.lang.String reference)
Sets the reference for this element definition |
void |
setSubstitutionGroup(java.lang.String substitutionGroup)
Sets the substitutionGroup for this element definition. |
void |
setType(XMLType type)
Sets the XMLType for this Element declaration. |
void |
setTypeReference(java.lang.String name)
Sets the type of this element to be a reference. |
void |
validate()
Checks the validity of this element definition. |
Methods inherited from class org.exolab.castor.xml.schema.Particle |
---|
getMaxOccurs, getMinOccurs, setMaxOccurs, setMinOccurs |
Methods inherited from class org.exolab.castor.xml.schema.Annotated |
---|
addAnnotation, getAnnotations, removeAnnotation |
Methods inherited from class org.exolab.castor.xml.schema.Structure |
---|
isValid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ElementDecl(Schema schema)
schema,
- the XML Schema to which this element declartion
belongs
public ElementDecl(Schema schema, java.lang.String name)
schema,
- the XML Schema to which this Element Declartion
belongsname
- the name of the Element being declaredMethod Detail |
---|
public void addIdentityConstraint(IdentityConstraint constraint)
constraint
- the IdentityConstraint to add.public BlockList getBlock()
public java.lang.String getDefaultValue()
public FinalList getFinal()
public java.lang.String getFixedValue()
public Form getForm()
public java.lang.String getId()
public java.util.Enumeration getIdentityConstraints()
public java.lang.String getName()
public java.lang.String getName(boolean ignoreRef)
ingoreRef
- if false the name of the referenced
element (if specified) is returned, otherwise the
localname (may be null).
public Structure getParent()
public XMLType getType()
public ElementDecl getReference()
public java.lang.String getReferenceName()
public java.lang.String getReferenceId()
getReferenceId
in interface Referable
Referable
public Schema getSchema()
public java.lang.String getSubstitutionGroup()
public java.util.Enumeration getSubstitutionGroupMembers()
public boolean isAbstract()
public boolean isNillable()
public boolean isReference()
public void setAbstract(boolean isAbstract)
isAbstract,
- a boolean when true indicates that this
element definition should be abstractpublic boolean hasChildren()
public boolean removeIdentityConstraint(IdentityConstraint constraint)
constraint
- the IdentityConstraint to remove.
public void setBlock(BlockList block)
block
- the value of the block attribute for this
element definition.public void setBlock(java.lang.String block)
block
- the value of the block attribute for this
element definition.public void setDefaultValue(java.lang.String value)
value
- the default value for this element definition.public void setFinal(FinalList finalList)
finalValue
- the value of the final attribute for this
element definition.public void setFinal(java.lang.String finalValue)
finalValue
- the value of the final attribute for this
element definition.public void setFixedValue(java.lang.String value)
value
- the fixed value for this element definition.public void setForm(Form form)
form
- the Form type for this element definition.public void setId(java.lang.String id)
id
- the Id for this element definition.public void setName(java.lang.String name)
name
- the name of the defined elementpublic void setNillable(boolean nillable)
nillable
- the flag when true indicates that instances
of this element definition may appear with empty contentprotected void setParent(Structure parent)
parent
- the parent Structure for this ElementDeclpublic void setReference(ElementDecl reference)
reference
- the Element definition that this definition referencespublic void setReference(java.lang.String reference)
reference
- the name of the element definition that this
definition referencespublic void setSubstitutionGroup(java.lang.String substitutionGroup)
substitutionGroup
- the substitutionGroup for this
element definition.public void setType(XMLType type)
type
- the XMLType for this element declaration.
public void setTypeReference(java.lang.String name)
public short getStructureType()
getStructureType
in class Structure
public void validate() throws ValidationException
validate
in class Structure
ValidationException
- when this element definition
is invalid.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |