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

public abstract Class SimpleTypeImpl

extends DeclarationImpl
implements XSSimpleType, ContentTypeImpl, SimpleType
Class Inheritance
All Implemented Interfaces
com.sun.xml.xsom.impl.Ref.SimpleType, com.sun.xml.xsom.impl.Ref.Type, com.sun.xml.xsom.impl.ContentTypeImpl, com.sun.xml.xsom.XSContentType, com.sun.xml.xsom.XSComponent, com.sun.xml.xsom.impl.Ref.ContentType, com.sun.xml.xsom.XSSimpleType, com.sun.xml.xsom.XSType, com.sun.xml.xsom.XSDeclaration
Known Direct Subclasses
com.sun.xml.xsom.impl.UnionSimpleTypeImpl, com.sun.xml.xsom.impl.ListSimpleTypeImpl, com.sun.xml.xsom.impl.RestrictionSimpleTypeImpl
Imports
com.sun.xml.xsom.XSComplexType, .XSContentType, .XSListSimpleType, .XSParticle, .XSRestrictionSimpleType, .XSSimpleType, .XSType, .XSUnionSimpleType, .XSVariety, com.sun.xml.xsom.impl.parser.SchemaDocumentImpl, com.sun.xml.xsom.visitor.XSContentTypeFunction, .XSContentTypeVisitor, .XSFunction, .XSVisitor, org.xml.sax.Locator, java.util.Set

Field Summary

Modifier and TypeField and Description
private Ref.SimpleType
private final Set<XSVariety>
private SimpleTypeImpl
private short
redefiningCount

Number of times this component redefines other components.

Constructor Summary

AccessConstructor and Description
pack-priv
SimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType _baseType)

Method Summary

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

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

Accepts a functor.

public final <T> T
public final XSComplexType
asComplexType()

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

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

public final XSContentType
asEmpty()

Implements com.sun.xml.xsom.XSContentType.asEmpty.

If this content type represents the empty content, return this, otherwise null.

public XSListSimpleType
public final XSParticle
asParticle()

Implements com.sun.xml.xsom.XSContentType.asParticle.

Equivalent of (this instanceof XSParticle)?this:null

public XSRestrictionSimpleType
public final XSSimpleType
asSimpleType()

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

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

public XSUnionSimpleType
public XSListSimpleType
getBaseListType()

Implements com.sun.xml.xsom.XSSimpleType.getBaseListType.

Gets the nearest ancestor XSListSimpleType (including itself) if the variety of this type is list.

public XSType
getBaseType()

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

Returns the base type of this type.

public XSUnionSimpleType
getBaseUnionType()

Implements com.sun.xml.xsom.XSSimpleType.getBaseUnionType.

Gets the nearest ancestor XSUnionSimpleType (including itself) if the variety of this type is union.

public XSContentType
public final int
public XSSimpleType
getRedefinedBy()

Implements com.sun.xml.xsom.XSSimpleType.getRedefinedBy.

If this is redefined by another simple 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 XSSimpleType
getSimpleBaseType()

Implements com.sun.xml.xsom.XSSimpleType.getSimpleBaseType.

Gets the base type as XSSimpleType.

public XSSimpleType
getType()

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

Obtains a reference as a 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(XSVariety v)

Implements com.sun.xml.xsom.XSSimpleType.isFinal.

Returns true if this type definition is marked as 'final' with respect to the given XSVariety.

public boolean
isList()

Implements com.sun.xml.xsom.XSSimpleType.isList.

Returns true if this instanceof XSListSimpleType.

public boolean
isPrimitive()

Implements com.sun.xml.xsom.XSSimpleType.isPrimitive.

Returns true if this is a primitive built-in simple type (that directly derives from xs:anySimpleType, by definition.)

public boolean
isRestriction()

Implements com.sun.xml.xsom.XSSimpleType.isRestriction.

Returns true if this instanceof XSRestrictionSimpleType.

public final boolean
isSimpleType()

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

Returns true if this instanceof XSSimpleType.

public boolean
isUnion()

Implements com.sun.xml.xsom.XSSimpleType.isUnion.

Returns true if this instanceof XSUnionSimpleType.

public XSType[]
listSubstitutables()

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

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

public void
public final void
visit(XSVisitor visitor)

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

Accepts a visitor.

public final void
Inherited from com.sun.xml.xsom.impl.DeclarationImpl:
getNamegetTargetNamespaceisAnonymousisGlobalisLocal

Field Detail

baseTypeback to summary
private Ref.SimpleType baseType
finalSetback to summary
private final Set<XSVariety> finalSet
redefinedByback to summary
private SimpleTypeImpl redefinedBy
redefiningCountback to summary
private short redefiningCount

