Top Description Fields Methods
com.sun.xml.xsom

public Interface XSComplexType

extends XSType, XSAttContainer
Known Direct Implementers
com.sun.xml.xsom.impl.ComplexTypeImpl, com.sun.xml.xsom.impl.SchemaSetImpl.AnyType
Imports
java.util.List

Complex type.
Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Inherited from com.sun.xml.xsom.XSType:
EXTENSIONRESTRICTIONSUBSTITUTION

Method Summary

Modifier and TypeMethod and Description
public XSContentType

Returns:

always non-null.
getContentType
()

The content of this complex type.

public List<XSElementDecl>
getElementDecls()

Returns a list of element declarations of this type.

public XSContentType

Returns:

If this complex type is derived by restriction or has a simple content, this method returns null. IOW, this method only works for a complex type with a complex content derived by extension from another complex type.
getExplicitContent
()

Gets the explicit content of a complex type with a complex content that was derived by extension.

public XSComplexType

Returns:

null if this component has not been redefined.
getRedefinedBy
()

Redeclares com.sun.xml.xsom.XSType.getRedefinedBy.

If this is redefined by another complex type, return that component.

public XSElementDecl

Returns:

null if this complex type is global. Otherwise return the element declaration that contains this anonymous complex type.
getScope
()

Gets the scope of this complex type.

public List<XSComplexType>
getSubtypes()

Returns a list of direct subtypes of this complex type.

public boolean
isAbstract()

Checks if this complex type is declared as an abstract type.

public boolean
isFinal(int derivationMethod)

public boolean
public boolean
isSubstitutionProhibited(int method)

Roughly corresponds to the block attribute.

Inherited from com.sun.xml.xsom.XSAttContainer:
getAttGroupsgetAttributeUsegetAttributeUsesgetAttributeWildcardgetDeclaredAttributeUsegetDeclaredAttributeUsesiterateAttGroupsiterateAttributeUsesiterateDeclaredAttributeUses
Inherited from com.sun.xml.xsom.XSType:
asComplexTypeasSimpleTypegetBaseTypegetDerivationMethodgetRedefinedCountisComplexTypeisDerivedFromisSimpleTypelistSubstitutables

Method Detail

getContentTypeback to summary
public XSContentType getContentType()

The content of this complex type.

Returns:XSContentType

always non-null.

getElementDeclsback to summary
public List<XSElementDecl> getElementDecls()

Returns a list of element declarations of this type.

getExplicitContentback to summary
public XSContentType getExplicitContent()

Gets the explicit content of a complex type with a complex content that was derived by extension.

Informally, the "explicit content" is the portion of the content model added in this derivation. IOW, it's a delta between the base complex type and this complex type.

For example, when a complex type T2 derives fom T1, then:

content type of T2 = SEQUENCE( content type of T1, explicit content of T2 )
Returns:XSContentType

If this complex type is derived by restriction or has a simple content, this method returns null. IOW, this method only works for a complex type with a complex content derived by extension from another complex type.

getRedefinedByback to summary
public XSComplexType getRedefinedBy()

Redeclares com.sun.xml.xsom.XSType.getRedefinedBy.

If this is redefined by another complex type, return that component.

Returns:XSComplexType

null if this component has not been redefined.

getScopeback to summary
public XSElementDecl getScope()

Gets the scope of this complex type. This is not a property defined in the schema spec.

Returns:XSElementDecl

null if this complex type is global. Otherwise return the element declaration that contains this anonymous complex type.

getSubtypesback to summary
public List<XSComplexType> getSubtypes()

Returns a list of direct subtypes of this complex type. If the type is not subtyped, returns empty list. Doesn't return null. Note that the complex type may be extended outside of the scope of the schemaset known to XSOM.

isAbstractback to summary
public boolean isAbstract()

Checks if this complex type is declared as an abstract type.

isFinalback to summary
public boolean isFinal(int derivationMethod)
isMixedback to summary
public boolean isMixed()
isSubstitutionProhibitedback to summary
public boolean isSubstitutionProhibited(int method)

Roughly corresponds to the block attribute. But see the spec for gory detail.