APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.xs

public Class XSComplexTypeDecl

extends Object
implements XSComplexTypeDefinition, TypeInfo
Class Inheritance
All Implemented Interfaces
org.w3c.dom.TypeInfo, com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition, com.sun.org.apache.xerces.internal.xs.XSTypeDefinition, com.sun.org.apache.xerces.internal.xs.XSObject
Known Direct Subclasses
com.sun.org.apache.xerces.internal.impl.xs.SchemaGrammar.XSAnyType
Imports
com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType, com.sun.org.apache.xerces.internal.xs.*, com.sun.org.apache.xerces.internal.impl.xs.models.XSCMValidator, .CMBuilder, com.sun.org.apache.xerces.internal.impl.xs.util.XSObjectListImpl, com.sun.org.apache.xerces.internal.impl.dv.xs.XSSimpleTypeDecl, org.w3c.dom.TypeInfo

The XML representation for a complexType schema component is a <complexType> element information item
Authors
Elena Litani, IBM, Sandy Gao, IBM

Field Summary

Modifier and TypeField and Description
private static final short
private static final short
private static final short
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv XSObjectListImpl
pack-priv XSAttributeGroupDecl
pack-priv XSTypeDefinition
pack-priv short
pack-priv volatile XSCMValidator
pack-priv short
pack-priv short
pack-priv short
pack-priv short
pack-priv String
private XSNamespaceItem
pack-priv XSParticleDecl
pack-priv String
pack-priv volatile XSCMValidator
pack-priv XSSimpleType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public boolean
public boolean
derivedFrom(String ancestorNS, String ancestorName, short derivationMethod)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFrom.

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

public boolean
derivedFromType(XSTypeDefinition ancestor, short derivationMethod)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFromType.

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

public boolean
public XSObjectList
public boolean
getAnonymous()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getAnonymous.

A boolean that specifies if the type definition is anonymous.

public XSAttributeGroupDecl
public XSAttributeUse
getAttributeUse(String namespace, String name)

public XSObjectList
public XSWildcard
public XSTypeDefinition
getBaseType()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getBaseType.

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

public XSCMValidator
public synchronized XSCMValidator
getContentModel(CMBuilder cmBuilder, boolean forUPA)

public short
getContentType()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getContentType.

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

public short
getDerivationMethod()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getDerivationMethod.

{derivation method} Either extension or restriction.

public short

Returns:

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

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getFinal.

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

public short
public String
getName()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getName.

The name of this XSObject depending on the XSObject type.

public String
getNamespace()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getNamespace.

The namespace URI of this node, or null if it is unspecified.

public XSNamespaceItem
getNamespaceItem()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.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()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getParticle.

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

public short

Returns:

A bit flag corresponding to prohibited substitutions
getProhibitedSubstitutions
()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getProhibitedSubstitutions.

{prohibited substitutions}

public XSSimpleTypeDefinition
getSimpleType()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getSimpleType.

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

public String
public short
getType()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getType.

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

public short
getTypeCategory()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getTypeCategory.

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

public String
getTypeName()

Implements org.w3c.dom.TypeInfo.getTypeName.

The name of a type declared for the associated element or attribute, or null if unknown.

public String
getTypeNamespace()

Implements org.w3c.dom.TypeInfo.getTypeNamespace.

The namespace of the type declared for the associated element or attribute or null if the element does not have declaration or if no namespace information is available.

private boolean

Returns:

boolean True if the type is derived by any method for the reference type
isDerivedByAny
(String
The namspace of the ancestor type declaration
ancestorNS
,
String
The name of the ancestor type declaration
ancestorName
,
int
A short indication the method of derivation
derivationMethod
,
XSTypeDefinition
The reference type definition
type
)

Checks if a type is derived from another by any combination of restriction, list ir union.

private boolean

Returns:

boolean True if the type is derived by extension for the reference type
isDerivedByExtension
(String
The namspace of the ancestor type declaration
ancestorNS
,
String
The name of the ancestor type declaration
ancestorName
,
int
A short indication the method of derivation
derivationMethod
,
XSTypeDefinition
The reference type definition
type
)

Checks if a type is derived from another by extension.

private boolean

Returns:

boolean True if the type is derived by restriciton for the reference type
isDerivedByRestriction
(String
The namspace of the ancestor type declaration
ancestorNS
,
String
The name of the ancestor type declaration
ancestorName
,
int
A short indication the method of derivation *
derivationMethod
,
XSTypeDefinition
The reference type definition
type
)

Checks if a type is derived from another by restriction.

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

Implements org.w3c.dom.TypeInfo.isDerivedFrom.

This method returns if there is a derivation between the reference type definition, i.e. the TypeInfo on which the method is being called, and the other type definition, i.e. the one passed as parameters.

public boolean

Returns:

