org.kohsuke.rngom.ast.builder
インタフェース SchemaBuilder

既知のサブインタフェースの一覧:
NodeAwareSchemaBuilder
既知の実装クラスの一覧:
NodeAwareSchemaBuilderImpl, SchemaBuilderHost, SchemaBuilderImpl

public interface SchemaBuilder


メソッドの概要
 ParsedPattern annotate(ParsedPattern p, Annotations anno)
           
 ParsedPattern annotateAfter(ParsedPattern p, ParsedElementAnnotation e)
           
 ParsedPattern commentAfter(ParsedPattern p, CommentList comments)
           
 ParsedPattern expandPattern(ParsedPattern p)
          Called after all the parsing is done.
 NameClassBuilder getNameClassBuilder()
          Returns the NameClassBuilder, which is used to build name classes for this SchemaBuilder.
 Annotations makeAnnotations(CommentList comments, Context context)
           
 ParsedPattern makeAttribute(ParsedNameClass nc, ParsedPattern p, 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)
           
 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)
           
 ParsedPattern makeErrorPattern()
           
 ParsedPattern makeExternalRef(Parseable current, 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)
           
 ParsedPattern makeNotAllowed(Location loc, Annotations anno)
           
 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 c, java.lang.String ns, Location loc, Annotations anno)
           
 ParsedPattern makeZeroOrMore(ParsedPattern p, Location loc, Annotations anno)
           
 boolean usesComments()
          If this SchemaBuilderis interested in actually parsing comments, this method returns true.
 

メソッドの詳細

getNameClassBuilder

public NameClassBuilder getNameClassBuilder()
                                     throws BuildException
Returns the NameClassBuilder, 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.

戻り値:
always return a non-null valid object. This method can (and probably should) always return the same object.
例外:
BuildException

makeChoice

public ParsedPattern makeChoice(ParsedPattern[] patterns,
                                int nPatterns,
                                Location loc,
                                Annotations anno)
                         throws BuildException
例外:
BuildException

makeInterleave

public ParsedPattern makeInterleave(ParsedPattern[] patterns,
                                    int nPatterns,
                                    Location loc,
                                    Annotations anno)
                             throws BuildException
例外:
BuildException

makeGroup

public ParsedPattern makeGroup(ParsedPattern[] patterns,
                               int nPatterns,
                               Location loc,
                               Annotations anno)
                        throws BuildException
例外:
BuildException

makeOneOrMore

public ParsedPattern makeOneOrMore(ParsedPattern p,
                                   Location loc,
                                   Annotations anno)
                            throws BuildException
例外:
BuildException

makeZeroOrMore

public ParsedPattern makeZeroOrMore(ParsedPattern p,
                                    Location loc,
                                    Annotations anno)
                             throws BuildException
例外:
BuildException

makeOptional

public ParsedPattern makeOptional(ParsedPattern p,
                                  Location loc,
                                  Annotations anno)
                           throws BuildException
例外:
BuildException

makeList

public ParsedPattern makeList(ParsedPattern p,
                              Location loc,
                              Annotations anno)
                       throws BuildException
例外:
BuildException

makeMixed

public ParsedPattern makeMixed(ParsedPattern p,
                               Location loc,
                               Annotations anno)
                        throws BuildException
例外:
BuildException

makeEmpty

public ParsedPattern makeEmpty(Location loc,
                               Annotations anno)

makeNotAllowed

public ParsedPattern makeNotAllowed(Location loc,
                                    Annotations anno)

makeText

public ParsedPattern makeText(Location loc,
                              Annotations anno)

makeAttribute

public ParsedPattern makeAttribute(ParsedNameClass nc,
                                   ParsedPattern p,
                                   Location loc,
                                   Annotations anno)
                            throws BuildException
例外:
BuildException

makeElement

public ParsedPattern makeElement(ParsedNameClass nc,
                                 ParsedPattern p,
                                 Location loc,
                                 Annotations anno)
                          throws BuildException
例外:
BuildException

makeDataPatternBuilder

public DataPatternBuilder makeDataPatternBuilder(java.lang.String datatypeLibrary,
                                                 java.lang.String type,
                                                 Location loc)
                                          throws BuildException
例外:
BuildException

makeValue

public ParsedPattern makeValue(java.lang.String datatypeLibrary,
                               java.lang.String type,
                               java.lang.String value,
                               Context c,
                               java.lang.String ns,
                               Location loc,
                               Annotations anno)
                        throws BuildException
例外:
BuildException

makeGrammar

public Grammar makeGrammar(Scope parent)
パラメータ:
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.

annotate

public ParsedPattern annotate(ParsedPattern p,
                              Annotations anno)
                       throws BuildException
例外:
BuildException

annotateAfter

public ParsedPattern annotateAfter(ParsedPattern p,
                                   ParsedElementAnnotation e)
                            throws BuildException
例外:
BuildException

commentAfter

public ParsedPattern commentAfter(ParsedPattern p,
                                  CommentList comments)
                           throws BuildException
例外:
BuildException

makeExternalRef

public ParsedPattern makeExternalRef(Parseable current,
                                     java.lang.String uri,
                                     java.lang.String ns,
                                     Scope scope,
                                     Location loc,
                                     Annotations anno)
                              throws BuildException,
                                     IllegalSchemaException
パラメータ:
current - Current grammar that we are parsing. This is what contains externalRef.
scope - The parent scope. null if there's no parent scope. See makeGrammar(Scope) for more details about when this parameter can be null.
例外:
BuildException
IllegalSchemaException

makeLocation

public Location makeLocation(java.lang.String systemId,
                             int lineNumber,
                             int columnNumber)

makeAnnotations

public Annotations makeAnnotations(CommentList comments,
                                   Context context)

makeElementAnnotationBuilder

public ElementAnnotationBuilder makeElementAnnotationBuilder(java.lang.String ns,
                                                             java.lang.String localName,
                                                             java.lang.String prefix,
                                                             Location loc,
                                                             CommentList comments,
                                                             Context context)

makeCommentList

public CommentList makeCommentList()

makeErrorPattern

public ParsedPattern makeErrorPattern()

usesComments

public boolean usesComments()
If this SchemaBuilderis 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.


expandPattern

public ParsedPattern expandPattern(ParsedPattern p)
                            throws BuildException,
                                   IllegalSchemaException
Called after all the parsing is done.

This hook typically allows as SchemaBuilder to expand notAllowed (if it's following the simplification as in the spec.)

例外:
BuildException
IllegalSchemaException