Public Member Functions | |
AttributeDecl (Schema schema, String name) | |
AttributeDecl (Schema schema) | |
Form | getForm () |
String | getId () |
String | getName () |
String | getName (boolean ignoreRef) |
Structure | getParent () |
SimpleType | getSimpleType () |
AttributeDecl | getReference () |
String | getReferenceName () |
Schema | getSchema () |
String | getUse () |
String | getDefaultValue () |
String | getFixedValue () |
boolean | isDefault () |
boolean | isFixed () |
boolean | isOptional () |
boolean | isProhibited () |
boolean | isRequired () |
boolean | isReference () |
void | setForm (Form form) |
void | setId (String id) |
void | setName (String name) |
void | setReference (AttributeDecl reference) |
void | setReference (String reference) |
void | setSimpleType (SimpleType simpleType) |
void | setSimpleTypeReference (String name) |
void | setUse (String value) |
void | setDefaultValue (String value) |
void | setFixedValue (String value) |
short | getStructureType () |
void | validate () throws ValidationException |
Static Public Attributes | |
static final String | USE_OPTIONAL = "optional" |
static final String | USE_PROHIBITED = "prohibited" |
static final String | USE_REQUIRED = "required" |
Protected Member Functions | |
void | setParent (Structure parent) |
void | setSchema (Schema schema) |
An XML Schema Attribute Definition
org.exolab.castor.xml.schema.AttributeDecl.AttributeDecl | ( | Schema | schema, | |
String | name | |||
) |
Creates a new AttrDecl with the given name
name | of the Attribute defined by this attribute declaration | |
schema | the schema that contains the new attrDecl |
References org.exolab.castor.xml.schema.AttributeDecl.setName().
org.exolab.castor.xml.schema.AttributeDecl.AttributeDecl | ( | Schema | schema | ) |
Creates a new AttrDecl in the given schema.
schema | the schema that contains the new attrDecl |
String org.exolab.castor.xml.schema.AttributeDecl.getDefaultValue | ( | ) |
Returns the default value of this element definition.
String org.exolab.castor.xml.schema.AttributeDecl.getFixedValue | ( | ) |
Returns the fixed value of this element definition.
Form org.exolab.castor.xml.schema.AttributeDecl.getForm | ( | ) |
Returns the Form for this attribute declaration. The Form object species whether or not names are qualified or unqualified for instances of this attribute declaration. If null, the Form should be obtained from the parent Schema.
Referenced by org.exolab.castor.builder.binding.XMLBindingComponent.getTargetNamespace().
String org.exolab.castor.xml.schema.AttributeDecl.getId | ( | ) |
Returns the Id for this attribute declaration
String org.exolab.castor.xml.schema.AttributeDecl.getName | ( | boolean | ignoreRef | ) |
Returns the name of this Attribute declaration. The name will always be an NCName, no namespace prefix will be included.
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. |
References org.exolab.castor.xml.schema.AttributeDecl.isReference().
String org.exolab.castor.xml.schema.AttributeDecl.getName | ( | ) |
Returns the name of attributes defined by this AttributeDecl. If this AttributeDecl is a reference to another AttributeDecl, the reference will be resolved and the name of the referenced AttributeDecl will be returned. The name will always be an NCName, no namespace prefix will be included.
Referenced by org.exolab.castor.xml.schema.AttributeGroupDecl.getAttribute(), org.exolab.castor.xml.schema.Schema.removeAttribute(), and org.exolab.castor.xml.schema.AttributeDecl.setReference().
Structure org.exolab.castor.xml.schema.AttributeDecl.getParent | ( | ) |
Returns the parent of this AttributeDecl, this value may be null if no parent has been set.
Referenced by org.exolab.castor.builder.binding.XMLBindingComponent.getTargetNamespace().
AttributeDecl org.exolab.castor.xml.schema.AttributeDecl.getReference | ( | ) |
Returns the AttributeDecl that this attribute definition references. This will return null if this attribute definition does not reference a different attribute definition.
References org.exolab.castor.xml.schema.Schema.getAttribute().
Referenced by org.exolab.castor.builder.binding.ExtendedBinding.getComponentBindingType(), org.exolab.castor.builder.binding.XMLBindingComponent.getJavaMemberName(), org.exolab.castor.builder.binding.XMLBindingComponent.getSchema(), org.exolab.castor.xml.schema.AttributeDecl.getSimpleType(), and org.exolab.castor.builder.binding.XMLBindingComponent.getTargetNamespace().
String org.exolab.castor.xml.schema.AttributeDecl.getReferenceName | ( | ) |
Returns the actual reference name of this AttributeDecl, or null if this AttributeDecl is not a reference. The name returned, if not null, will be a QName, possibly containing the namespace prefix.
Schema org.exolab.castor.xml.schema.AttributeDecl.getSchema | ( | ) |
Returns the Schema that this AttributeGroupDecl belongs to.
Referenced by org.exolab.castor.builder.binding.XMLBindingComponent.getSchema(), and org.exolab.castor.builder.binding.XMLBindingComponent.getTargetNamespace().
SimpleType org.exolab.castor.xml.schema.AttributeDecl.getSimpleType | ( | ) |
Returns the data type associated with this AttributeDecl.
References org.exolab.castor.xml.schema.Schema.getMasterSchema(), org.exolab.castor.xml.schema.XMLType.getName(), org.exolab.castor.xml.schema.AttributeDecl.getReference(), org.exolab.castor.xml.schema.XMLType.getSchema(), org.exolab.castor.xml.schema.Schema.getSimpleType(), org.exolab.castor.xml.schema.AttributeDecl.getSimpleType(), org.exolab.castor.xml.schema.XMLType.getType(), and org.exolab.castor.xml.schema.AttributeDecl.isReference().
Referenced by org.exolab.castor.xml.dtd.Converter.convertAttribute(), and org.exolab.castor.xml.schema.AttributeDecl.getSimpleType().
short org.exolab.castor.xml.schema.AttributeDecl.getStructureType | ( | ) | [virtual] |
Returns the type of this Schema Structure
Implements org.exolab.castor.xml.schema.Structure.
String org.exolab.castor.xml.schema.AttributeDecl.getUse | ( | ) |
Returns the value of the use attribute for this attribute declaration or attribute reference. If this is a reference the value of the use attribute will *not* be obtained from the referenced attribute declaration as top-level attributes do not take into account the use attribute.
References org.exolab.castor.xml.schema.AttributeDecl.USE_OPTIONAL, org.exolab.castor.xml.schema.AttributeDecl.USE_PROHIBITED, and org.exolab.castor.xml.schema.AttributeDecl.USE_REQUIRED.
Referenced by org.exolab.castor.xml.schema.AttributeDecl.isOptional(), org.exolab.castor.xml.schema.AttributeDecl.isProhibited(), and org.exolab.castor.xml.schema.AttributeDecl.isRequired().
boolean org.exolab.castor.xml.schema.AttributeDecl.isDefault | ( | ) |
Returns true if the "default" flag is set.
Referenced by org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller().
boolean org.exolab.castor.xml.schema.AttributeDecl.isFixed | ( | ) |
Returns true if the use attribute is equal to "optional".
boolean org.exolab.castor.xml.schema.AttributeDecl.isOptional | ( | ) |
Returns true if the use attribute is equal to "optional".
References org.exolab.castor.xml.schema.AttributeDecl.getUse(), and org.exolab.castor.xml.schema.AttributeDecl.USE_OPTIONAL.
boolean org.exolab.castor.xml.schema.AttributeDecl.isProhibited | ( | ) |
Returns true if the use attribute is equal to "prohibited".
References org.exolab.castor.xml.schema.AttributeDecl.getUse(), and org.exolab.castor.xml.schema.AttributeDecl.USE_PROHIBITED.
boolean org.exolab.castor.xml.schema.AttributeDecl.isReference | ( | ) |
Returns true if this attribute definition simply references another attribute Definition
Referenced by org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller(), org.exolab.castor.builder.binding.ExtendedBinding.getComponentBindingType(), org.exolab.castor.builder.binding.XMLBindingComponent.getJavaMemberName(), org.exolab.castor.xml.schema.AttributeDecl.getName(), org.exolab.castor.builder.binding.XMLBindingComponent.getSchema(), org.exolab.castor.xml.schema.AttributeDecl.getSimpleType(), and org.exolab.castor.builder.binding.XMLBindingComponent.getTargetNamespace().
boolean org.exolab.castor.xml.schema.AttributeDecl.isRequired | ( | ) |
Returns true if the 'use' attribute is equal to REQUIRED and there is no specified value. If a value is specifed and the 'use' attribute is "required" then required is will return false, because the attribute value automatically becomes fixed.
References org.exolab.castor.xml.schema.AttributeDecl.getUse(), and org.exolab.castor.xml.schema.AttributeDecl.USE_REQUIRED.
void org.exolab.castor.xml.schema.AttributeDecl.setDefaultValue | ( | String | value | ) |
Sets the DEFAULT value
Referenced by org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller(), and org.exolab.castor.xml.dtd.Converter.convertAttribute().
void org.exolab.castor.xml.schema.AttributeDecl.setFixedValue | ( | String | value | ) |
Sets the FIXED value.
Referenced by org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller().
void org.exolab.castor.xml.schema.AttributeDecl.setForm | ( | Form | form | ) |
Sets the Form for this attribute declaration. The Form object species whether or not names are qualified or unqualified for instances of this attribute declaration. If null, the Form is to be obtained from the parent Schema.
form | the Form type for this attribute declaration. |
Referenced by org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller().
void org.exolab.castor.xml.schema.AttributeDecl.setId | ( | String | id | ) |
Sets the Id for this attribute declaration
id | the Id for this attribute declaration |
Referenced by org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller().
void org.exolab.castor.xml.schema.AttributeDecl.setName | ( | String | name | ) |
Sets the name of attributes defined by this attribute definition
name | the name of the this AttributeDecl. Must be a valid NCName. |
IllegalArgumentException | when the name is not valid |
Referenced by org.exolab.castor.xml.schema.AttributeDecl.AttributeDecl(), and org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller().
void org.exolab.castor.xml.schema.AttributeDecl.setParent | ( | Structure | parent | ) | [protected] |
Sets the parent for this AttributeDecl
parent | the parent Structure for this AttributeDecl |
References org.exolab.castor.xml.schema.Structure.getStructureType().
Referenced by org.exolab.castor.xml.schema.AttributeGroupDecl.addAttribute().
void org.exolab.castor.xml.schema.AttributeDecl.setReference | ( | String | reference | ) |
Sets the reference for this attribute definition
reference | the name of the attribute definition that this definition references |
void org.exolab.castor.xml.schema.AttributeDecl.setReference | ( | AttributeDecl | reference | ) |
Sets the reference for this attribute definition
reference | the Attribute definition that this definition references |
References org.exolab.castor.xml.schema.AttributeDecl.getName().
Referenced by org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller().
void org.exolab.castor.xml.schema.AttributeDecl.setSchema | ( | Schema | schema | ) | [protected] |
Set the parent schema of the current ElementDecl. The parent schema should at least have the same targetNamespace of the current schema.
This method is protected since it is only meant to be used by the internal API to propagate the parent XML Schema in case of a redefinition for instance.
schema |
void org.exolab.castor.xml.schema.AttributeDecl.setSimpleType | ( | SimpleType | simpleType | ) |
Sets the SimpleType for this attribute declaration
simpleType | the SimpleType for this attribute declaration |
References org.exolab.castor.xml.schema.SimpleType.setParent().
Referenced by org.exolab.castor.xml.dtd.Converter.convertAttribute(), org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.endElement(), and org.exolab.castor.xml.schema.AttributeDecl.setSimpleTypeReference().
void org.exolab.castor.xml.schema.AttributeDecl.setSimpleTypeReference | ( | String | name | ) |
Sets the simple type of this attribute to be a reference.
name | the name of the simpleType being referenced, must not be null. |
References org.exolab.castor.xml.schema.AttributeDecl.setSimpleType().
Referenced by org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller(), and org.exolab.castor.xml.schema.util.XMLInstance2SchemaHandler.startElement().
void org.exolab.castor.xml.schema.AttributeDecl.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
value | one of the following: ("prohibited" | "optional" | "required") |
References org.exolab.castor.xml.schema.AttributeDecl.USE_OPTIONAL, org.exolab.castor.xml.schema.AttributeDecl.USE_PROHIBITED, and org.exolab.castor.xml.schema.AttributeDecl.USE_REQUIRED.
Referenced by org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.AttributeUnmarshaller(), and org.exolab.castor.xml.dtd.Converter.convertAttribute().
void org.exolab.castor.xml.schema.AttributeDecl.validate | ( | ) | throws ValidationException [virtual] |
Checks the validity of this Attribute declaration
ValidationException | when this Attribute declaration is invalid |
Implements org.exolab.castor.xml.schema.Structure.
References org.exolab.castor.xml.schema.Schema.getAttribute().
final String org.exolab.castor.xml.schema.AttributeDecl.USE_OPTIONAL = "optional" [static] |
The use attribute value for optional
Referenced by org.exolab.castor.xml.schema.AttributeDecl.getUse(), org.exolab.castor.xml.schema.AttributeDecl.isOptional(), and org.exolab.castor.xml.schema.AttributeDecl.setUse().
final String org.exolab.castor.xml.schema.AttributeDecl.USE_PROHIBITED = "prohibited" [static] |
The use attribute value for prohibited
Referenced by org.exolab.castor.xml.schema.AttributeDecl.getUse(), org.exolab.castor.xml.schema.AttributeDecl.isProhibited(), and org.exolab.castor.xml.schema.AttributeDecl.setUse().
final String org.exolab.castor.xml.schema.AttributeDecl.USE_REQUIRED = "required" [static] |
The use attribute value for required
Referenced by org.exolab.castor.xml.schema.AttributeDecl.getUse(), org.exolab.castor.xml.schema.AttributeDecl.isRequired(), and org.exolab.castor.xml.schema.AttributeDecl.setUse().