org.relaxng.datatype
Interface DataTypeLibrary


public interface DataTypeLibrary

one datatype library

Author:
Kohsuke KAWAGUCHI

Method Summary
 DataTypeBuilder createDataTypeBuilder(java.lang.String baseTypeLocalName)
          creates a new type builder instance.
 DataType getType(java.lang.String localTypeName)
          gets a pre-defined type.
 

Method Detail

createDataTypeBuilder

public DataTypeBuilder createDataTypeBuilder(java.lang.String baseTypeLocalName)
                                      throws DataTypeException
creates a new type builder instance. 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 - local name of the base type.
Returns:
null The callee can return null if baseTypeLocalName is an undefined name.

getType

public DataType getType(java.lang.String localTypeName)
                 throws DataTypeException
gets a pre-defined type. This is just a short-cut of createTypeIncubator(name).derive(); 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.