org.exolab.castor.xml.schema
public class ElementDecl extends Particle implements Referable
Version: $Revision: 6322 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Constructor Summary | |
---|---|
ElementDecl(Schema schema)
Creates a new default element definition | |
ElementDecl(Schema schema, 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
|
String | getDefaultValue()
Returns the default value of this element definition.
|
FinalList | getFinal()
Returns the value of the 'final' attribute for this element
definition.
|
String | getFixedValue()
Returns the fixed value of this element definition.
|
Form | getForm()
Returns the Form for this element definition. |
String | getId()
Returns the 'id' for this element definition.
|
Enumeration | getIdentityConstraints()
Returns an Enumeration of IdentityConstraint objects contained within
this element definition.
|
String | getName()
Returns the name of this Element declaration. |
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.
|
String | getReferenceId()
Returns the Id used to Refer to this Object
|
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 |
String | getSubstitutionGroup()
Returns the substitutionGroup for this element declaration, or
null if it's absent.
|
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(String block)
Sets the value of the 'block' attribute for this element
|
void | setDefaultValue(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(String finalValue)
Sets the value of the 'final' attribute for this element
definition.
|
void | setFixedValue(String value)
Sets the fixed value for this element definition.
|
void | setForm(Form form)
Sets the Form for this element definition. |
void | setId(String id)
Sets the Id for this element definition.
|
void | setName(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 | setReferenceName(String referenceName)
Sets the name which this element declaration refers to |
void | setSubstitutionGroup(String substitutionGroup)
Sets the substitutionGroup for this element definition.
|
void | setType(XMLType type)
Sets the XMLType for this Element declaration. |
void | setTypeReference(String name)
Sets the type of this element to be a reference. |
void | validate()
Checks the validity of this element definition.
|
Parameters: schema the XML Schema to which this element declaration
belongs
This element definition will not be valid until a name has
been set
Parameters: schema the XML Schema to which this Element Declaration belongs name the name of the Element being declared
Parameters: constraint the IdentityConstraint to add.
Returns: the value of the block attribute.
Returns: the default value of this element definition, or null if no default was specified.
Returns: the FinalList for this element definition.
Returns: the fixed value of this element definition, or null if no default was specified.
Returns: the Form for this element definition, or null if not set.
Returns: the 'id' for this element definition.
Returns: an Enumeration of IdentityConstraint objects contained within this element definition.
Returns: the name of this element declaration
Parameters: ignoreRef if false the name of the referenced element (if specified) is returned, otherwise the localname (may be null).
Returns: the name of this element declaration
Returns: the parent Structure of this ElementDecl
Returns: the ElementDecl that this element definition references
Returns: the reference name
Returns: the XML Schema to which this element declaration belongs.
Returns: the type of this Schema Structure
Returns: the substitutionGroup membership for this element declaration, or null if absent.
Returns: an enumeration of the elements that can be substitute to this element declaration.
Returns: the XMLType of this ElementDecl
Returns: true if this element has children (i.e if it holds attributes or elements).
Returns: true if this element definition is abstract
Returns: true if instances of this element definition may appear with no content, otherwise false.
Returns: true if this element definition is a reference
Parameters: constraint the IdentityConstraint to remove.
Returns: true if the IdentityConstraint was contained within this element defintion.
Parameters: isAbstract a boolean when true indicates that this element definition should be abstract
Parameters: block the value of the block attribute for this element definition.
Parameters: block the value of the block attribute for this element definition.
Parameters: value the default value for this element definition.
Parameters: finalList the value of the final attribute for this element definition.
Parameters: finalValue the value of the final attribute for this element definition.
Parameters: value the fixed value for this element definition.
Parameters: form the Form type for this element definition.
Parameters: id the Id for this element definition.
Parameters: name the name of the defined element
Parameters: nillable the flag when true indicates that instances of this element definition may appear with empty content
Parameters: parent the parent Structure for this ElementDecl
Parameters: reference the Element definition that this definition references
Parameters: referenceName the name of the element definition that this definition references
Parameters: substitutionGroup the substitutionGroup for this element definition.
Parameters: type the XMLType for this element declaration.
Note: This method is mutually exclusive with
#setTypeReference, if a reference has previously been
set it will be ignored.
Throws: ValidationException when this element definition is invalid.