the body field contains the expression that exactly matches
to the declared content model (without any substitutable types).
the exp field contains the reference to the body field,
if this complex type is not abstract. If abstract, then nullSet is set.
You shouldn't directly manipulate the exp field. Instead, you should use
the setAbstract(boolean) method to do it.
Note
The runtime type substitution
(the use of xsi:type attribute)
is implemented at the VGM layer. Therefore, AGMs of XML Schema does NOT
precisely represent what are actually allowed and what are not.
This table shows the mapping between "complex type definition 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 name field.
|
| target namespace |
the getTargetNamespace() method.
|
| abstract |
the isAbstract() method.
|
| base type definition |
simpleBaseType or complexBaseType field,
depending on whether the base type is a simple type or a complex type.
|
| derivation method |
the derivationMethod field.
|
| final |
the finalValue field.
|
| prohibited substitutions |
the block field.
|
|
attribtue uses attribute wildcard content type |
Not directly accessible. Can be found by walking
the children of the body field.
|
| 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.
ElementDeclExp
| Modifier and Type | Field and Description |
|---|---|
| public final ReferenceExp | attWildcard
attribute wildcard as an expression. |
| public int | block
The block property of this schema component, implemented as a bit field. |
| public final ReferenceExp | body
actual content model definition + attribute uses. |
| public ComplexTypeExp | complexBaseType
base type of this complex type. |
| public int | derivationMethod
the derivation method used to derive this complex type from the base type. |
| public int | finalValue
The final property of this schema component, implemented as a bit field. |
| public final XMLSchemaSchema | parent
parent XMLSchemaSchema object to which this object belongs. |
| private static final long | |
| public XSDatatypeExp | simpleBaseType
base type of this complex type. |
| public AttributeWildcard | wildcard
Attribute wild card constraint. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public AttributeWildcard | |
| public int | getBlock()
Implements abstract com. |
| public RedefinableExp | getClone()
Implements abstract com. |
| public final String | |
| public boolean | Returns: true if this method is abstract. Flase if not.checks if this complex type is abstract. |
| public boolean | |
| public boolean | Returns: true if the specified type is "validly derived" from this type. false if not.A bit field that represents the restricted derivation. This field
must consists of bitwise and of constraint)EXTENSION or RESTRICTION.Checks if this type is a derived type of the specified type. |
| public boolean | |
| public boolean | |
| public void | redefine(RedefinableExp _rhs)
Overrides com. |
| public void | |
| public void |
| attWildcard | back to summary |
|---|---|
| public final ReferenceExp attWildcard attribute wildcard as an expression. | |
| block | back to summary |
|---|---|
| public int block The block property of this schema component, implemented as a bit field. 0, RESTRICTION, EXTENSION, or (RESTRICTION|EXTENSION). | |
| body | back to summary |
|---|---|
| public final ReferenceExp body actual content model definition + attribute uses. | |
| complexBaseType | back to summary |
|---|---|
| public ComplexTypeExp complexBaseType base type of this complex type. Either baseComplexType field or baseSimpleType field is set. If the base type is ur-type, both fields are set to null.
| |
| derivationMethod | back to summary |
|---|---|
| public int derivationMethod the derivation method used to derive this complex type from the base type. Either RESTRICTION or EXTENSION.
| |
| finalValue | back to summary |
|---|---|
| public int finalValue The final property of this schema component, implemented as a bit field. 0, RESTRICTION, EXTENSION, or (RESTRICTION|EXTENSION). | |
| parent | back to summary |
|---|---|
| public final XMLSchemaSchema parent parent XMLSchemaSchema object to which this object belongs. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| simpleBaseType | back to summary |
|---|---|
| public XSDatatypeExp simpleBaseType base type of this complex type.
| |
| wildcard | back to summary |
|---|---|
| public AttributeWildcard wildcard Attribute wild card constraint. Due to the nasty definition of the interaction between attribute wildcards, we cannot add the expression for validating wildcard until the very last moment. Until the wrap-up phase of the schema parsing, this field will contain the "local wildcard definition." In the wrap-up phase, this field is replaced by the "complete wildcard definition." | |
| ComplexTypeExp | back to summary |
|---|---|
| public ComplexTypeExp(XMLSchemaSchema schema, String localName) | |
| getAttributeWildcard | back to summary |
|---|---|
| public AttributeWildcard getAttributeWildcard() | |
| getBlock | back to summary |
|---|---|
| public int getBlock() Implements abstract com. Gets the value of the block constraint. SimpleTypeExp always returns 0 because it doesn't have the block constraint. | |
| getClone | back to summary |
|---|---|
| public RedefinableExp getClone() Implements abstract com. clone this object. | |
| getTargetNamespace | back to summary |
|---|---|
| public final 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 | |
| isAbstract | back to summary |
|---|---|
| public boolean isAbstract() checks if this complex type is abstract. This method corresponds to the abstract property of the complex type declaration schema component.
| |
| isDefined | back to summary |
|---|---|
| public boolean isDefined() Overrides com. implementation detail. A ComplexTypeDecl is properly defined if its self is defined. Note that the default implementation of the isDefined method doesn't work for this class because the exp field is set by the constructor. | |
| isDerivedTypeOf | back to summary |
|---|---|
| public boolean isDerivedTypeOf(ComplexTypeExp baseType, int constraint) Checks if this type is a derived type of the specified type. This method is an implementation of "Type Derivation OK (Complex)" test of the spec. If you are not familiar with the abovementioned part of the spec, don't use this method. This method probably won't give you what you expected.
| |
| isDerivedTypeOf | back to summary |
|---|---|
public boolean isDerivedTypeOf(XSDatatype baseType, int constraint)
| |
| isDerivedTypeOf | back to summary |
|---|---|
| public boolean isDerivedTypeOf(XMLSchemaTypeExp exp, int constraint) | |
| redefine | back to summary |
|---|---|
| public void redefine(RedefinableExp _rhs) Overrides com. Doc from com. assigns contents of rhs to this object. rhs and this object must be the same runtime type, and they must have the same name. this method redefines this object by the given component. derived class should override this method and copy necessary fields, should it necessary. | |
| setAbstract | back to summary |
|---|---|
| public void setAbstract(boolean isAbstract) | |
| setAttributeWildcard | back to summary |
|---|---|
| public void setAttributeWildcard(AttributeWildcard local) | |