public class

XSComplexTypeDecl

extends Object
implements XSComplexTypeDefinition TypeInfo
java.lang.Object
   ↳ org.apache.xerces.impl.xs.XSComplexTypeDecl

Class Overview

The XML representation for a complexType schema component is a <complexType> element information item

Summary

[Expand]
Inherited Constants
From interface org.apache.xerces.xs.XSComplexTypeDefinition
From interface org.apache.xerces.xs.XSTypeDefinition
From interface org.w3c.dom.TypeInfo
Public Constructors
XSComplexTypeDecl()
Public Methods
boolean containsTypeID()
boolean derivedFrom(String ancestorNS, String ancestorName, short derivationMethod)
Convenience method which checks if this type is derived from the given ancestor type.
boolean derivedFromType(XSTypeDefinition ancestor, short derivationMethod)
Convenience method which checks if this type is derived from the given ancestorType.
boolean getAbstract()
{abstract} A boolean.
XSObjectList getAnnotations()
Optional.
boolean getAnonymous()
A boolean that specifies if the type definition is anonymous.
XSAttributeGroupDecl getAttrGrp()
XSAttributeUse getAttributeUse(String namespace, String name)
XSObjectList getAttributeUses()
{attribute uses} A set of attribute uses.
XSWildcard getAttributeWildcard()
{attribute wildcard} Optional.
XSTypeDefinition getBaseType()
{base type definition} Either a simple type definition or a complex type definition.
synchronized XSCMValidator getContentModel(CMBuilder cmBuilder)
short getContentType()
{content type} One of empty, a simple type definition (see simpleType, or mixed, element-only (see cmParticle).
short getDerivationMethod()
{derivation method} Either extension or restriction.
short getFinal()
{final} For complex type definition it is a subset of {extension, restriction}.
short getFinalSet()
String getName()
The name of this XSObject depending on the XSObject type.
String getNamespace()
The namespace URI of this node, or null if it is unspecified.
XSNamespaceItem getNamespaceItem()
A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; or null otherwise.
XSParticle getParticle()
A particle for mixed or element-only content model, otherwise null
short getProhibitedSubstitutions()
{prohibited substitutions}
XSSimpleTypeDefinition getSimpleType()
A simple type definition corresponding to simple content model, otherwise null
String getTargetNamespace()
short getType()
Get the type of the object, i.e ELEMENT_DECLARATION.
short getTypeCategory()
Return whether this type definition is a simple type or complex type.
String getTypeName()
String getTypeNamespace()
boolean isDOMDerivedFrom(String ancestorNS, String ancestorName, int derivationMethod)
Checks if a type is derived from another given the the name, namespace and derivation method.
boolean isDerivedFrom(String typeNamespaceArg, String typeNameArg, int derivationMethod)
boolean isFinal(short derivation)
{final} For complex type definition it is a subset of {extension, restriction}.
boolean isProhibitedSubstitution(short prohibited)
{prohibited substitutions} A subset of {extension, restriction}.
void reset()
void setContainsTypeID()
void setIsAbstractType()
void setIsAnonymous()
void setName(String name)
void setValues(String name, String targetNamespace, XSTypeDefinition baseType, short derivedBy, short schemaFinal, short block, short contentType, boolean isAbstract, XSAttributeGroupDecl attrGrp, XSSimpleType simpleType, XSParticleDecl particle, XSObjectListImpl annotations)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.xerces.xs.XSComplexTypeDefinition
From interface org.apache.xerces.xs.XSObject
From interface org.apache.xerces.xs.XSTypeDefinition
From interface org.w3c.dom.TypeInfo

Public Constructors

public XSComplexTypeDecl ()

Public Methods

public boolean containsTypeID ()

public boolean derivedFrom (String ancestorNS, String ancestorName, short derivationMethod)

Convenience method which checks if this type is derived from the given ancestor type.

Parameters
ancestorNS An ancestor type namespace.
ancestorName An ancestor type name.
derivationMethod A bit combination representing a subset of { DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST }.
Returns
  • True if this type is derived from ancestorType using only derivation methods from the derivationMethod .

public boolean derivedFromType (XSTypeDefinition ancestor, short derivationMethod)

Convenience method which checks if this type is derived from the given ancestorType.

Parameters
ancestor An ancestor type definition.
derivationMethod A bit combination representing a subset of { DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST }.
Returns
  • True if this type is derived from ancestorType using only derivation methods from the derivationMethod .

public boolean getAbstract ()

{abstract} A boolean. Complex types for which {abstract} is true must not be used as the {type definition} for the validation of element information items.

public XSObjectList getAnnotations ()

Optional. Annotation.

public boolean getAnonymous ()

A boolean that specifies if the type definition is anonymous. Convenience attribute. This is a field is not part of XML Schema component model.

public XSAttributeGroupDecl getAttrGrp ()

public XSAttributeUse getAttributeUse (String namespace, String name)

public XSObjectList getAttributeUses ()

{attribute uses} A set of attribute uses.

public XSWildcard getAttributeWildcard ()

{attribute wildcard} Optional. A wildcard.

public XSTypeDefinition getBaseType ()

{base type definition} Either a simple type definition or a complex type definition.

public synchronized XSCMValidator getContentModel (CMBuilder cmBuilder)

public short getContentType ()

{content type} One of empty, a simple type definition (see simpleType, or mixed, element-only (see cmParticle).

public short getDerivationMethod ()

{derivation method} Either extension or restriction. The valid constant value for this XSConstants EXTENTION, RESTRICTION.

public short getFinal ()

{final} For complex type definition it is a subset of {extension, restriction}.

Returns
  • A bit flag that represents: {extension, restriction) or none for complexTypes; {extension, list, restriction, union} or none for simpleTypes;

public short getFinalSet ()

public String getName ()

The name of this XSObject depending on the XSObject type.

public String getNamespace ()

The namespace URI of this node, or null if it is unspecified. defines how a namespace URI is attached to schema components.

public XSNamespaceItem getNamespaceItem ()

A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; or null otherwise.

public XSParticle getParticle ()

A particle for mixed or element-only content model, otherwise null

public short getProhibitedSubstitutions ()

{prohibited substitutions}

Returns
  • A bit flag corresponding to prohibited substitutions

public XSSimpleTypeDefinition getSimpleType ()

A simple type definition corresponding to simple content model, otherwise null

public String getTargetNamespace ()

public short getType ()

Get the type of the object, i.e ELEMENT_DECLARATION.

public short getTypeCategory ()

Return whether this type definition is a simple type or complex type.

public String getTypeName ()

public String getTypeNamespace ()

public boolean isDOMDerivedFrom (String ancestorNS, String ancestorName, int derivationMethod)

Checks if a type is derived from another given the the name, namespace and derivation method. See: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom

Parameters
ancestorNS The namspace of the ancestor type declaration
ancestorName The name of the ancestor type declaration
derivationMethod The derivation method
Returns
  • boolean True if the ancestor type is derived from the reference type by the specifiied derivation method.

public boolean isDerivedFrom (String typeNamespaceArg, String typeNameArg, int derivationMethod)

public boolean isFinal (short derivation)

{final} For complex type definition it is a subset of {extension, restriction}. For simple type definition it is a subset of {extension, list, restriction, union}.

Parameters
derivation Extension, restriction, list, union constants (defined in XSConstants).
Returns
  • True if derivation is in the final set, otherwise false.

public boolean isProhibitedSubstitution (short prohibited)

{prohibited substitutions} A subset of {extension, restriction}.

Parameters
prohibited extention or restriction constants (defined in XSConstants).
Returns
  • True if prohibited is a prohibited substitution, otherwise false.

public void reset ()

public void setContainsTypeID ()

public void setIsAbstractType ()

public void setIsAnonymous ()

public void setName (String name)

public void setValues (String name, String targetNamespace, XSTypeDefinition baseType, short derivedBy, short schemaFinal, short block, short contentType, boolean isAbstract, XSAttributeGroupDecl attrGrp, XSSimpleType simpleType, XSParticleDecl particle, XSObjectListImpl annotations)

public String toString ()