com.sun.msv.grammar.xmlschema
public class ElementDeclExp extends ReferenceExp
the inherited exp field holds an expression that also matches to substituted element declarations.
The body
field contains an expression that matches
only to this element declaration without no substituted element decls.
This table shows the mapping between "element declaration schema component properties" (which is defined in the spec) and corresponding method/field of this class.
Property of the spec | method/field of this class |
name | The ElementDeclExp field. |
target namespace | the getTargetNamespace method. |
type definition | getTypeDefinition method. |
scope | To be implemented |
value constraint | To be implemented. Accessible through the body field. |
nillable | the isNillable field. |
identity constraints |
The identityConstraints field of the XSElementExp,
which in turn can be obtained throught the body field.
|
substitution group affiliation | The substitutionAffiliation field. |
substitution group exclusion | The finalValue field. |
disallowed substitution | The block field. |
abstract | the isAbstract method. |
annotation | Unaccessible. This information is removed during the parsing phase. |
The exp
field and the self
field are very similar.
In fact, the only difference is that the former is affected by the abstract
property, while the latter isn't.
So if it has to be affected by the
abstract property (like referencing a complex type as the element body),
you should use the exp
field.
If you don't want to be affected by the abstract property
(like referencing a complex type as the base type of another complex type),
then you should refer to the body
field.
Nested Class Summary | |
---|---|
class | ElementDeclExp.XSElementExp
XML Schema version of ElementExp.
|
Field Summary | |
---|---|
static int | ALL |
int | block
The
disallowed substitution property of this schema component,
implemented as a bit field.
|
ReferenceExp | body
The expression that represents the "body" of this expression.
|
static int | EXTENSION |
int | finalValue
The
substitution group exclusions property of this schema component,
implemented as a bit field.
|
boolean | isNillable
gets the nillable property of this component as
specified in the spec. |
XMLSchemaSchema | parent parent XMLSchemaSchema object to which this object belongs. |
static int | RESTRICTION |
ElementDeclExp | substitutionAffiliation
The substitution group affiliation property
of this component, if any.
|
ReferenceExp | substitutions
choices of all elements that can validly substitute this element. |
static int | SUBSTITUTION |
Constructor Summary | |
---|---|
ElementDeclExp(XMLSchemaSchema schema, String typeLocalName) |
Method Summary | |
---|---|
Expression | getContentModel()
gets the pattern that represents the content model of
this element declaration.
|
ElementDeclExp.XSElementExp | getElementExp() |
String | getTargetNamespace()
gets the target namespace property of this component as
specified in the spec.
|
XMLSchemaTypeExp | getTypeDefinition()
gets the
type definition property of this schema component. |
boolean | isAbstract()
checks if this element declaration is abstract.
|
boolean | isDefined() |
boolean | isGlobal()
gets the scope property of this component as
specified in the spec.
|
boolean | isRestrictionBlocked() |
boolean | isSubstitutionBlocked() |
void | setAbstract(boolean isAbstract) |
void | setElementExp(ElementDeclExp.XSElementExp exp) |
a bit-wise OR of RESTRICTION, EXTENSION, and SUBSTITUTION.
a bit-wise OR of RESTRICTION and EXTENSION.
self.contentModel
.If the property is absent, then this method returns the empty string.
This method is just a shortcut for parent.targetNamespace
.
Returns: true if this method is abstract.
Returns: true if this component is global. false if this component is local.