Top Description Fields Methods
com.sun.xml.xsom

public Interface XSType

extends XSDeclaration
Known Direct Subinterfaces
com.sun.xml.xsom.XSComplexType, com.sun.xml.xsom.XSSimpleType

Base interface for XSComplexType and XSSimpleType.
Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int

Method Summary

Modifier and TypeMethod and Description
public XSComplexType
asComplexType()

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

public XSSimpleType
asSimpleType()

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

public XSType

Returns:

always non-null.
getBaseType
()

Returns the base type of this type.

public int
public XSType

Returns:

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

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

public int
getRedefinedCount()

Returns the number of complex types that redefine this component.

public boolean
isComplexType()

Returns true if this instanceof XSComplexType.

public boolean
isDerivedFrom(XSType t)

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

public boolean
isSimpleType()

Returns true if this instanceof XSSimpleType.

public XSType[]
listSubstitutables()

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

Inherited from com.sun.xml.xsom.XSDeclaration:
getNamegetTargetNamespaceisAnonymousisGlobalisLocal

Field Detail

EXTENSIONback to summary
public static final int EXTENSION
RESTRICTIONback to summary
public static final int RESTRICTION
SUBSTITUTIONback to summary
public static final int SUBSTITUTION

Method Detail

asComplexTypeback to summary
public XSComplexType asComplexType()

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

asSimpleTypeback to summary
public XSSimpleType asSimpleType()

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

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

Returns:XSType

always non-null.

getDerivationMethodback to summary
public int getDerivationMethod()
getRedefinedByback to summary
public XSType getRedefinedBy()

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

Returns:XSType

null if this component has not been redefined.

getRedefinedCountback to summary
public int 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.

isComplexTypeback to summary
public boolean isComplexType()

Returns true if this instanceof XSComplexType.

isDerivedFromback to summary
public boolean isDerivedFrom(XSType t)

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

Note that t.isDerivedFrom(t) returns true.

isSimpleTypeback to summary
public boolean isSimpleType()

Returns true if this instanceof XSSimpleType.

listSubstitutablesback to summary
public XSType[] listSubstitutables()

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

This method honors the block flag.