Top Fields Constructors Methods
com.sun.xml.xsom.impl

public Class ComplexTypeImpl

extends AttributesHolder
implements XSComplexType, ComplexType
Class Inheritance
All Implemented Interfaces
com.sun.xml.xsom.impl.Ref.ComplexType, com.sun.xml.xsom.impl.Ref.Type, com.sun.xml.xsom.XSComplexType, com.sun.xml.xsom.XSAttContainer, com.sun.xml.xsom.XSDeclaration, com.sun.xml.xsom.XSComponent, com.sun.xml.xsom.XSType
Imports
com.sun.xml.xsom.XSAttGroupDecl, .XSAttributeDecl, .XSAttributeUse, .XSComplexType, .XSContentType, .XSElementDecl, .XSSchema, .XSSchemaSet, .XSSimpleType, .XSType, .XSWildcard, com.sun.xml.xsom.impl.parser.DelayedRef, .SchemaDocumentImpl, com.sun.xml.xsom.impl.scd.Iterators, com.sun.xml.xsom.visitor.XSFunction, .XSVisitor, java.util.ArrayList, .List, .Collection, .HashMap, .Iterator, .Map, org.xml.sax.Locator

Field Summary

Modifier and TypeField and Description
private final boolean
private Ref.Type
private final int
private Ref.ContentType
private int
private XSContentType
private final int
private WildcardImpl
private final boolean
private ComplexTypeImpl
private short
redefiningCount

Number of times this component redefines other components.

private XSElementDecl
Inherited from com.sun.xml.xsom.impl.AttributesHolder:
attGroupsattributesprohibitedAtts

Constructor Summary

AccessConstructor and Description
public
ComplexTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, boolean _abstract, int _derivationMethod, Ref.Type _base, int _final, int _block, boolean _mixed)

Method Summary

Modifier and TypeMethod and Description
public <T> T
apply(XSFunction<T> function)

Implements com.sun.xml.xsom.XSComponent.apply.

Accepts a functor.

public XSComplexType
asComplexType()

Implements com.sun.xml.xsom.XSType.asComplexType.

Casts this object to XSComplexType if possible, otherwise returns null.

public XSSimpleType
asSimpleType()

Implements com.sun.xml.xsom.XSType.asSimpleType.

Casts this object to XSSimpleType if possible, otherwise returns null.

public XSAttributeUse
getAttributeUse(String nsURI, String localName)

Implements com.sun.xml.xsom.XSAttContainer.getAttributeUse.

Looks for the attribute use with the specified name from all the attribute uses that are directly/indirectly referenced from this component.

public Collection<XSAttributeUse>
public XSWildcard
public XSType
getBaseType()

Implements com.sun.xml.xsom.XSType.getBaseType.

Returns the base type of this type.

public XSContentType
getContentType()

Implements com.sun.xml.xsom.XSComplexType.getContentType.

The content of this complex type.

public int
public List<XSElementDecl>
getElementDecls()

Implements com.sun.xml.xsom.XSComplexType.getElementDecls.

Returns a list of element declarations of this type.

public XSContentType
getExplicitContent()

Implements com.sun.xml.xsom.XSComplexType.getExplicitContent.

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

public XSComplexType
getRedefinedBy()

Implements com.sun.xml.xsom.XSComplexType.getRedefinedBy.

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

public int
getRedefinedCount()

Implements com.sun.xml.xsom.XSType.getRedefinedCount.

Returns the number of complex types that redefine this component.

public XSElementDecl
getScope()

Implements com.sun.xml.xsom.XSComplexType.getScope.

Gets the scope of this complex type.

public List<XSComplexType>
getSubtypes()

Implements com.sun.xml.xsom.XSComplexType.getSubtypes.

Returns a list of direct subtypes of this complex type.

public XSComplexType
getType()

Implements com.sun.xml.xsom.impl.Ref.ComplexType.getType.

Obtains a reference as a type.

public boolean
isAbstract()

Implements com.sun.xml.xsom.XSComplexType.isAbstract.

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

public final boolean
isComplexType()

Implements com.sun.xml.xsom.XSType.isComplexType.

Returns true if this instanceof XSComplexType.

public boolean
isDerivedFrom(XSType t)

Implements com.sun.xml.xsom.XSType.isDerivedFrom.

Returns true if this type is derived from the specified type.

public boolean
isFinal(int derivationMethod)

Implements com.sun.xml.xsom.XSComplexType.isFinal.

public boolean
public final boolean
isSimpleType()

Implements com.sun.xml.xsom.XSType.isSimpleType.

Returns true if this instanceof XSSimpleType.

public boolean
isSubstitutionProhibited(int method)

Implements com.sun.xml.xsom.XSComplexType.isSubstitutionProhibited.

