com.thaiopensource.relaxng.impl
Class SchemaBuilderImpl
java.lang.Object
com.thaiopensource.relaxng.impl.SchemaBuilderImpl
- All Implemented Interfaces:
- Annotations, CommentList, ElementAnnotationBuilder, SchemaBuilder
public class SchemaBuilderImpl
- extends java.lang.Object
- implements SchemaBuilder, ElementAnnotationBuilder, CommentList
Method Summary |
void |
addAttribute(java.lang.String ns,
java.lang.String localName,
java.lang.String prefix,
java.lang.String value,
Location loc)
|
void |
addComment(CommentList comments)
Adds comments following the last initial child element annotation. |
void |
addComment(java.lang.String value,
Location loc)
|
void |
addElement(ParsedElementAnnotation ea)
|
void |
addLeadingComment(CommentList comments)
|
void |
addText(java.lang.String value,
Location loc,
CommentList comments)
|
ParsedNameClass |
annotate(ParsedNameClass nc,
Annotations anno)
|
ParsedPattern |
annotate(ParsedPattern p,
Annotations anno)
|
ParsedNameClass |
annotateAfter(ParsedNameClass nc,
ParsedElementAnnotation e)
|
ParsedPattern |
annotateAfter(ParsedPattern p,
ParsedElementAnnotation e)
|
ParsedNameClass |
commentAfter(ParsedNameClass nc,
CommentList comments)
|
ParsedPattern |
commentAfter(ParsedPattern p,
CommentList comments)
|
static PatternFuture |
installHandlers(ParseReceiver parser,
org.xml.sax.XMLReader xr,
org.xml.sax.ErrorHandler eh,
DatatypeLibraryFactory dlf,
SchemaPatternBuilder pb)
|
Annotations |
makeAnnotations(CommentList comments,
Context context)
|
ParsedNameClass |
makeAnyName(Location loc,
Annotations anno)
|
ParsedNameClass |
makeAnyName(ParsedNameClass except,
Location loc,
Annotations anno)
Caller must enforce constraints on except. |
ParsedPattern |
makeAttribute(ParsedNameClass nc,
ParsedPattern p,
Location loc,
Annotations anno)
|
ParsedNameClass |
makeChoice(ParsedNameClass[] nameClasses,
int nNameClasses,
Location loc,
Annotations anno)
|
ParsedPattern |
makeChoice(ParsedPattern[] patterns,
int nPatterns,
Location loc,
Annotations anno)
|
CommentList |
makeCommentList()
|
DataPatternBuilder |
makeDataPatternBuilder(java.lang.String datatypeLibrary,
java.lang.String type,
Location loc)
|
ParsedPattern |
makeElement(ParsedNameClass nc,
ParsedPattern p,
Location loc,
Annotations anno)
|
ParsedElementAnnotation |
makeElementAnnotation()
|
ElementAnnotationBuilder |
makeElementAnnotationBuilder(java.lang.String ns,
java.lang.String localName,
java.lang.String prefix,
Location loc,
CommentList comments,
Context context)
|
ParsedPattern |
makeEmpty(Location loc,
Annotations anno)
|
ParsedNameClass |
makeErrorNameClass()
|
ParsedPattern |
makeErrorPattern()
|
ParsedPattern |
makeExternalRef(java.lang.String uri,
java.lang.String ns,
Scope scope,
Location loc,
Annotations anno)
|
Grammar |
makeGrammar(Scope parent)
|
ParsedPattern |
makeGroup(ParsedPattern[] patterns,
int nPatterns,
Location loc,
Annotations anno)
|
ParsedPattern |
makeInterleave(ParsedPattern[] patterns,
int nPatterns,
Location loc,
Annotations anno)
|
ParsedPattern |
makeList(ParsedPattern p,
Location loc,
Annotations anno)
|
Location |
makeLocation(java.lang.String systemId,
int lineNumber,
int columnNumber)
|
ParsedPattern |
makeMixed(ParsedPattern p,
Location loc,
Annotations anno)
|
ParsedNameClass |
makeName(java.lang.String ns,
java.lang.String localName,
java.lang.String prefix,
Location loc,
Annotations anno)
|
ParsedPattern |
makeNotAllowed(Location loc,
Annotations anno)
|
ParsedNameClass |
makeNsName(java.lang.String ns,
Location loc,
Annotations anno)
|
ParsedNameClass |
makeNsName(java.lang.String ns,
ParsedNameClass except,
Location loc,
Annotations anno)
Caller must enforce constraints on except. |
ParsedPattern |
makeOneOrMore(ParsedPattern p,
Location loc,
Annotations anno)
|
ParsedPattern |
makeOptional(ParsedPattern p,
Location loc,
Annotations anno)
|
ParsedPattern |
makeText(Location loc,
Annotations anno)
|
ParsedPattern |
makeValue(java.lang.String datatypeLibrary,
java.lang.String type,
java.lang.String value,
Context context,
java.lang.String ns,
Location loc,
Annotations anno)
|
ParsedPattern |
makeZeroOrMore(ParsedPattern p,
Location loc,
Annotations anno)
|
static Pattern |
parse(Parseable parseable,
org.xml.sax.ErrorHandler eh,
DatatypeLibraryFactory datatypeLibraryFactory,
SchemaPatternBuilder pb,
boolean isAttributesPattern)
|
boolean |
usesComments()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parse
public static Pattern parse(Parseable parseable,
org.xml.sax.ErrorHandler eh,
DatatypeLibraryFactory datatypeLibraryFactory,
SchemaPatternBuilder pb,
boolean isAttributesPattern)
throws IllegalSchemaException,
java.io.IOException,
org.xml.sax.SAXException
- Throws:
IllegalSchemaException
java.io.IOException
org.xml.sax.SAXException
installHandlers
public static PatternFuture installHandlers(ParseReceiver parser,
org.xml.sax.XMLReader xr,
org.xml.sax.ErrorHandler eh,
DatatypeLibraryFactory dlf,
SchemaPatternBuilder pb)
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
makeChoice
public ParsedPattern makeChoice(ParsedPattern[] patterns,
int nPatterns,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeChoice
in interface SchemaBuilder
- Throws:
BuildException
makeInterleave
public ParsedPattern makeInterleave(ParsedPattern[] patterns,
int nPatterns,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeInterleave
in interface SchemaBuilder
- Throws:
BuildException
makeGroup
public ParsedPattern makeGroup(ParsedPattern[] patterns,
int nPatterns,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeGroup
in interface SchemaBuilder
- Throws:
BuildException
makeOneOrMore
public ParsedPattern makeOneOrMore(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeOneOrMore
in interface SchemaBuilder
- Throws:
BuildException
makeZeroOrMore
public ParsedPattern makeZeroOrMore(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeZeroOrMore
in interface SchemaBuilder
- Throws:
BuildException
makeOptional
public ParsedPattern makeOptional(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeOptional
in interface SchemaBuilder
- Throws:
BuildException
makeList
public ParsedPattern makeList(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeList
in interface SchemaBuilder
- Throws:
BuildException
makeMixed
public ParsedPattern makeMixed(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeMixed
in interface SchemaBuilder
- Throws:
BuildException
makeEmpty
public ParsedPattern makeEmpty(Location loc,
Annotations anno)
- Specified by:
makeEmpty
in interface SchemaBuilder
makeNotAllowed
public ParsedPattern makeNotAllowed(Location loc,
Annotations anno)
- Specified by:
makeNotAllowed
in interface SchemaBuilder
makeText
public ParsedPattern makeText(Location loc,
Annotations anno)
- Specified by:
makeText
in interface SchemaBuilder
makeErrorPattern
public ParsedPattern makeErrorPattern()
- Specified by:
makeErrorPattern
in interface SchemaBuilder
makeErrorNameClass
public ParsedNameClass makeErrorNameClass()
- Specified by:
makeErrorNameClass
in interface SchemaBuilder
makeAttribute
public ParsedPattern makeAttribute(ParsedNameClass nc,
ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeAttribute
in interface SchemaBuilder
- Throws:
BuildException
makeElement
public ParsedPattern makeElement(ParsedNameClass nc,
ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeElement
in interface SchemaBuilder
- Throws:
BuildException
makeDataPatternBuilder
public DataPatternBuilder makeDataPatternBuilder(java.lang.String datatypeLibrary,
java.lang.String type,
Location loc)
throws BuildException
- Specified by:
makeDataPatternBuilder
in interface SchemaBuilder
- Throws:
BuildException
makeValue
public ParsedPattern makeValue(java.lang.String datatypeLibrary,
java.lang.String type,
java.lang.String value,
Context context,
java.lang.String ns,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeValue
in interface SchemaBuilder
- Throws:
BuildException
makeGrammar
public Grammar makeGrammar(Scope parent)
- Specified by:
makeGrammar
in interface SchemaBuilder
annotate
public ParsedPattern annotate(ParsedPattern p,
Annotations anno)
throws BuildException
- Specified by:
annotate
in interface SchemaBuilder
- Throws:
BuildException
annotate
public ParsedNameClass annotate(ParsedNameClass nc,
Annotations anno)
throws BuildException
- Specified by:
annotate
in interface SchemaBuilder
- Throws:
BuildException
annotateAfter
public ParsedPattern annotateAfter(ParsedPattern p,
ParsedElementAnnotation e)
throws BuildException
- Specified by:
annotateAfter
in interface SchemaBuilder
- Throws:
BuildException
annotateAfter
public ParsedNameClass annotateAfter(ParsedNameClass nc,
ParsedElementAnnotation e)
throws BuildException
- Specified by:
annotateAfter
in interface SchemaBuilder
- Throws:
BuildException
commentAfter
public ParsedPattern commentAfter(ParsedPattern p,
CommentList comments)
throws BuildException
- Specified by:
commentAfter
in interface SchemaBuilder
- Throws:
BuildException
commentAfter
public ParsedNameClass commentAfter(ParsedNameClass nc,
CommentList comments)
throws BuildException
- Specified by:
commentAfter
in interface SchemaBuilder
- Throws:
BuildException
makeExternalRef
public ParsedPattern makeExternalRef(java.lang.String uri,
java.lang.String ns,
Scope scope,
Location loc,
Annotations anno)
throws BuildException
- Specified by:
makeExternalRef
in interface SchemaBuilder
- Throws:
BuildException
makeChoice
public ParsedNameClass makeChoice(ParsedNameClass[] nameClasses,
int nNameClasses,
Location loc,
Annotations anno)
- Specified by:
makeChoice
in interface SchemaBuilder
makeName
public ParsedNameClass makeName(java.lang.String ns,
java.lang.String localName,
java.lang.String prefix,
Location loc,
Annotations anno)
- Specified by:
makeName
in interface SchemaBuilder
makeNsName
public ParsedNameClass makeNsName(java.lang.String ns,
Location loc,
Annotations anno)
- Specified by:
makeNsName
in interface SchemaBuilder
makeNsName
public ParsedNameClass makeNsName(java.lang.String ns,
ParsedNameClass except,
Location loc,
Annotations anno)
- Description copied from interface:
SchemaBuilder
- Caller must enforce constraints on except.
- Specified by:
makeNsName
in interface SchemaBuilder
makeAnyName
public ParsedNameClass makeAnyName(Location loc,
Annotations anno)
- Specified by:
makeAnyName
in interface SchemaBuilder
makeAnyName
public ParsedNameClass makeAnyName(ParsedNameClass except,
Location loc,
Annotations anno)
- Description copied from interface:
SchemaBuilder
- Caller must enforce constraints on except.
- Specified by:
makeAnyName
in interface SchemaBuilder
makeLocation
public Location makeLocation(java.lang.String systemId,
int lineNumber,
int columnNumber)
- Specified by:
makeLocation
in interface SchemaBuilder
makeAnnotations
public Annotations makeAnnotations(CommentList comments,
Context context)
- Specified by:
makeAnnotations
in interface SchemaBuilder
makeElementAnnotationBuilder
public ElementAnnotationBuilder makeElementAnnotationBuilder(java.lang.String ns,
java.lang.String localName,
java.lang.String prefix,
Location loc,
CommentList comments,
Context context)
- Specified by:
makeElementAnnotationBuilder
in interface SchemaBuilder
makeCommentList
public CommentList makeCommentList()
- Specified by:
makeCommentList
in interface SchemaBuilder
addComment
public void addComment(java.lang.String value,
Location loc)
throws BuildException
- Specified by:
addComment
in interface CommentList
- Throws:
BuildException
addAttribute
public void addAttribute(java.lang.String ns,
java.lang.String localName,
java.lang.String prefix,
java.lang.String value,
Location loc)
- Specified by:
addAttribute
in interface Annotations
addElement
public void addElement(ParsedElementAnnotation ea)
- Specified by:
addElement
in interface Annotations
addComment
public void addComment(CommentList comments)
throws BuildException
- Description copied from interface:
Annotations
- Adds comments following the last initial child element annotation.
- Specified by:
addComment
in interface Annotations
- Throws:
BuildException
addLeadingComment
public void addLeadingComment(CommentList comments)
throws BuildException
- Specified by:
addLeadingComment
in interface Annotations
- Throws:
BuildException
addText
public void addText(java.lang.String value,
Location loc,
CommentList comments)
- Specified by:
addText
in interface ElementAnnotationBuilder
makeElementAnnotation
public ParsedElementAnnotation makeElementAnnotation()
- Specified by:
makeElementAnnotation
in interface ElementAnnotationBuilder
usesComments
public boolean usesComments()
- Specified by:
usesComments
in interface SchemaBuilder