org.exolab.castor.xml.schema
public final class AttributeDecl extends Annotated
Version: $Revision: 1.2 $ $Date: 2003/03/03 09:57:19 $
| Field Summary | |
|---|---|
| static String | USE_OPTIONAL
The use attribute value for optional
|
| static String | USE_PROHIBITED
The use attribute value for prohibited
|
| static String | USE_REQUIRED
The use attribute value for required
|
| Constructor Summary | |
|---|---|
| AttributeDecl(Schema schema, String name)
Creates a new AttrDecl with the given name | |
| AttributeDecl(Schema schema)
Creates a new AttrDecl in the given schema. | |
| Method Summary | |
|---|---|
| String | getDefaultValue()
Returns the default value of this element definition.
|
| String | getFixedValue()
Returns the fixed value of this element definition.
|
| Form | getForm()
Returns the Form for this attribute declaration. |
| String | getId()
Returns the Id for this attribute declaration
|
| String | getName()
Returns the name of attributes defined by this AttributeDecl.
|
| String | getName(boolean ignoreRef)
Returns the name of this Attribute declaration. |
| Structure | getParent()
Returns the parent of this AttributeDecl, this value may be null if
no parent has been set.
|
| AttributeDecl | getReference()
Returns the AttributeDecl that this attribute definition references.
|
| String | getReferenceName()
Returns the actual reference name of this AttributeDecl, or null
if this AttributeDecl is not a reference. |
| Schema | getSchema()
Returns the Schema that this AttributeGroupDecl belongs to.
|
| SimpleType | getSimpleType()
Returns the data type associated with this AttributeDecl.
|
| short | getStructureType()
Returns the type of this Schema Structure |
| String | getUse()
Returns the value of the use attribute for this attribute
declaration or attribute reference. |
| boolean | isDefault()
Returns true if the "default" flag is set.
|
| boolean | isFixed()
Returns true if the use attribute is equal to "optional".
|
| boolean | isOptional()
Returns true if the use attribute is equal to "optional".
|
| boolean | isProhibited()
Returns true if the use attribute is equal to "prohibited".
|
| boolean | isReference()
Returns true if this attribute definition simply references another
attribute Definition |
| boolean | isRequired()
Returns true if the 'use' attribute is equal to REQUIRED and
there is no specified value. |
| void | setDefaultValue(String value)
Sets the DEFAULT value |
| void | setFixedValue(String value)
Sets the FIXED value. |
| void | setForm(Form form)
Sets the Form for this attribute declaration. |
| void | setId(String id)
Sets the Id for this attribute declaration
|
| void | setName(String name)
Sets the name of attributes defined by this attribute definition |
| protected void | setParent(Structure parent)
Sets the parent for this AttributeDecl
|
| void | setReference(AttributeDecl reference)
Sets the reference for this attribute definition |
| void | setReference(String reference)
Sets the reference for this attribute definition |
| void | setSimpleType(SimpleType simpleType)
Sets the SimpleType for this attribute declaration |
| void | setSimpleTypeReference(String name)
Sets the simple type of this attribute to be a reference.
|
| void | setUse(String value)
Sets the 'use' attribute of this attribute declaration
Note: this should not be used to set the flag to FIXED or DEFAULT |
| void | validate()
Checks the validity of this Attribute declaration |
Parameters: name of the Attribute defined by this attribute declaration schema the schema that contains the new attrDecl
Parameters: schema the schema that contains the new attrDecl
Returns: the default value of this element definition, or null if no default was specified.
Returns: the fixed value of this element definition, or null if no default was specified.
Returns: the Form for this attribute declaration, or null if not set.
Returns: the Id for this attribute declaration
Returns: the name of attributes defined by this AttributeDecl.
Parameters: ingoreRef a boolean that when false, indicates that if this is an attribute reference to return the reference name. Otherwise the only the local name is used.
Returns: the name of this attribute declaration
Returns: the parent Structure of this AttributeDecl.
Returns: the AttributeDecl that this attribute definition references
Returns: the reference name
Returns: the Schema that this AttributeGroupDecl belongs to.
Returns: the data type associated with this AttributeDecl.
Returns: the type of this Schema Structure
Returns: the value of the use attribute for this attribute declaration
Returns: true if the "default" flag is set.
Returns: true if the use attribute is equal to "optional".
Returns: true if the use attribute is equal to "optional".
Returns: true if the use attribute is equal to "prohibited".
Returns: true if this attribute definition is a reference
Returns: true if the use attribute is equal to "required" and no default value has been specified, otherwise false
Parameters: form the Form type for this attribute declaration.
Parameters: id the Id for this attribute declaration
Parameters: name the name of the this AttributeDecl. Must be a valid NCName.
Throws: IllegalArgumentException when the name is not valid
Parameters: parent the parent Structure for this AttributeDecl
Parameters: reference the Attribute definition that this definition references
Parameters: reference the name of the attribute definition that this definition references
Parameters: simpleType the SimpleType for this attribute declaration
Parameters: name the name of the simpleType being referenced, must not be null.
Parameters: value one of the following: ("prohibited" | "optional" | "required")
See Also: USE_PROHIBITED USE_OPTIONAL USE_REQUIRED
Throws: ValidationException when this Attribute declaration is invalid