boolean True if the ancestor type is derived from the reference type by the specifiied derivation method.
isDOMDerivedFrom
(String
The namspace of the ancestor type declaration
ancestorNS
,
String
The name of the ancestor type declaration
ancestorName
,
int
The derivation method
derivationMethod
)

Checks if a type is derived from another given the the name, namespace and derivation method.

public boolean

Returns:

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

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.isFinal.

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

public boolean

Returns:

True if prohibited is a prohibited substitution, otherwise false.
isProhibitedSubstitution
(short
extention or restriction constants (defined in XSConstants).
prohibited
)

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.isProhibitedSubstitution.

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

public void
public void
public void
public void
public void
pack-priv void
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()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

CT_HAS_TYPE_IDback to summary
private static final short CT_HAS_TYPE_ID
CT_IS_ABSTRACTback to summary
private static final short CT_IS_ABSTRACT
CT_IS_ANONYMOUSback to summary
private static final short CT_IS_ANONYMOUS
DERIVATION_ANYback to summary
pack-priv static final int DERIVATION_ANY
DERIVATION_EXTENSIONback to summary
pack-priv static final int DERIVATION_EXTENSION

Hides org.w3c.dom.TypeInfo.DERIVATION_EXTENSION.

DERIVATION_LISTback to summary
pack-priv static final int DERIVATION_LIST

Hides org.w3c.dom.TypeInfo.DERIVATION_LIST.

DERIVATION_RESTRICTIONback to summary
pack-priv static final int DERIVATION_RESTRICTION

Hides org.w3c.dom.TypeInfo.DERIVATION_RESTRICTION.

DERIVATION_UNIONback to summary
pack-priv static final int DERIVATION_UNION

Hides org.w3c.dom.TypeInfo.DERIVATION_UNION.

fAnnotationsback to summary
pack-priv XSObjectListImpl fAnnotations
fAttrGrpback to summary
pack-priv XSAttributeGroupDecl fAttrGrp
fBaseTypeback to summary
pack-priv XSTypeDefinition fBaseType
fBlockback to summary
pack-priv short fBlock
fCMValidatorback to summary
pack-priv volatile XSCMValidator fCMValidator
fContentTypeback to summary
pack-priv short fContentType
fDerivedByback to summary
pack-priv short fDerivedBy
fFinalback to summary
pack-priv short fFinal
fMiscFlagsback to summary
pack-priv short fMiscFlags
fNameback to summary
pack-priv String fName
fNamespaceItemback to summary
private XSNamespaceItem fNamespaceItem
fParticleback to summary
pack-priv XSParticleDecl fParticle
fTargetNamespaceback to summary
pack-priv String fTargetNamespace
fUPACMValidatorback to summary
pack-priv volatile XSCMValidator fUPACMValidator
fXSSimpleTypeback to summary
pack-priv XSSimpleType fXSSimpleType

Constructor Detail

XSComplexTypeDeclback to summary
public XSComplexTypeDecl()

Method Detail

appendTypeInfoback to summary
pack-priv void appendTypeInfo(StringBuilder str)
containsTypeIDback to summary
public boolean containsTypeID()
derivedFromback to summary
public boolean derivedFrom(String ancestorNS, String ancestorName, short derivationMethod)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFrom.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFrom.

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

derivedFromTypeback to summary
public boolean derivedFromType(XSTypeDefinition ancestor, short derivationMethod)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFromType.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.derivedFromType.

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

getAbstractback to summary
public boolean getAbstract()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.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.

getAnnotationsback to summary
public XSObjectList getAnnotations()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getAnnotations.

Optional. Annotation.

getAnonymousback to summary
public boolean getAnonymous()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.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.

getAttrGrpback to summary
public XSAttributeGroupDecl getAttrGrp()
getAttributeUseback to summary
public XSAttributeUse getAttributeUse(String namespace, String name)
getAttributeUsesback to summary
public XSObjectList getAttributeUses()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getAttributeUses.

{attribute uses} A set of attribute uses.

getAttributeWildcardback to summary
public XSWildcard getAttributeWildcard()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getAttributeWildcard.

{attribute wildcard} Optional. A wildcard.

getBaseTypeback to summary
public XSTypeDefinition getBaseType()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getBaseType.

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

getContentModelback to summary
public XSCMValidator getContentModel(CMBuilder cmBuilder)
getContentModelback to summary
public synchronized XSCMValidator getContentModel(CMBuilder cmBuilder, boolean forUPA)
getContentTypeback to summary
public short getContentType()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getContentType.

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

getDerivationMethodback to summary
public short getDerivationMethod()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getDerivationMethod.

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

getFinalback to summary
public short getFinal()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getFinal.

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

Returns:short

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

getFinalSetback to summary
public short getFinalSet()
getNameback to summary
public String getName()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getName.

The name of this XSObject depending on the XSObject type.

