public class DSchemaBuilderImpl extends Object implements SchemaBuilder<NameClass,DPattern,org.kohsuke.rngom.digested.ElementWrapper,LocatorImpl,org.kohsuke.rngom.digested.Annotation,org.kohsuke.rngom.digested.CommentListImpl>
| Constructor and Description |
|---|
DSchemaBuilderImpl() |
public NameClassBuilder getNameClassBuilder() throws BuildException
SchemaBuilderNameClassBuilder, which is used to build name
classes for this SchemaBuilder. The
NameClasses that are built will then be
fed into this SchemaBuilderto further build RELAX NG patterns.getNameClassBuilder in interface SchemaBuilder<NameClass,DPattern,org.kohsuke.rngom.digested.ElementWrapper,LocatorImpl,org.kohsuke.rngom.digested.Annotation,org.kohsuke.rngom.digested.CommentListImpl>BuildExceptionpublic DPattern makeChoice(List<DPattern> patterns, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DPattern makeInterleave(List<DPattern> patterns, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DPattern makeGroup(List<DPattern> patterns, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DPattern makeOneOrMore(DPattern p, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DPattern makeZeroOrMore(DPattern p, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DPattern makeOptional(DPattern p, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DPattern makeList(DPattern p, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DPattern makeMixed(DPattern p, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DPattern makeEmpty(LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno)
public DPattern makeNotAllowed(LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno)
public DPattern makeText(LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno)
public DPattern makeAttribute(NameClass nc, DPattern p, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DPattern makeElement(NameClass nc, DPattern p, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, LocatorImpl loc) throws BuildException
public DPattern makeValue(String datatypeLibrary, String type, String value, Context c, String ns, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
public Grammar makeGrammar(Scope parent)
makeGrammar in interface SchemaBuilder<NameClass,DPattern,org.kohsuke.rngom.digested.ElementWrapper,LocatorImpl,org.kohsuke.rngom.digested.Annotation,org.kohsuke.rngom.digested.CommentListImpl>parent - The parent scope. null if there's no parent scope.
For example, if the complete document looks like the following:
<grammar>
<start><element name="root"><empty/></element></start>
</grammar>
Then when the outer-most Grammar is created, it will
receive the null parent.public DPattern annotate(DPattern p, org.kohsuke.rngom.digested.Annotation anno) throws BuildException
SchemaBuilder
<element name="foo"> <!-- this becomes 'P' -->
<foreign:annotation /> <!-- this becomes 'A' -->
...
</element>
public DPattern annotateAfter(DPattern p, org.kohsuke.rngom.digested.ElementWrapper e) throws BuildException
SchemaBuilder
<element name="foo">
<empty /> <!-- this becomes 'P' -->
<foreign:annotation /> <!-- this becomes 'E' -->
</element>
public DPattern commentAfter(DPattern p, org.kohsuke.rngom.digested.CommentListImpl comments) throws BuildException
public DPattern makeExternalRef(Parseable current, String uri, String ns, Scope<DPattern,org.kohsuke.rngom.digested.ElementWrapper,LocatorImpl,org.kohsuke.rngom.digested.Annotation,org.kohsuke.rngom.digested.CommentListImpl> scope, LocatorImpl loc, org.kohsuke.rngom.digested.Annotation anno) throws BuildException, IllegalSchemaException
makeExternalRef in interface SchemaBuilder<NameClass,DPattern,org.kohsuke.rngom.digested.ElementWrapper,LocatorImpl,org.kohsuke.rngom.digested.Annotation,org.kohsuke.rngom.digested.CommentListImpl>current - Current grammar that we are parsing. This is what contains
externalRef.scope - The parent scope. null if there's no parent scope.
See SchemaBuilder.makeGrammar(Scope) for more details about
when this parameter can be null.BuildExceptionIllegalSchemaExceptionpublic LocatorImpl makeLocation(String systemId, int lineNumber, int columnNumber)
public org.kohsuke.rngom.digested.Annotation makeAnnotations(org.kohsuke.rngom.digested.CommentListImpl comments, Context context)
SchemaBuilderAnnotations object to parse annotations on patterns.makeAnnotations in interface SchemaBuilder<NameClass,DPattern,org.kohsuke.rngom.digested.ElementWrapper,LocatorImpl,org.kohsuke.rngom.digested.Annotation,org.kohsuke.rngom.digested.CommentListImpl>public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix, LocatorImpl loc, org.kohsuke.rngom.digested.CommentListImpl comments, Context context)
public org.kohsuke.rngom.digested.CommentListImpl makeCommentList()
public DPattern makeErrorPattern()
public boolean usesComments()
SchemaBuilderSchemaBuilderis interested in actually parsing
comments, this method returns true.
Returning false allows the schema parser to speed up the processing by skiping comment-related handlings.
public DPattern expandPattern(DPattern p) throws BuildException, IllegalSchemaException
SchemaBuilder
This hook typically allows as SchemaBuilder to expand
notAllowed (if it's following the simplification as in the spec.)
Copyright © 2005–2017 Oracle Corporation. All rights reserved.