org.exolab.castor.xml.schema

Class AnyType

public final class AnyType extends XMLType

A Class which represents the XML Schema AnyType.

Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:27 $

Author: Keith Visco

Constructor Summary
AnyType(Schema schema)
Creates a new AnyType for the given Schema.
Method Summary
StringgetName()
Returns the name of this type.
shortgetStructureType()
Returns the type of this Schema Structure.
voidsetBaseType(XMLType baseType)
Overrides XMLType#setBaseType(), anyType cannot have a Base type.
voidsetDerivationMethod(String derivationMethod)
Overrides XMLType#setDerivationMethod, anyType cannot be derived from any other type.
voidsetId(String id)
Sets the Id for this XMLType.
voidsetName(String name)
Overrides XMLType#setName.
protected voidsetParent(Structure parent)
Sets the parent for this XMLType
voidvalidate()
Checks the validity of this Schema defintion.

Constructor Detail

AnyType

public AnyType(Schema schema)
Creates a new AnyType for the given Schema.

Method Detail

getName

public String getName()
Returns the name of this type. This method always returns 'anyType'.

Returns: the name of this type.

getStructureType

public short getStructureType()
Returns the type of this Schema Structure. This method returns Structure.ANYTYPE.

Returns: the type of this Schema Structure.

setBaseType

public void setBaseType(XMLType baseType)
Overrides XMLType#setBaseType(), anyType cannot have a Base type.

Parameters: base the base type which this datatype inherits from

setDerivationMethod

public void setDerivationMethod(String derivationMethod)
Overrides XMLType#setDerivationMethod, anyType cannot be derived from any other type.

Parameters: derivationMethod the derivation method.

setId

public void setId(String id)
Sets the Id for this XMLType. The Id must be globally unique within the Schema. Use a null value to remove the Id.

Parameters: id the unique Id for this XMLType

setName

public void setName(String name)
Overrides XMLType#setName. The Name of anyType cannot be changed.

Parameters: name of the type

setParent

protected void setParent(Structure parent)
Sets the parent for this XMLType

Parameters: parent the parent Structure for this XMLType

validate

public void validate()
Checks the validity of this Schema defintion.

Throws: ValidationException when this Schema definition is invalid.

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com