dk.brics.relaxng.converter
Class StandardDatatypes

java.lang.Object
  extended by dk.brics.relaxng.converter.StandardDatatypes
All Implemented Interfaces:
DatatypeLibrary

public class StandardDatatypes
extends Object
implements DatatypeLibrary

Converter for built-in RELAX NG datatypes and XML Schema datatypes. Constructed automata are cached.


Constructor Summary
StandardDatatypes()
          Constructs a new converter.
 
Method Summary
 Automaton datatypeToAutomaton(String lib, String type, List<Param> params)
          Converts a datatype.
 boolean isKnown(String lib, String type)
          Checks whether this library knows the given datatype.
 Automaton valueToAutomaton(String lib, String type, String ns, String value)
          Converts a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardDatatypes

public StandardDatatypes()
Constructs a new converter.

Method Detail

datatypeToAutomaton

public Automaton datatypeToAutomaton(String lib,
                                     String type,
                                     List<Param> params)
                              throws ConverterException
Converts a datatype.

Specified by:
datatypeToAutomaton in interface DatatypeLibrary
Parameters:
lib - datatype library URI
type - datatype
params - parameters
Returns:
automaton
Throws:
ConverterException - if unable to convert

isKnown

public boolean isKnown(String lib,
                       String type)
Description copied from interface: DatatypeLibrary
Checks whether this library knows the given datatype.

Specified by:
isKnown in interface DatatypeLibrary
Parameters:
lib - library
type - datatype
Returns:
true if the datatype is known by this library

valueToAutomaton

public Automaton valueToAutomaton(String lib,
                                  String type,
                                  String ns,
                                  String value)
                           throws ConverterException
Converts a value.

Specified by:
valueToAutomaton in interface DatatypeLibrary
Parameters:
lib - datatype library URI
type - datatype
ns - namespace
value - value
Returns:
automaton
Throws:
ConverterException - if unable to convert


Copyright © 2005-2010 Anders Møller.