dk.brics.relaxng.converter
Interface DatatypeLibrary

All Known Implementing Classes:
BuiltInDatatypes, StandardDatatypes, XMLSchemaDatatypes

public interface DatatypeLibrary

Interface for converters from datatypes to automata.


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.
 

Method Detail

datatypeToAutomaton

Automaton datatypeToAutomaton(String lib,
                              String type,
                              List<Param> params)
                              throws ConverterException
Converter from datatype to automaton. The automaton accepts the set of strings that are valid according to the datatype.

Parameters:
lib - datatype library URI
type - datatype
params - parameters
Returns:
automaton, or null if library URI or datatype is not recognized
Throws:
ConverterException - if unable to convert

isKnown

boolean isKnown(String lib,
                String type)
Checks whether this library knows the given datatype.

Parameters:
lib - library
type - datatype
Returns:
true if the datatype is known by this library

valueToAutomaton

Automaton valueToAutomaton(String lib,
                           String type,
                           String ns,
                           String value)
                           throws ConverterException
Converter from value to automaton. The automaton accepts the set of strings that are equal to the value.

Parameters:
lib - datatype library URI
type - datatype
ns - namespace
value - value
Returns:
automaton, or null if library URI or datatype is not recognized
Throws:
ConverterException - if unable to convert


Copyright © 2005-2010 Anders Møller.