getNamespaceback to summary
public String getNamespace()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getNamespace.

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

getNamespaceItemback to summary
public XSNamespaceItem getNamespaceItem()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getNamespaceItem.

Doc from com.sun.org.apache.xerces.internal.xs.XSObject.getNamespaceItem.

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

See Also
org.apache.xerces.xs.XSObject#getNamespaceItem()
getParticleback to summary
public XSParticle getParticle()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getParticle.

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

getProhibitedSubstitutionsback to summary
public short getProhibitedSubstitutions()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getProhibitedSubstitutions.

{prohibited substitutions}

Returns:short

A bit flag corresponding to prohibited substitutions

getSimpleTypeback to summary
public XSSimpleTypeDefinition getSimpleType()

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.getSimpleType.

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

getTargetNamespaceback to summary
public String getTargetNamespace()
getTypeback to summary
public short getType()

Implements com.sun.org.apache.xerces.internal.xs.XSObject.getType.

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

getTypeCategoryback to summary
public short getTypeCategory()

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getTypeCategory.

Doc from com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.getTypeCategory.

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

getTypeNameback to summary
public String getTypeName()

Implements org.w3c.dom.TypeInfo.getTypeName.

Doc from org.w3c.dom.TypeInfo.getTypeName.

The name of a type declared for the associated element or attribute, or null if unknown.

getTypeNamespaceback to summary
public String getTypeNamespace()

Implements org.w3c.dom.TypeInfo.getTypeNamespace.

Doc from org.w3c.dom.TypeInfo.getTypeNamespace.

The namespace of the type declared for the associated element or attribute or null if the element does not have declaration or if no namespace information is available.

isDerivedByAnyback to summary
private boolean isDerivedByAny(String ancestorNS, String ancestorName, int derivationMethod, XSTypeDefinition type)

Checks if a type is derived from another by any combination of restriction, list ir union. See: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom

Parameters
ancestorNS:String

The namspace of the ancestor type declaration

ancestorName:String

The name of the ancestor type declaration

derivationMethod:int

A short indication the method of derivation

type:XSTypeDefinition

The reference type definition

Returns:boolean

boolean True if the type is derived by any method for the reference type

isDerivedByExtensionback to summary
private boolean isDerivedByExtension(String ancestorNS, String ancestorName, int derivationMethod, XSTypeDefinition type)

Checks if a type is derived from another by extension. See: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom

Parameters
ancestorNS:String

The namspace of the ancestor type declaration

ancestorName:String

The name of the ancestor type declaration

derivationMethod:int

A short indication the method of derivation

type:XSTypeDefinition

The reference type definition

Returns:boolean

boolean True if the type is derived by extension for the reference type

isDerivedByRestrictionback to summary
private boolean isDerivedByRestriction(String ancestorNS, String ancestorName, int derivationMethod, XSTypeDefinition type)

Checks if a type is derived from another by restriction. See: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom

Parameters
ancestorNS:String

The namspace of the ancestor type declaration

ancestorName:String

The name of the ancestor type declaration

derivationMethod:int

A short indication the method of derivation *

type:XSTypeDefinition

The reference type definition

Returns:boolean

boolean True if the type is derived by restriciton for the reference type

isDerivedFromback to summary
public boolean isDerivedFrom(String typeNamespaceArg, String typeNameArg, int derivationMethod)

Implements org.w3c.dom.TypeInfo.isDerivedFrom.

Doc from org.w3c.dom.TypeInfo.isDerivedFrom.

This method returns if there is a derivation between the reference type definition, i.e. the TypeInfo on which the method is being called, and the other type definition, i.e. the one passed as parameters.

isDOMDerivedFromback to summary
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:String

The namspace of the ancestor type declaration

ancestorName:String

The name of the ancestor type declaration

derivationMethod:int

The derivation method

Returns:boolean

boolean True if the ancestor type is derived from the reference type by the specifiied derivation method.

isFinalback to summary
public boolean isFinal(short derivation)

Implements com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.isFinal.

{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:short

Extension, restriction, list, union constants (defined in XSConstants).

Returns:boolean

True if derivation is in the final set, otherwise false.

isProhibitedSubstitutionback to summary
public boolean isProhibitedSubstitution(short prohibited)

Implements com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition.isProhibitedSubstitution.

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

Parameters
prohibited:short

extention or restriction constants (defined in XSConstants).

Returns:boolean

True if prohibited is a prohibited substitution, otherwise false.

resetback to summary
public void reset()
setContainsTypeIDback to summary
public void setContainsTypeID()
setIsAbstractTypeback to summary
public void setIsAbstractType()
setIsAnonymousback to summary
public void setIsAnonymous()
setNameback to summary
public void setName(String name)
setNamespaceItemback to summary
pack-priv void setNamespaceItem(XSNamespaceItem namespaceItem)
setValuesback to summary
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)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.