Top Fields Constructors Methods
com.sun.tools.rngom.parse.host

public Class SchemaBuilderHost

extends Base
implements SchemaBuilder
Class Inheritance
All Implemented Interfaces
com.sun.tools.rngom.ast.builder.SchemaBuilder
Known Direct Subclasses
com.sun.tools.rngom.ast.util.CheckingSchemaBuilder
Imports
com.sun.tools.rngom.ast.om.ParsedElementAnnotation, .Location, .ParsedNameClass, .ParsedPattern, com.sun.tools.rngom.ast.builder.Annotations, .BuildException, .CommentList, .DataPatternBuilder, .ElementAnnotationBuilder, .Grammar, .NameClassBuilder, .SchemaBuilder, .Scope, com.sun.tools.rngom.parse.Context, .IllegalSchemaException, .Parseable, java.util.List, .ArrayList

Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
pack-priv final SchemaBuilder<N extends ParsedNameClass, P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
pack-priv final SchemaBuilder<N extends ParsedNameClass, P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>

Constructor Summary

AccessConstructor and Description
public
SchemaBuilderHost(SchemaBuilder<N extends ParsedNameClass, P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> lhs, SchemaBuilder<N extends ParsedNameClass, P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> rhs)

Method Summary

Modifier and TypeMethod and Description
public ParsedPattern
annotate(ParsedPattern _p, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.annotate.

Called when annotation is found right inside a pattern such as,

<element name="foo">     <!-- this becomes 'P' -->
  <foreign:annotation /> <!-- this becomes 'A' -->
  ...
public ParsedPattern
annotateAfter(ParsedPattern _p, ParsedElementAnnotation _e)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.annotateAfter.

Called when element annotation is found after a pattern.

public ParsedPattern
public ParsedPattern
public NameClassBuilder<N extends ParsedNameClass, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
getNameClassBuilder()

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.getNameClassBuilder.

Returns the NameClassBuilder, which is used to build name classes for this .

public Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>>
makeAnnotations(CommentList<L extends Location> _comments, Context context)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeAnnotations.

Creates Annotations object to parse annotations on patterns.

public ParsedPattern
public ParsedPattern
public CommentList<L extends Location>
public DataPatternBuilder<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
public ParsedPattern
public ElementAnnotationBuilder<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
public ParsedPattern
public ParsedPattern
public ParsedPattern
makeExternalRef(Parseable current, String uri, String ns, Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> _scope, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeExternalRef.

public Grammar<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
makeGrammar(Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> _parent)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeGrammar.

public ParsedPattern
public ParsedPattern
public ParsedPattern
public Location
makeLocation(String systemId, int lineNumber, int columnNumber)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeLocation.

public ParsedPattern
public ParsedPattern
public ParsedPattern
public ParsedPattern
public ParsedPattern
public ParsedPattern
makeValue(String datatypeLibrary, String type, String value, Context c, String ns, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeValue.

public ParsedPattern
public boolean
usesComments()

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.usesComments.

If this is interested in actually parsing comments, this method returns true.

Inherited from com.sun.tools.rngom.parse.host.Base:
castcast

Field Detail

lhsback to summary
pack-priv final SchemaBuilder<N extends ParsedNameClass, P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> lhs
rhsback to summary
pack-priv final SchemaBuilder<N extends ParsedNameClass, P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> rhs

Constructor Detail

SchemaBuilderHostback to summary
public SchemaBuilderHost(SchemaBuilder<N extends ParsedNameClass, P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> lhs, SchemaBuilder<N extends ParsedNameClass, P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> rhs)

Method Detail

annotateback to summary
public ParsedPattern annotate(ParsedPattern _p, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.annotate.

Doc from com.sun.tools.rngom.ast.builder.SchemaBuilder.annotate.

Called when annotation is found right inside a pattern such as,

<element name="foo">     <!-- this becomes 'P' -->
  <foreign:annotation /> <!-- this becomes 'A' -->
  ...
</element>
annotateAfterback to summary
public ParsedPattern annotateAfter(ParsedPattern _p, ParsedElementAnnotation _e) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.annotateAfter.

Doc from com.sun.tools.rngom.ast.builder.SchemaBuilder.annotateAfter.

Called when element annotation is found after a pattern. such as,

<element name="foo">
  <empty />              <!-- this becomes 'P' -->
  <foreign:annotation /> <!-- this becomes 'E' -->
</element>
commentAfterback to summary
public ParsedPattern commentAfter(ParsedPattern _p, CommentList<L extends Location> _comments) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.commentAfter.

expandPatternback to summary
public ParsedPattern expandPattern(ParsedPattern _p) throws BuildException, IllegalSchemaException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.expandPattern.

Doc from com.sun.tools.rngom.ast.builder.SchemaBuilder.expandPattern.

Called after all the parsing is done.

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

getNameClassBuilderback to summary
public NameClassBuilder<N extends ParsedNameClass, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> getNameClassBuilder() throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.getNameClassBuilder.

Doc from com.sun.tools.rngom.ast.builder.SchemaBuilder.getNameClassBuilder.

Returns the NameClassBuilder, which is used to build name classes for this . The NameClasses that are built will then be fed into this to further build RELAX NG patterns.

makeAnnotationsback to summary
public Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> makeAnnotations(CommentList<L extends Location> _comments, Context context)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeAnnotations.

Doc from com.sun.tools.rngom.ast.builder.SchemaBuilder.makeAnnotations.

Creates Annotations object to parse annotations on patterns.

makeAttributeback to summary
public ParsedPattern makeAttribute(ParsedNameClass _nc, ParsedPattern _p, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeAttribute.

makeChoiceback to summary
public ParsedPattern makeChoice(List<E> patterns, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeChoice.

makeCommentListback to summary
public CommentList<L extends Location> makeCommentList()

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeCommentList.

makeDataPatternBuilderback to summary
public DataPatternBuilder<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> makeDataPatternBuilder(String datatypeLibrary, String type, Location _loc) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeDataPatternBuilder.

makeElementback to summary
public ParsedPattern makeElement(ParsedNameClass _nc, ParsedPattern _p, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeElement.

makeElementAnnotationBuilderback to summary
public ElementAnnotationBuilder<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> makeElementAnnotationBuilder(String ns, String localName, String prefix, Location _loc, CommentList<L extends Location> _comments, Context context)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeElementAnnotationBuilder.

makeEmptyback to summary
public ParsedPattern makeEmpty(Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeEmpty.

makeErrorPatternback to summary
public ParsedPattern makeErrorPattern()

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeErrorPattern.

makeExternalRefback to summary
public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> _scope, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException, IllegalSchemaException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeExternalRef.

makeGrammarback to summary
public Grammar<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> makeGrammar(Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> _parent)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeGrammar.

makeGroupback to summary
public ParsedPattern makeGroup(List<E> patterns, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeGroup.

makeInterleaveback to summary
public ParsedPattern makeInterleave(List<E> patterns, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeInterleave.

makeListback to summary
public ParsedPattern makeList(ParsedPattern _p, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeList.

makeLocationback to summary
public Location makeLocation(String systemId, int lineNumber, int columnNumber)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeLocation.

makeMixedback to summary
public ParsedPattern makeMixed(ParsedPattern _p, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeMixed.

makeNotAllowedback to summary
public ParsedPattern makeNotAllowed(Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeNotAllowed.

makeOneOrMoreback to summary
public ParsedPattern makeOneOrMore(ParsedPattern _p, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeOneOrMore.

makeOptionalback to summary
public ParsedPattern makeOptional(ParsedPattern _p, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeOptional.

makeTextback to summary
public ParsedPattern makeText(Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeText.

makeValueback to summary
public ParsedPattern makeValue(String datatypeLibrary, String type, String value, Context c, String ns, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeValue.

makeZeroOrMoreback to summary
public ParsedPattern makeZeroOrMore(ParsedPattern _p, Location _loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> _anno) throws BuildException

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeZeroOrMore.

usesCommentsback to summary
public boolean usesComments()

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.usesComments.

Doc from com.sun.tools.rngom.ast.builder.SchemaBuilder.usesComments.

If this is 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.