01: package org.relaxng.datatype;
02:
03: /**
04: * A Datatype library
05: *
06: * @author <a href="mailto:jjc@jclark.com">James Clark</a>
07: * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
08: */
09: public interface DatatypeLibrary {
10:
11: /**
12: * Creates a new instance of DatatypeBuilder.
13: *
14: * The callee should throw a DatatypeException in case of an error.
15: *
16: * @param baseTypeLocalName
17: * The local name of the base type.
18: *
19: * @return
20: * A non-null valid datatype object.
21: */
22: DatatypeBuilder createDatatypeBuilder(String baseTypeLocalName)
23: throws DatatypeException;
24:
25: /**
26: * Gets or creates a pre-defined type.
27: *
28: * This is just a short-cut of
29: * <code>createDatatypeBuilder(typeLocalName).createDatatype();</code>
30: *
31: * The callee should throw a DatatypeException in case of an error.
32: *
33: * @return
34: * A non-null valid datatype object.
35: */
36: Datatype createDatatype(String typeLocalName)
37: throws DatatypeException;
38: }
|