org.exolab.castor.xml.schema

Class AnyType

Implemented Interfaces:
java.io.Serializable

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
See Also:
Serialized Form

Field Summary

Fields inherited from class org.exolab.castor.xml.schema.XMLType

NULL_ARGUMENT

Fields inherited from class org.exolab.castor.xml.schema.Structure

ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, MODELGROUP, MODELGROUP_REF, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD

Constructor Summary

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

Method Summary

String
getName()
Returns the name of this type.
short
getStructureType()
Returns the type of this Schema Structure.
void
setBaseType(XMLType baseType)
Overrides XMLType#setBaseType(), anyType cannot have a Base type.
void
setDerivationMethod(String derivationMethod)
Overrides XMLType#setDerivationMethod, anyType cannot be derived from any other type.
void
setId(String id)
Sets the Id for this XMLType.
void
setName(String name)
Overrides XMLType#setName.
protected void
setParent(Structure parent)
Sets the parent for this XMLType
void
validate()
Checks the validity of this Schema defintion.

Methods inherited from class org.exolab.castor.xml.schema.XMLType

getBaseType, getDerivationMethod, getId, getName, getSchema, getType, isAnyType, isComplexType, isSimpleType, setBaseType, setDerivationMethod, setId, setName, setParent, setSchema

Methods inherited from class org.exolab.castor.xml.schema.Annotated

addAnnotation, getAnnotations, removeAnnotation

Methods inherited from class org.exolab.castor.xml.schema.Structure

getStructureType, isValid, validate

Constructor Details

AnyType

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

Method Details

getName

public String getName()
Returns the name of this type. This method always returns 'anyType'.
Overrides:
getName in interface XMLType
Returns:
the name of this type.

getStructureType

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

setBaseType

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

setDerivationMethod

public void setDerivationMethod(String derivationMethod)
Overrides XMLType#setDerivationMethod, anyType cannot be derived from any other type.
Overrides:
setDerivationMethod in interface XMLType
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.
Overrides:
setId in interface XMLType
Parameters:
id - the unique Id for this XMLType

setName

public void setName(String name)
Overrides XMLType#setName. The Name of anyType cannot be changed.
Overrides:
setName in interface XMLType
Parameters:
name - of the type

setParent

protected void setParent(Structure parent)
Sets the parent for this XMLType
Overrides:
setParent in interface XMLType
Parameters:
parent - the parent Structure for this XMLType

validate

public void validate()
            throws ValidationException
Checks the validity of this Schema defintion.
Overrides:
validate in interface Structure
Throws:
ValidationException - when this Schema definition is invalid.

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