gnu.xml.validation.datatype

Class TypeLibrary

Implemented Interfaces:
DatatypeLibrary

public class TypeLibrary
extends Object
implements DatatypeLibrary

Datatype library for XML Schema datatypes.

Field Summary

static SimpleType
ANY_SIMPLE_TYPE
static SimpleType
ANY_URI
static SimpleType
BASE64_BINARY
static SimpleType
BOOLEAN
static SimpleType
BYTE
static SimpleType
DATE
static SimpleType
DATE_TIME
static SimpleType
DECIMAL
static SimpleType
DOUBLE
static SimpleType
DURATION
static SimpleType
ENTITIES
static SimpleType
ENTITY
static SimpleType
FLOAT
static SimpleType
G_DAY
static SimpleType
G_MONTH
static SimpleType
G_MONTH_DAY
static SimpleType
G_YEAR
static SimpleType
G_YEAR_MONTH
static SimpleType
HEX_BINARY
static SimpleType
ID
static SimpleType
IDREF
static SimpleType
IDREFS
static SimpleType
INT
static SimpleType
INTEGER
static SimpleType
LANGUAGE
static SimpleType
LONG
static SimpleType
NAME
static SimpleType
NCNAME
static SimpleType
NEGATIVE_INTEGER
static SimpleType
NMTOKEN
static SimpleType
NMTOKENS
static SimpleType
NON_NEGATIVE_INTEGER
static SimpleType
NON_POSITIVE_INTEGER
static SimpleType
NORMALIZED_STRING
static SimpleType
NOTATION
static SimpleType
POSITIVE_INTEGER
static SimpleType
QNAME
static SimpleType
SHORT
static SimpleType
STRING
static SimpleType
TIME
static SimpleType
TOKEN
static SimpleType
UNSIGNED_BYTE
static SimpleType
UNSIGNED_INT
static SimpleType
UNSIGNED_LONG
static SimpleType
UNSIGNED_SHORT

Method Summary

Datatype
createDatatype(String typeLocalName)
Gets or creates a pre-defined type.
DatatypeBuilder
createDatatypeBuilder(String baseTypeLocalName)
Creates a new instance of DatatypeBuilder.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

ANY_SIMPLE_TYPE

public static final SimpleType ANY_SIMPLE_TYPE

ANY_URI

public static final SimpleType ANY_URI

BASE64_BINARY

public static final SimpleType BASE64_BINARY

BOOLEAN

public static final SimpleType BOOLEAN

BYTE

public static final SimpleType BYTE

DATE

public static final SimpleType DATE

DATE_TIME

public static final SimpleType DATE_TIME

DECIMAL

public static final SimpleType DECIMAL

DOUBLE

public static final SimpleType DOUBLE

DURATION

public static final SimpleType DURATION

ENTITIES

public static final SimpleType ENTITIES

ENTITY

public static final SimpleType ENTITY

FLOAT

public static final SimpleType FLOAT

G_DAY

public static final SimpleType G_DAY

G_MONTH

public static final SimpleType G_MONTH

G_MONTH_DAY

public static final SimpleType G_MONTH_DAY

G_YEAR

public static final SimpleType G_YEAR

G_YEAR_MONTH

public static final SimpleType G_YEAR_MONTH

HEX_BINARY

public static final SimpleType HEX_BINARY

ID

public static final SimpleType ID

IDREF

public static final SimpleType IDREF

IDREFS

public static final SimpleType IDREFS

INT

public static final SimpleType INT

INTEGER

public static final SimpleType INTEGER

LANGUAGE

public static final SimpleType LANGUAGE

LONG

public static final SimpleType LONG

NAME

public static final SimpleType NAME

NCNAME

public static final SimpleType NCNAME

NEGATIVE_INTEGER

public static final SimpleType NEGATIVE_INTEGER

NMTOKEN

public static final SimpleType NMTOKEN

NMTOKENS

public static final SimpleType NMTOKENS

NON_NEGATIVE_INTEGER

public static final SimpleType NON_NEGATIVE_INTEGER

NON_POSITIVE_INTEGER

public static final SimpleType NON_POSITIVE_INTEGER

NORMALIZED_STRING

public static final SimpleType NORMALIZED_STRING

NOTATION

public static final SimpleType NOTATION

POSITIVE_INTEGER

public static final SimpleType POSITIVE_INTEGER

QNAME

public static final SimpleType QNAME

SHORT

public static final SimpleType SHORT

STRING

public static final SimpleType STRING

TIME

public static final SimpleType TIME

TOKEN

public static final SimpleType TOKEN

UNSIGNED_BYTE

public static final SimpleType UNSIGNED_BYTE

UNSIGNED_INT

public static final SimpleType UNSIGNED_INT

UNSIGNED_LONG

public static final SimpleType UNSIGNED_LONG

UNSIGNED_SHORT

public static final SimpleType UNSIGNED_SHORT

Method Details

createDatatype

public Datatype createDatatype(String typeLocalName)
            throws DatatypeException
Gets or creates a pre-defined type. This is just a short-cut of createDatatypeBuilder(typeLocalName).createDatatype(); The callee should throw a DatatypeException in case of an error.
Specified by:
createDatatype in interface DatatypeLibrary
Returns:
A non-null valid datatype object.

createDatatypeBuilder

public DatatypeBuilder createDatatypeBuilder(String baseTypeLocalName)
            throws DatatypeException
Creates a new instance of DatatypeBuilder. The callee should throw a DatatypeException in case of an error.
Specified by:
createDatatypeBuilder in interface DatatypeLibrary
Parameters:
baseTypeLocalName - The local name of the base type.
Returns:
A non-null valid datatype object.

TypeLibrary.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.