public class SchemaBuilderHost extends Base implements SchemaBuilder
| Constructor and Description |
|---|
SchemaBuilderHost(SchemaBuilder lhs,
SchemaBuilder rhs) |
public SchemaBuilderHost(SchemaBuilder lhs, SchemaBuilder rhs)
public ParsedPattern annotate(ParsedPattern _p, Annotations _anno) throws BuildException
SchemaBuilder
<element name="foo"> <!-- this becomes 'P' -->
<foreign:annotation /> <!-- this becomes 'A' -->
...
</element>
annotate in interface SchemaBuilderBuildExceptionpublic ParsedPattern annotateAfter(ParsedPattern _p, ParsedElementAnnotation _e) throws BuildException
SchemaBuilder
<element name="foo">
<empty /> <!-- this becomes 'P' -->
<foreign:annotation /> <!-- this becomes 'E' -->
</element>
annotateAfter in interface SchemaBuilderBuildExceptionpublic ParsedPattern commentAfter(ParsedPattern _p, CommentList _comments) throws BuildException
commentAfter in interface SchemaBuilderBuildExceptionpublic ParsedPattern expandPattern(ParsedPattern _p) throws BuildException, IllegalSchemaException
SchemaBuilder
This hook typically allows as SchemaBuilder to expand
notAllowed (if it's following the simplification as in the spec.)
expandPattern in interface SchemaBuilderBuildExceptionIllegalSchemaExceptionpublic 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 SchemaBuilderBuildExceptionpublic Annotations makeAnnotations(CommentList _comments, Context context)
SchemaBuilderAnnotations object to parse annotations on patterns.makeAnnotations in interface SchemaBuilderpublic ParsedPattern makeAttribute(ParsedNameClass _nc, ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeAttribute in interface SchemaBuilderBuildExceptionpublic ParsedPattern makeChoice(List patterns, Location _loc, Annotations _anno) throws BuildException
makeChoice in interface SchemaBuilderBuildExceptionpublic CommentList makeCommentList()
makeCommentList in interface SchemaBuilderpublic DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location _loc) throws BuildException
makeDataPatternBuilder in interface SchemaBuilderBuildExceptionpublic ParsedPattern makeElement(ParsedNameClass _nc, ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeElement in interface SchemaBuilderBuildExceptionpublic ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix, Location _loc, CommentList _comments, Context context)
makeElementAnnotationBuilder in interface SchemaBuilderpublic ParsedPattern makeEmpty(Location _loc, Annotations _anno)
makeEmpty in interface SchemaBuilderpublic ParsedPattern makeErrorPattern()
makeErrorPattern in interface SchemaBuilderpublic ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope _scope, Location _loc, Annotations _anno) throws BuildException, IllegalSchemaException
makeExternalRef in interface SchemaBuildercurrent - 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 Grammar makeGrammar(Scope _parent)
makeGrammar in interface SchemaBuilder_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 ParsedPattern makeGroup(List patterns, Location _loc, Annotations _anno) throws BuildException
makeGroup in interface SchemaBuilderBuildExceptionpublic ParsedPattern makeInterleave(List patterns, Location _loc, Annotations _anno) throws BuildException
makeInterleave in interface SchemaBuilderBuildExceptionpublic ParsedPattern makeList(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeList in interface SchemaBuilderBuildExceptionpublic Location makeLocation(String systemId, int lineNumber, int columnNumber)
makeLocation in interface SchemaBuilderpublic ParsedPattern makeMixed(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeMixed in interface SchemaBuilderBuildExceptionpublic ParsedPattern makeNotAllowed(Location _loc, Annotations _anno)
makeNotAllowed in interface SchemaBuilderpublic ParsedPattern makeOneOrMore(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeOneOrMore in interface SchemaBuilderBuildExceptionpublic ParsedPattern makeZeroOrMore(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeZeroOrMore in interface SchemaBuilderBuildExceptionpublic ParsedPattern makeOptional(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeOptional in interface SchemaBuilderBuildExceptionpublic ParsedPattern makeText(Location _loc, Annotations _anno)
makeText in interface SchemaBuilderpublic ParsedPattern makeValue(String datatypeLibrary, String type, String value, Context c, String ns, Location _loc, Annotations _anno) throws BuildException
makeValue in interface SchemaBuilderBuildExceptionpublic 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.
usesComments in interface SchemaBuilderCopyright © 2018 JBoss by Red Hat. All rights reserved.