Top Description Fields Methods
com.sun.org.apache.xerces.internal.xs

public Interface XSTypeDefinition

extends XSObject
Known Direct Subinterfaces
com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinition, com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition

This interface represents a complex or simple type definition.

Field Summary

Modifier and TypeField and Description
public static final short
COMPLEX_TYPE

The object describes a complex type.

public static final short
SIMPLE_TYPE

The object describes a simple type.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if this type is derived from ancestorType using only derivation methods from the derivationMethod .
derivedFrom
(String
An ancestor type namespace.
namespace
,
String
An ancestor type name.
name
,
short
A bit combination representing a subset of { DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST }.
derivationMethod
)

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

public boolean

Returns:

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

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

public boolean
getAnonymous()

Convenience attribute.

public XSTypeDefinition
getBaseType()

{base type definition}: either a simple type definition or a complex type definition.

public short
getFinal()

For complex types the returned value is a bit combination of the subset of {DERIVATION_EXTENSION, DERIVATION_RESTRICTION} corresponding to final set of this type or DERIVATION_NONE.

public short
getTypeCategory()

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

public boolean

Returns:

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

{final}.

Inherited from com.sun.org.apache.xerces.internal.xs.XSObject:
getNamegetNamespacegetNamespaceItemgetType

Field Detail

COMPLEX_TYPEback to summary
public static final short COMPLEX_TYPE

The object describes a complex type.

SIMPLE_TYPEback to summary
public static final short SIMPLE_TYPE

The object describes a simple type.

Method Detail

derivedFromback to summary
public boolean derivedFrom(String namespace, String name, short derivationMethod)

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

Parameters
namespace:String

An ancestor type namespace.

name:String

An ancestor type name.

derivationMethod:short

A bit combination representing a subset of { DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST }.

Returns:boolean

True if this type is derived from ancestorType using only derivation methods from the derivationMethod .

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

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

Parameters
ancestorType:XSTypeDefinition

An ancestor type definition.

derivationMethod:short

A bit combination representing a subset of { DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST }.

Returns:boolean

True if this type is derived from ancestorType using only derivation methods from the derivationMethod .

getAnonymousback to summary
public boolean getAnonymous()

Convenience attribute. A boolean that specifies if the type definition is anonymous.

getBaseTypeback to summary
public XSTypeDefinition getBaseType()

{base type definition}: either a simple type definition or a complex type definition.

getFinalback to summary
public short getFinal()

For complex types the returned value is a bit combination of the subset of {DERIVATION_EXTENSION, DERIVATION_RESTRICTION} corresponding to final set of this type or DERIVATION_NONE. For simple types the returned value is a bit combination of the subset of { DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST } corresponding to final set of this type or DERIVATION_NONE.

getTypeCategoryback to summary
public short getTypeCategory()

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

isFinalback to summary
public boolean isFinal(short restriction)

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

Parameters
restriction:short

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

Returns:boolean

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