Class ElementDeclExp
- java.lang.Object
-
- com.sun.msv.grammar.Expression
-
- com.sun.msv.grammar.ReferenceExp
-
- com.sun.msv.grammar.xmlschema.ElementDeclExp
-
- All Implemented Interfaces:
java.io.Serializable
public class ElementDeclExp extends ReferenceExp
Element declaration.the inherited exp field holds an expression that also matches to substituted element declarations.
The
bodyfield contains an expression that matches only to this element declaration without no substituted element decls.Element Declaration Schema Component Properties
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 ReferenceExp.namefield.target namespace the getTargetNamespace()method.type definition getTypeDefinition()method.scope To be implemented value constraint To be implemented. Accessible through the bodyfield.nillable the isNillablefield.identity constraints The identityConstraintsfield of theElementDeclExp.XSElementExp, which in turn can be obtained throught thebodyfield.substitution group affiliation The substitutionAffiliationfield.substitution group exclusion The finalValuefield.disallowed substitution The blockfield.abstract the isAbstract()method.annotation Unaccessible. This information is removed during the parsing phase. Abstractness
The
expfield and theselffield 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
expfield. 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 thebodyfield.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classElementDeclExp.XSElementExpXML Schema version ofElementExp.
-
Field Summary
Fields Modifier and Type Field Description static intALLintblockThe disallowed substitution property of this schema component, implemented as a bit field.ReferenceExpbodyThe expression that represents the "body" of this expression.private ElementDeclExp.XSElementExpelementstatic intEXTENSIONintfinalValueThe substitution group exclusions property of this schema component, implemented as a bit field.booleanisNillablegets the nillable property of this component as specified in the spec.XMLSchemaSchemaparentparent XMLSchemaSchema object to which this object belongs.static intRESTRICTIONprivate static longserialVersionUIDstatic intSUBSTITUTIONElementDeclExpsubstitutionAffiliationThe substitution group affiliation property of this component, if any.ReferenceExpsubstitutionschoices of all elements that can validly substitute this element.-
Fields inherited from class com.sun.msv.grammar.ReferenceExp
exp, name
-
Fields inherited from class com.sun.msv.grammar.Expression
anyString, epsilon, nullSet, verifierTag
-
-
Constructor Summary
Constructors Constructor Description ElementDeclExp(XMLSchemaSchema schema, java.lang.String typeLocalName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpressiongetContentModel()gets the pattern that represents the content model of this element declaration.ElementDeclExp.XSElementExpgetElementExp()java.lang.StringgetTargetNamespace()gets the target namespace property of this component as specified in the spec.XMLSchemaTypeExpgetTypeDefinition()gets the type definition property of this schema component.booleanisAbstract()checks if this element declaration is abstract.booleanisDefined()checks if this ReferenceExp is properly defined.booleanisGlobal()gets the scope property of this component as specified in the spec.booleanisRestrictionBlocked()booleanisSubstitutionBlocked()voidsetAbstract(boolean isAbstract)voidsetElementExp(ElementDeclExp.XSElementExp exp)-
Methods inherited from class com.sun.msv.grammar.ReferenceExp
calcEpsilonReducibility, calcHashCode, equals, visit, visit, visit, visit
-
Methods inherited from class com.sun.msv.grammar.Expression
getExpandedExp, hashCode, hashCode, hashCode, isEpsilonReducible, peelOccurence, readResolve, visit, visit, visit, visit
-
-
-
-
Field Detail
-
substitutionAffiliation
public ElementDeclExp substitutionAffiliation
The substitution group affiliation property of this component, if any. Otherwise null.
-
body
public final ReferenceExp body
The expression that represents the "body" of this expression. Usually, this refers to XSElementExp, but not necessarily.
-
element
private ElementDeclExp.XSElementExp element
-
substitutions
public final ReferenceExp substitutions
choices of all elements that can validly substitute this element.
-
parent
public final XMLSchemaSchema parent
parent XMLSchemaSchema object to which this object belongs.
-
isNillable
public boolean isNillable
gets the nillable property of this component as specified in the spec.
-
RESTRICTION
public static final int RESTRICTION
- See Also:
- Constant Field Values
-
EXTENSION
public static final int EXTENSION
- See Also:
- Constant Field Values
-
SUBSTITUTION
public static final int SUBSTITUTION
- See Also:
- Constant Field Values
-
ALL
public static final int ALL
- See Also:
- Constant Field Values
-
finalValue
public int finalValue
The substitution group exclusions property of this schema component, implemented as a bit field.a bit-wise OR of RESTRICTION and EXTENSION.
-
block
public int block
The disallowed substitution property of this schema component, implemented as a bit field.a bit-wise OR of RESTRICTION, EXTENSION, and SUBSTITUTION.
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ElementDeclExp
public ElementDeclExp(XMLSchemaSchema schema, java.lang.String typeLocalName)
-
-
Method Detail
-
setElementExp
public void setElementExp(ElementDeclExp.XSElementExp exp)
-
getElementExp
public ElementDeclExp.XSElementExp getElementExp()
-
getContentModel
public Expression getContentModel()
gets the pattern that represents the content model of this element declaration. This method is just a short cut forself.contentModel.
-
isGlobal
public boolean isGlobal()
gets the scope property of this component as specified in the spec.- Returns:
- true if this component is global. false if this component is local.
-
getTargetNamespace
public final java.lang.String getTargetNamespace()
gets the target namespace property of this component as specified in the spec.If the property is absent, then this method returns the empty string.
This method is just a shortcut for
parent.targetNamespace.
-
isAbstract
public boolean isAbstract()
checks if this element declaration is abstract.- Returns:
- true if this method is abstract.
-
setAbstract
public void setAbstract(boolean isAbstract)
-
isSubstitutionBlocked
public boolean isSubstitutionBlocked()
-
isRestrictionBlocked
public boolean isRestrictionBlocked()
-
getTypeDefinition
public XMLSchemaTypeExp getTypeDefinition()
gets the type definition property of this schema component.
-
isDefined
public boolean isDefined()
Description copied from class:ReferenceExpchecks if this ReferenceExp is properly defined. this method is used to detect undeclared definitions. Derived classes can override this method.- Overrides:
isDefinedin classReferenceExp
-
-