Roughly corresponds to the block attribute.

public Iterator<XSAttributeUse>
iterateAttributeUses()

Overrides com.sun.xml.xsom.impl.AttributesHolder.iterateAttributeUses.

Implements com.sun.xml.xsom.XSAttContainer.iterateAttributeUses.

Lists all the attribute uses that are directly/indirectly referenced from this component.

public XSType[]
listSubstitutables()

Implements com.sun.xml.xsom.XSType.listSubstitutables.

Lists up types that can substitute this type by using xsi:type.

public void
redefine(ComplexTypeImpl ct)

Called when this complex type redefines the specified complex type.

public void
public void
public void
public void
setWildcard(WildcardImpl wc)

Implements abstract com.sun.xml.xsom.impl.AttributesHolder.setWildcard.

Set the local attribute wildcard.

public void
visit(XSVisitor visitor)

Implements com.sun.xml.xsom.XSComponent.visit.

Accepts a visitor.

Inherited from com.sun.xml.xsom.impl.AttributesHolder:
addAttGroupaddAttributeUseaddProhibitedAttributegetAttGroupsgetDeclaredAttributeUsegetDeclaredAttributeUsesiterateAttGroupsiterateDeclaredAttributeUses

Field Detail

_abstractback to summary
private final boolean _abstract
baseTypeback to summary
private Ref.Type baseType
blockValueback to summary
private final int blockValue
contentTypeback to summary
private Ref.ContentType contentType
derivationMethodback to summary
private int derivationMethod
explicitContentback to summary
private XSContentType explicitContent
finalValueback to summary
private final int finalValue
localAttWildcardback to summary
private WildcardImpl localAttWildcard
mixedback to summary
private final boolean mixed
redefinedByback to summary
private ComplexTypeImpl redefinedBy
redefiningCountback to summary
private short redefiningCount

Number of times this component redefines other components.

scopeback to summary
private XSElementDecl scope

Constructor Detail

ComplexTypeImplback to summary
public ComplexTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, boolean _abstract, int _derivationMethod, Ref.Type _base, int _final, int _block, boolean _mixed)

Method Detail

applyback to summary
public <T> T apply(XSFunction<T> function)

Implements com.sun.xml.xsom.XSComponent.apply.

Doc from com.sun.xml.xsom.XSComponent.apply.

Accepts a functor.

asComplexTypeback to summary
public XSComplexType asComplexType()

Implements com.sun.xml.xsom.XSType.asComplexType.

Doc from com.sun.xml.xsom.XSType.asComplexType.

Casts this object to XSComplexType if possible, otherwise returns null.

asSimpleTypeback to summary
public XSSimpleType asSimpleType()

Implements com.sun.xml.xsom.XSType.asSimpleType.

Doc from com.sun.xml.xsom.XSType.asSimpleType.

Casts this object to XSSimpleType if possible, otherwise returns null.

getAttributeUseback to summary
public XSAttributeUse getAttributeUse(String nsURI, String localName)

Implements com.sun.xml.xsom.XSAttContainer.getAttributeUse.

Doc from com.sun.xml.xsom.XSAttContainer.getAttributeUse.

Looks for the attribute use with the specified name from all the attribute uses that are directly/indirectly referenced from this component.

This is the exact implementation of the "attribute use" schema component.

getAttributeUsesback to summary
public Collection<XSAttributeUse> getAttributeUses()

Overrides com.sun.xml.xsom.impl.AttributesHolder.getAttributeUses.

Implements com.sun.xml.xsom.XSAttContainer.getAttributeUses.

Doc from com.sun.xml.xsom.XSAttContainer.getAttributeUses.

Gets all the attribute uses.

getAttributeWildcardback to summary
public XSWildcard getAttributeWildcard()

Implements com.sun.xml.xsom.XSAttContainer.getAttributeWildcard.

getBaseTypeback to summary
public XSType getBaseType()

Implements com.sun.xml.xsom.XSType.getBaseType.

Doc from com.sun.xml.xsom.XSType.getBaseType.

Returns the base type of this type. Note that if this type represents xs:anyType, this method returns itself. This is awkward as an API, but it follows the schema specification.

getContentTypeback to summary
public XSContentType getContentType()

Implements com.sun.xml.xsom.XSComplexType.getContentType.

Doc from com.sun.xml.xsom.XSComplexType.getContentType.

The content of this complex type.

getDerivationMethodback to summary
public int getDerivationMethod()

Implements com.sun.xml.xsom.XSType.getDerivationMethod.

getElementDeclsback to summary
public List<XSElementDecl> getElementDecls()

Implements com.sun.xml.xsom.XSComplexType.getElementDecls.

