org.relaxng.datatype
Interface DatatypeLibrary


public interface DatatypeLibrary

A Datatype library

Author:
Kohsuke KAWAGUCHI

Method Summary
 Datatype createDatatype(java.lang.String localTypeName)
          gets or creates a pre-defined type.
 DatatypeBuilder createDatatypeBuilder(java.lang.String baseTypeLocalName)
          creates a new instance of DatatypeBuilder.
 

Method Detail

createDatatypeBuilder

public DatatypeBuilder createDatatypeBuilder(java.lang.String baseTypeLocalName)
                                      throws DatatypeException
creates a new instance of DatatypeBuilder. The callee should throw a DatatypeException in case of an error. If an error is because of the undefined baseTypeLocalName, then it can return null instead of throwing an exception.
Parameters:
baseTypeLocalName - The local name of the base type.
Returns:
null The callee can return null if baseTypeLocalName is an undefined name.

createDatatype

public Datatype createDatatype(java.lang.String localTypeName)
                        throws DatatypeException
gets or creates a pre-defined type. This is just a short-cut of createDatatypeBuilder(name).createDatatype(); The callee should throw a DatatypeException in case of an error. If the error is because of the undefined baseTypeLocalName, then it can return null instead of throwing an exception.
Returns:
null The callee can return null if localTypeName is an undefined name.