dk.brics.relaxng.converter
Class BuiltInDatatypes

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

public class BuiltInDatatypes
extends Object
implements DatatypeLibrary

Converter for built-in datatypes.


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

Constructor Detail

BuiltInDatatypes

public BuiltInDatatypes()
Constructs a new converter.

Method Detail

datatypeToAutomaton

public Automaton datatypeToAutomaton(String lib,
                                     String type,
                                     List<Param> params)
Description copied from interface: DatatypeLibrary
Converter from datatype to automaton. The automaton accepts the set of strings that are valid according to the datatype.

Specified by:
datatypeToAutomaton in interface DatatypeLibrary
Parameters:
lib - datatype library URI
type - datatype
params - parameters
Returns:
automaton, or null if library URI or datatype is not recognized

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)
Description copied from interface: DatatypeLibrary
Converter from value to automaton. The automaton accepts the set of strings that are equal to the value.

Specified by:
valueToAutomaton in interface DatatypeLibrary
Parameters:
lib - datatype library URI
type - datatype
ns - namespace
value - value
Returns:
automaton, or null if library URI or datatype is not recognized


Copyright © 2005-2010 Anders Møller.