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 SchemaBuilder
BuildException
public 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 SchemaBuilder
BuildException
public ParsedPattern commentAfter(ParsedPattern _p, CommentList _comments) throws BuildException
commentAfter
in interface SchemaBuilder
BuildException
public 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 SchemaBuilder
BuildException
IllegalSchemaException
public NameClassBuilder getNameClassBuilder() throws BuildException
SchemaBuilder
NameClassBuilder
, which is used to build name
classes for this SchemaBuilder
. The
NameClass
es that are built will then be
fed into this SchemaBuilder
to further build RELAX NG patterns.getNameClassBuilder
in interface SchemaBuilder
BuildException
public Annotations makeAnnotations(CommentList _comments, Context context)
SchemaBuilder
Annotations
object to parse annotations on patterns.makeAnnotations
in interface SchemaBuilder
public ParsedPattern makeAttribute(ParsedNameClass _nc, ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeAttribute
in interface SchemaBuilder
BuildException
public ParsedPattern makeChoice(List patterns, Location _loc, Annotations _anno) throws BuildException
makeChoice
in interface SchemaBuilder
BuildException
public CommentList makeCommentList()
makeCommentList
in interface SchemaBuilder
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location _loc) throws BuildException
makeDataPatternBuilder
in interface SchemaBuilder
BuildException
public ParsedPattern makeElement(ParsedNameClass _nc, ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeElement
in interface SchemaBuilder
BuildException
public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix, Location _loc, CommentList _comments, Context context)
makeElementAnnotationBuilder
in interface SchemaBuilder
public ParsedPattern makeEmpty(Location _loc, Annotations _anno)
makeEmpty
in interface SchemaBuilder
public ParsedPattern makeErrorPattern()
makeErrorPattern
in interface SchemaBuilder
public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope _scope, Location _loc, Annotations _anno) throws BuildException, IllegalSchemaException
makeExternalRef
in interface SchemaBuilder
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.BuildException
IllegalSchemaException
public 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 SchemaBuilder
BuildException
public ParsedPattern makeInterleave(List patterns, Location _loc, Annotations _anno) throws BuildException
makeInterleave
in interface SchemaBuilder
BuildException
public ParsedPattern makeList(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeList
in interface SchemaBuilder
BuildException
public Location makeLocation(String systemId, int lineNumber, int columnNumber)
makeLocation
in interface SchemaBuilder
public ParsedPattern makeMixed(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeMixed
in interface SchemaBuilder
BuildException
public ParsedPattern makeNotAllowed(Location _loc, Annotations _anno)
makeNotAllowed
in interface SchemaBuilder
public ParsedPattern makeOneOrMore(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeOneOrMore
in interface SchemaBuilder
BuildException
public ParsedPattern makeZeroOrMore(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeZeroOrMore
in interface SchemaBuilder
BuildException
public ParsedPattern makeOptional(ParsedPattern _p, Location _loc, Annotations _anno) throws BuildException
makeOptional
in interface SchemaBuilder
BuildException
public ParsedPattern makeText(Location _loc, Annotations _anno)
makeText
in interface SchemaBuilder
public ParsedPattern makeValue(String datatypeLibrary, String type, String value, Context c, String ns, Location _loc, Annotations _anno) throws BuildException
makeValue
in interface SchemaBuilder
BuildException
public boolean usesComments()
SchemaBuilder
SchemaBuilder
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.
usesComments
in interface SchemaBuilder
Copyright © 2021 JBoss by Red Hat. All rights reserved.