| 1 |
package com.thaiopensource.relaxng.parse; |
| 2 |
|
| 3 |
import java.util.List; |
| 4 |
|
| 5 |
public interface SchemaBuilder<P, NC, L, EA, CL extends CommentList<L>, A extends Annotations<L, EA, CL>> { |
| 6 |
P makeChoice(List<P> patterns, L loc, A anno) throws BuildException; |
| 7 |
P makeInterleave(List<P> patterns, L loc, A anno) throws BuildException; |
| 8 |
P makeGroup(List<P> patterns, L loc, A anno) throws BuildException; |
| 9 |
P makeOneOrMore(P p, L loc, A anno) throws BuildException; |
| 10 |
P makeZeroOrMore(P p, L loc, A anno) throws BuildException; |
| 11 |
P makeOptional(P p, L loc, A anno) throws BuildException; |
| 12 |
P makeList(P p, L loc, A anno) throws BuildException; |
| 13 |
P makeMixed(P p, L loc, A anno) throws BuildException; |
| 14 |
P makeEmpty(L loc, A anno); |
| 15 |
P makeNotAllowed(L loc, A anno); |
| 16 |
P makeText(L loc, A anno); |
| 17 |
P makeAttribute(NC nc, P p, L loc, A anno) throws BuildException; |
| 18 |
P makeElement(NC nc, P p, L loc, A anno) throws BuildException; |
| 19 |
DataPatternBuilder<P, L, EA, CL, A> makeDataPatternBuilder(String datatypeLibrary, String type, L loc) throws BuildException; |
| 20 |
P makeValue(String datatypeLibrary, String type, String value, Context c, String ns, |
| 21 |
L loc, A anno) throws BuildException; |
| 22 |
Grammar<P, L, EA, CL, A> makeGrammar(Scope<P, L, EA, CL, A> parent); |
| 23 |
P annotatePattern(P p, A anno) throws BuildException; |
| 24 |
NC annotateNameClass(NC nc, A anno) throws BuildException; |
| 25 |
P annotateAfterPattern(P p, EA e) throws BuildException; |
| 26 |
NC annotateAfterNameClass(NC nc, EA e) throws BuildException; |
| 27 |
P commentAfterPattern(P p, CL comments) throws BuildException; |
| 28 |
NC commentAfterNameClass(NC nc, CL comments) throws BuildException; |
| 29 |
P makeExternalRef(String href, String base, String ns, Scope<P, L, EA, CL, A> scope, |
| 30 |
L loc, A anno) throws BuildException, IllegalSchemaException; |
| 31 |
NC makeNameClassChoice(List<NC> nameClasses, L loc, A anno); |
| 32 |
|
| 33 |
// Compare against INHERIT_NS with == not equals. |
| 34 |
// Doing new String() ensures it is not == if the user specifies #inherit explicitly in the schema. |
| 35 |
static final String INHERIT_NS = new String("#inherit"); |
| 36 |
NC makeName(String ns, String localName, String prefix, L loc, A anno); |
| 37 |
NC makeNsName(String ns, L loc, A anno); |
| 38 |
/* |
| 39 |
* Caller must enforce constraints on except. |
| 40 |
*/ |
| 41 |
NC makeNsName(String ns, NC except, L loc, A anno); |
| 42 |
NC makeAnyName(L loc, A anno); |
| 43 |
/* |
| 44 |
* Caller must enforce constraints on except. |
| 45 |
*/ |
| 46 |
NC makeAnyName(NC except, L loc, A anno); |
| 47 |
L makeLocation(String systemId, int lineNumber, int columnNumber); |
| 48 |
A makeAnnotations(CL comments, Context context); |
| 49 |
ElementAnnotationBuilder<L, EA, CL> makeElementAnnotationBuilder(String ns, String localName, String prefix, |
| 50 |
L loc, CL comments, Context context); |
| 51 |
CL makeCommentList(); |
| 52 |
P makeErrorPattern(); |
| 53 |
NC makeErrorNameClass(); |
| 54 |
boolean usesComments(); |
| 55 |
} |