Doc from com.sun.xml.xsom.XSComplexType.getElementDecls.

Returns a list of element declarations of this type.

getExplicitContentback to summary
public XSContentType getExplicitContent()

Implements com.sun.xml.xsom.XSComplexType.getExplicitContent.

Doc from com.sun.xml.xsom.XSComplexType.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 )
getRedefinedByback to summary
public XSComplexType getRedefinedBy()

Implements com.sun.xml.xsom.XSComplexType.getRedefinedBy.

Doc from com.sun.xml.xsom.XSComplexType.getRedefinedBy.

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

getRedefinedCountback to summary
public int getRedefinedCount()

Implements com.sun.xml.xsom.XSType.getRedefinedCount.

Doc from com.sun.xml.xsom.XSType.getRedefinedCount.

Returns the number of complex types that redefine this component.

For example, if A is redefined by B and B is redefined by C, A.getRedefinedCount()==2, B.getRedefinedCount()==1, and C.getRedefinedCount()==0.

getScopeback to summary
public XSElementDecl getScope()

Implements com.sun.xml.xsom.XSComplexType.getScope.

Doc from com.sun.xml.xsom.XSComplexType.getScope.

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

getSubtypesback to summary
public List<XSComplexType> getSubtypes()

Implements com.sun.xml.xsom.XSComplexType.getSubtypes.

Doc from com.sun.xml.xsom.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.

getTypeback to summary
public XSComplexType getType()

Implements com.sun.xml.xsom.impl.Ref.ComplexType.getType.

Doc from com.sun.xml.xsom.impl.Ref.Type.getType.

Obtains a reference as a type.

isAbstractback to summary
public boolean isAbstract()

Implements com.sun.xml.xsom.XSComplexType.isAbstract.

Doc from com.sun.xml.xsom.XSComplexType.isAbstract.

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

isComplexTypeback to summary
public final boolean isComplexType()

Implements com.sun.xml.xsom.XSType.isComplexType.

Doc from com.sun.xml.xsom.XSType.isComplexType.

Returns true if this instanceof XSComplexType.

isDerivedFromback to summary
public boolean isDerivedFrom(XSType t)

Implements com.sun.xml.xsom.XSType.isDerivedFrom.

Doc from com.sun.xml.xsom.XSType.isDerivedFrom.

Returns true if this type is derived from the specified type.

Note that t.isDerivedFrom(t) returns true.

isFinalback to summary
public boolean isFinal(int derivationMethod)

Implements com.sun.xml.xsom.XSComplexType.isFinal.

isMixedback to summary
public boolean isMixed()

Implements com.sun.xml.xsom.XSComplexType.isMixed.

isSimpleTypeback to summary
public final boolean isSimpleType()

Implements com.sun.xml.xsom.XSType.isSimpleType.

Doc from com.sun.xml.xsom.XSType.isSimpleType.

Returns true if this instanceof XSSimpleType.

isSubstitutionProhibitedback to summary
public boolean isSubstitutionProhibited(int method)

Implements com.sun.xml.xsom.XSComplexType.isSubstitutionProhibited.

Doc from com.sun.xml.xsom.XSComplexType.isSubstitutionProhibited.

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

iterateAttributeUsesback to summary
public Iterator<XSAttributeUse> iterateAttributeUses()

Overrides com.sun.xml.xsom.impl.AttributesHolder.iterateAttributeUses.

Implements com.sun.xml.xsom.XSAttContainer.iterateAttributeUses.

Doc from com.sun.xml.xsom.XSAttContainer.iterateAttributeUses.

Lists all the attribute uses that are directly/indirectly referenced from this component.

This is the exact implementation of the "attribute use" schema component.

listSubstitutablesback to summary
public XSType[] listSubstitutables()

Implements com.sun.xml.xsom.XSType.listSubstitutables.

Doc from com.sun.xml.xsom.XSType.listSubstitutables.

Lists up types that can substitute this type by using xsi:type. Includes this type itself.

This method honors the block flag.

redefineback to summary
public void redefine(ComplexTypeImpl ct)

Called when this complex type redefines the specified complex type.

setContentTypeback to summary
public void setContentType(Ref.ContentType v)
setExplicitContentback to summary
public void setExplicitContent(XSContentType v)
setScopeback to summary
public void setScope(XSElementDecl _scope)
setWildcardback to summary
public void setWildcard(WildcardImpl wc)

Implements abstract com.sun.xml.xsom.impl.AttributesHolder.setWildcard.

Set the local attribute wildcard.

visitback to summary
public void visit(XSVisitor visitor)

Implements com.sun.xml.xsom.XSComponent.visit.

Doc from com.sun.xml.xsom.XSComponent.visit.

Accepts a visitor.