org.kohsuke.rngom.binary
クラス SchemaBuilderImpl
java.lang.Object
org.kohsuke.rngom.binary.SchemaBuilderImpl
- すべての実装インタフェース:
- Annotations, CommentList, ElementAnnotationBuilder, SchemaBuilder
- 直系の既知のサブクラス:
- NodeAwareSchemaBuilderImpl
- public class SchemaBuilderImpl
- extends java.lang.Object
- implements SchemaBuilder, ElementAnnotationBuilder, CommentList
|
メソッドの概要 |
void |
addAttribute(java.lang.String ns,
java.lang.String localName,
java.lang.String prefix,
java.lang.String value,
Location loc)
|
void |
addComment(CommentList comments)
Adds comments following the last initial child element annotation. |
void |
addComment(java.lang.String value,
Location loc)
|
void |
addElement(ParsedElementAnnotation ea)
|
void |
addLeadingComment(CommentList comments)
|
void |
addText(java.lang.String value,
Location loc,
CommentList comments)
|
ParsedPattern |
annotate(ParsedPattern p,
Annotations anno)
|
ParsedPattern |
annotateAfter(ParsedPattern p,
ParsedElementAnnotation e)
|
ParsedPattern |
commentAfter(ParsedPattern p,
CommentList comments)
|
ParsedPattern |
expandPattern(ParsedPattern _pattern)
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)
|
ParsedElementAnnotation |
makeElementAnnotation()
|
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 context,
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.
|
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchemaBuilderImpl
public SchemaBuilderImpl(org.xml.sax.ErrorHandler eh)
- パラメータ:
eh - Error handler to receive errors while building the schema.
SchemaBuilderImpl
public SchemaBuilderImpl(org.xml.sax.ErrorHandler eh,
org.relaxng.datatype.DatatypeLibraryFactory datatypeLibraryFactory,
SchemaPatternBuilder pb)
- パラメータ:
eh - Error handler to receive errors while building the schema.datatypeLibraryFactory - This is consulted to locate datatype libraries.pb - Used to build patterns.
expandPattern
public ParsedPattern expandPattern(ParsedPattern _pattern)
throws BuildException,
IllegalSchemaException
- インタフェース
SchemaBuilder の記述:
- 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.)
- 定義:
- インタフェース
SchemaBuilder 内の expandPattern
- 例外:
BuildException
IllegalSchemaException
getNameClassBuilder
public NameClassBuilder getNameClassBuilder()
- インタフェース
SchemaBuilder の記述:
- 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.
- 定義:
- インタフェース
SchemaBuilder 内の getNameClassBuilder
- 戻り値:
- always return a non-null valid object. This method can (and
probably should) always return the same object.
makeChoice
public ParsedPattern makeChoice(ParsedPattern[] patterns,
int nPatterns,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeChoice
- 例外:
BuildException
makeInterleave
public ParsedPattern makeInterleave(ParsedPattern[] patterns,
int nPatterns,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeInterleave
- 例外:
BuildException
makeGroup
public ParsedPattern makeGroup(ParsedPattern[] patterns,
int nPatterns,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeGroup
- 例外:
BuildException
makeOneOrMore
public ParsedPattern makeOneOrMore(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeOneOrMore
- 例外:
BuildException
makeZeroOrMore
public ParsedPattern makeZeroOrMore(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeZeroOrMore
- 例外:
BuildException
makeOptional
public ParsedPattern makeOptional(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeOptional
- 例外:
BuildException
makeList
public ParsedPattern makeList(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeList
- 例外:
BuildException
makeMixed
public ParsedPattern makeMixed(ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeMixed
- 例外:
BuildException
makeEmpty
public ParsedPattern makeEmpty(Location loc,
Annotations anno)
- 定義:
- インタフェース
SchemaBuilder 内の makeEmpty
makeNotAllowed
public ParsedPattern makeNotAllowed(Location loc,
Annotations anno)
- 定義:
- インタフェース
SchemaBuilder 内の makeNotAllowed
makeText
public ParsedPattern makeText(Location loc,
Annotations anno)
- 定義:
- インタフェース
SchemaBuilder 内の makeText
makeErrorPattern
public ParsedPattern makeErrorPattern()
- 定義:
- インタフェース
SchemaBuilder 内の makeErrorPattern
makeAttribute
public ParsedPattern makeAttribute(ParsedNameClass nc,
ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeAttribute
- 例外:
BuildException
makeElement
public ParsedPattern makeElement(ParsedNameClass nc,
ParsedPattern p,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeElement
- 例外:
BuildException
makeDataPatternBuilder
public DataPatternBuilder makeDataPatternBuilder(java.lang.String datatypeLibrary,
java.lang.String type,
Location loc)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeDataPatternBuilder
- 例外:
BuildException
makeValue
public ParsedPattern makeValue(java.lang.String datatypeLibrary,
java.lang.String type,
java.lang.String value,
Context context,
java.lang.String ns,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeValue
- 例外:
BuildException
makeGrammar
public Grammar makeGrammar(Scope parent)
- 定義:
- インタフェース
SchemaBuilder 内の makeGrammar
- パラメータ:
parent - The parent scope. null if there's no parent scope.
For example, if the complete document looks like the following:
Then when the outer-most Grammar is created, it will
receive the null parent.
annotate
public ParsedPattern annotate(ParsedPattern p,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の annotate
- 例外:
BuildException
annotateAfter
public ParsedPattern annotateAfter(ParsedPattern p,
ParsedElementAnnotation e)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の annotateAfter
- 例外:
BuildException
commentAfter
public ParsedPattern commentAfter(ParsedPattern p,
CommentList comments)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の commentAfter
- 例外:
BuildException
makeExternalRef
public ParsedPattern makeExternalRef(Parseable current,
java.lang.String uri,
java.lang.String ns,
Scope scope,
Location loc,
Annotations anno)
throws BuildException
- 定義:
- インタフェース
SchemaBuilder 内の makeExternalRef
- パラメータ:
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
makeLocation
public Location makeLocation(java.lang.String systemId,
int lineNumber,
int columnNumber)
- 定義:
- インタフェース
SchemaBuilder 内の makeLocation
makeAnnotations
public Annotations makeAnnotations(CommentList comments,
Context context)
- 定義:
- インタフェース
SchemaBuilder 内の makeAnnotations
makeElementAnnotationBuilder
public ElementAnnotationBuilder makeElementAnnotationBuilder(java.lang.String ns,
java.lang.String localName,
java.lang.String prefix,
Location loc,
CommentList comments,
Context context)
- 定義:
- インタフェース
SchemaBuilder 内の makeElementAnnotationBuilder
makeCommentList
public CommentList makeCommentList()
- 定義:
- インタフェース
SchemaBuilder 内の makeCommentList
addComment
public void addComment(java.lang.String value,
Location loc)
throws BuildException
- 定義:
- インタフェース
CommentList 内の addComment
- 例外:
BuildException
addAttribute
public void addAttribute(java.lang.String ns,
java.lang.String localName,
java.lang.String prefix,
java.lang.String value,
Location loc)
- 定義:
- インタフェース
Annotations 内の addAttribute
addElement
public void addElement(ParsedElementAnnotation ea)
- 定義:
- インタフェース
Annotations 内の addElement
addComment
public void addComment(CommentList comments)
throws BuildException
- インタフェース
Annotations の記述:
- Adds comments following the last initial child element annotation.
- 定義:
- インタフェース
Annotations 内の addComment
- 例外:
BuildException
addLeadingComment
public void addLeadingComment(CommentList comments)
throws BuildException
- 定義:
- インタフェース
Annotations 内の addLeadingComment
- 例外:
BuildException
makeElementAnnotation
public ParsedElementAnnotation makeElementAnnotation()
- 定義:
- インタフェース
ElementAnnotationBuilder 内の makeElementAnnotation
addText
public void addText(java.lang.String value,
Location loc,
CommentList comments)
throws BuildException
- 定義:
- インタフェース
ElementAnnotationBuilder 内の addText
- 例外:
BuildException
usesComments
public boolean usesComments()
- インタフェース
SchemaBuilder の記述:
- 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.
- 定義:
- インタフェース
SchemaBuilder 内の usesComments