Number of times this component redefines other components.

Constructor Detail

SimpleTypeImplback to summary
pack-priv SimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType _baseType)

Method Detail

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

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

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

Accepts a functor.

applyback to summary
public final <T> T apply(XSContentTypeFunction<T> function)

Implements com.sun.xml.xsom.XSContentType.apply.

asComplexTypeback to summary
public final 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.

asEmptyback to summary
public final XSContentType asEmpty()

Implements com.sun.xml.xsom.XSContentType.asEmpty.

Doc from com.sun.xml.xsom.XSContentType.asEmpty.

If this content type represents the empty content, return this, otherwise null.

asListback to summary
public XSListSimpleType asList()

Implements com.sun.xml.xsom.XSSimpleType.asList.

asParticleback to summary
public final XSParticle asParticle()

Implements com.sun.xml.xsom.XSContentType.asParticle.

Doc from com.sun.xml.xsom.XSContentType.asParticle.

Equivalent of (this instanceof XSParticle)?this:null

asRestrictionback to summary
public XSRestrictionSimpleType asRestriction()

Implements com.sun.xml.xsom.XSSimpleType.asRestriction.

asSimpleTypeback to summary
public final XSSimpleType asSimpleType()

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

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

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

asUnionback to summary
public XSUnionSimpleType asUnion()

Implements com.sun.xml.xsom.XSSimpleType.asUnion.

getBaseListTypeback to summary
public XSListSimpleType getBaseListType()

Implements com.sun.xml.xsom.XSSimpleType.getBaseListType.

Doc from com.sun.xml.xsom.XSSimpleType.getBaseListType.

Gets the nearest ancestor XSListSimpleType (including itself) if the variety of this type is list.

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.

getBaseUnionTypeback to summary
public XSUnionSimpleType getBaseUnionType()

Implements com.sun.xml.xsom.XSSimpleType.getBaseUnionType.

Doc from com.sun.xml.xsom.XSSimpleType.getBaseUnionType.

Gets the nearest ancestor XSUnionSimpleType (including itself) if the variety of this type is union.

getContentTypeback to summary
public XSContentType getContentType()

Implements com.sun.xml.xsom.impl.Ref.ContentType.getContentType.

getDerivationMethodback to summary
public final int getDerivationMethod()

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

getRedefinedByback to summary
public XSSimpleType getRedefinedBy()

Implements com.sun.xml.xsom.XSSimpleType.getRedefinedBy.

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

If this is redefined by another simple 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.

getSimpleBaseTypeback to summary
public XSSimpleType getSimpleBaseType()

Implements com.sun.xml.xsom.XSSimpleType.getSimpleBaseType.

Doc from com.sun.xml.xsom.XSSimpleType.getSimpleBaseType.

Gets the base type as XSSimpleType. Equivalent to (XSSimpleType)getBaseType() Since this is a simple type, we know that the base type is also a simple type. The only exception is xs:anySimpleType, which has xs:anyType as the base type.

getTypeback to summary
public XSSimpleType getType()

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

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

Obtains a reference as a 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(XSVariety v)

Implements com.sun.xml.xsom.XSSimpleType.isFinal.

Doc from com.sun.xml.xsom.XSSimpleType.isFinal.

Returns true if this type definition is marked as 'final' with respect to the given XSVariety.

isListback to summary
public boolean isList()

Implements com.sun.xml.xsom.XSSimpleType.isList.

Doc from com.sun.xml.xsom.XSSimpleType.isList.

Returns true if this instanceof XSListSimpleType.

isPrimitiveback to summary
public boolean isPrimitive()

Implements com.sun.xml.xsom.XSSimpleType.isPrimitive.

Doc from com.sun.xml.xsom.XSSimpleType.isPrimitive.

Returns true if this is a primitive built-in simple type (that directly derives from xs:anySimpleType, by definition.)

isRestrictionback to summary
public boolean isRestriction()

Implements com.sun.xml.xsom.XSSimpleType.isRestriction.

Doc from com.sun.xml.xsom.XSSimpleType.isRestriction.

Returns true if this instanceof XSRestrictionSimpleType.

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.

isUnionback to summary
public boolean isUnion()

Implements com.sun.xml.xsom.XSSimpleType.isUnion.

Doc from com.sun.xml.xsom.XSSimpleType.isUnion.

Returns true if this instanceof XSUnionSimpleType.

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(SimpleTypeImpl st)
visitback to summary
public final void visit(XSVisitor visitor)

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

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

Accepts a visitor.

visitback to summary
public final void visit(XSContentTypeVisitor visitor)

Implements com.sun.xml.xsom.XSContentType.visit.