org.exolab.castor.xml.schema

Class Facet

public class Facet extends Annotated

Represents the base type for XML Schema Facets

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

Author: Keith Visco

Field Summary
static StringENUMERATION
static StringFRACTIONDIGITS
static StringLENGTH
static StringMAX_EXCLUSIVE
static StringMAX_INCLUSIVE
static StringMAX_LENGTH
static StringMIN_EXCLUSIVE
static StringMIN_INCLUSIVE
static StringMIN_LENGTH
static StringPATTERN
static StringPRECISION
static StringTOTALDIGITS
static StringWHITESPACE
Constructor Summary
Facet(String name, String value)
Creates a new Facet with the given name
Method Summary
StringgetName()
Returns the name of this Facet
shortgetStructureType()
Returns the type of this Schema Structure
StringgetValue()
Returns the character (String) representation of this facet
booleanisMultivalued()
Returns true if this Facet can occur more than once, such as the "enumeration" facet.
bytetoByte()
Returns a byte representation of the value of this facet
doubletoDouble()
Returns a double representation of the value of this facet
floattoFloat()
Returns a double representation of the value of this facet
inttoInt()
Returns an int representation of the value of this facet
longtoLong()
Returns a long representation of the value of this facet
shorttoShort()
Returns an short representation of the value of this facet
voidvalidate()
Checks the validity of this Schema defintion.

Field Detail

ENUMERATION

public static final String ENUMERATION

FRACTIONDIGITS

public static final String FRACTIONDIGITS

LENGTH

public static final String LENGTH

MAX_EXCLUSIVE

public static final String MAX_EXCLUSIVE

MAX_INCLUSIVE

public static final String MAX_INCLUSIVE

MAX_LENGTH

public static final String MAX_LENGTH

MIN_EXCLUSIVE

public static final String MIN_EXCLUSIVE

MIN_INCLUSIVE

public static final String MIN_INCLUSIVE

MIN_LENGTH

public static final String MIN_LENGTH

PATTERN

public static final String PATTERN

PRECISION

public static final String PRECISION

TOTALDIGITS

public static final String TOTALDIGITS

WHITESPACE

public static final String WHITESPACE

Constructor Detail

Facet

public Facet(String name, String value)
Creates a new Facet with the given name

Parameters: name the name of the Facet value the value of the Facet

Method Detail

getName

public String getName()
Returns the name of this Facet

Returns: the name of this Facet

getStructureType

public short getStructureType()
Returns the type of this Schema Structure

Returns: the type of this Schema Structure

getValue

public String getValue()
Returns the character (String) representation of this facet

Returns: the value of this facet

isMultivalued

public boolean isMultivalued()
Returns true if this Facet can occur more than once, such as the "enumeration" facet.

Returns: true if this Facet can occur more than once.

toByte

public byte toByte()
Returns a byte representation of the value of this facet

Returns: a byte representation of the value of this facet

toDouble

public double toDouble()
Returns a double representation of the value of this facet

Returns: a double representation of the value of this facet

toFloat

public float toFloat()
Returns a double representation of the value of this facet

Returns: a double representation of the value of this facet

toInt

public int toInt()
Returns an int representation of the value of this facet

Returns: an int representation of the value of this facet

toLong

public long toLong()
Returns a long representation of the value of this facet

Returns: a long representation of the value of this facet

toShort

public short toShort()
Returns an short representation of the value of this facet

Returns: an short representation of the value of this facet

validate

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

Throws: ValidationException when this Schema definition is invalid.

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