com.sun.xml.internal.rngom.ast.builder.SchemaBuilder Java Examples

The following examples show how to use com.sun.xml.internal.rngom.ast.builder.SchemaBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CompactSyntax.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
  this(r);
  this.sourceUri = sourceUri;
  this.parseable = parseable;
  this.sb = sb;
  this.ncb = sb.getNameClassBuilder();
  this.eh = eh;
  // this causes the root pattern to have non-null annotations
  // which is useful because it gives a context to trang
  this.topLevelComments = sb.makeCommentList();
  this.inheritedNs = defaultNamespace = new String(inheritedNs);
}
 
Example #2
Source File: CompactSyntax.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
  this(r);
  this.sourceUri = sourceUri;
  this.parseable = parseable;
  this.sb = sb;
  this.ncb = sb.getNameClassBuilder();
  this.eh = eh;
  // this causes the root pattern to have non-null annotations
  // which is useful because it gives a context to trang
  this.topLevelComments = sb.makeCommentList();
  this.inheritedNs = defaultNamespace = new String(inheritedNs);
}
 
Example #3
Source File: ModelLoader.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Common part between the XML syntax and the compact syntax.
 */
private Model loadRELAXNG(Parseable p) {
    SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);

    try {
        DPattern out = (DPattern)p.parse(sb);
        return RELAXNGCompiler.build(out,codeModel,opt);
    } catch (IllegalSchemaException e) {
        errorReceiver.error(e.getMessage(),e);
        return null;
    }
}
 
Example #4
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
  this(r);
  this.sourceUri = sourceUri;
  this.parseable = parseable;
  this.sb = sb;
  this.ncb = sb.getNameClassBuilder();
  this.eh = eh;
  // this causes the root pattern to have non-null annotations
  // which is useful because it gives a context to trang
  this.topLevelComments = sb.makeCommentList();
  this.inheritedNs = defaultNamespace = new String(inheritedNs);
}
 
Example #5
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
  this(r);
  this.sourceUri = sourceUri;
  this.parseable = parseable;
  this.sb = sb;
  this.ncb = sb.getNameClassBuilder();
  this.eh = eh;
  // this causes the root pattern to have non-null annotations
  // which is useful because it gives a context to trang
  this.topLevelComments = sb.makeCommentList();
  this.inheritedNs = defaultNamespace = new String(inheritedNs);
}
 
Example #6
Source File: CompactSyntax.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
  this(r);
  this.sourceUri = sourceUri;
  this.parseable = parseable;
  this.sb = sb;
  this.ncb = sb.getNameClassBuilder();
  this.eh = eh;
  // this causes the root pattern to have non-null annotations
  // which is useful because it gives a context to trang
  this.topLevelComments = sb.makeCommentList();
  this.inheritedNs = defaultNamespace = new String(inheritedNs);
}
 
Example #7
Source File: ModelLoader.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Common part between the XML syntax and the compact syntax.
 */
private Model loadRELAXNG(Parseable p) {
    SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);

    try {
        DPattern out = (DPattern)p.parse(sb);
        return RELAXNGCompiler.build(out,codeModel,opt);
    } catch (IllegalSchemaException e) {
        errorReceiver.error(e.getMessage(),e);
        return null;
    }
}
 
Example #8
Source File: ModelLoader.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Common part between the XML syntax and the compact syntax.
 */
private Model loadRELAXNG(Parseable p) {
    SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);

    try {
        DPattern out = (DPattern)p.parse(sb);
        return RELAXNGCompiler.build(out,codeModel,opt);
    } catch (IllegalSchemaException e) {
        errorReceiver.error(e.getMessage(),e);
        return null;
    }
}
 
Example #9
Source File: CompactSyntax.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
  this(r);
  this.sourceUri = sourceUri;
  this.parseable = parseable;
  this.sb = sb;
  this.ncb = sb.getNameClassBuilder();
  this.eh = eh;
  // this causes the root pattern to have non-null annotations
  // which is useful because it gives a context to trang
  this.topLevelComments = sb.makeCommentList();
  this.inheritedNs = defaultNamespace = new String(inheritedNs);
}
 
Example #10
Source File: ModelLoader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Common part between the XML syntax and the compact syntax.
 */
private Model loadRELAXNG(Parseable p) {
    SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);

    try {
        DPattern out = (DPattern)p.parse(sb);
        return RELAXNGCompiler.build(out,codeModel,opt);
    } catch (IllegalSchemaException e) {
        errorReceiver.error(e.getMessage(),e);
        return null;
    }
}
 
Example #11
Source File: ModelLoader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Common part between the XML syntax and the compact syntax.
 */
private Model loadRELAXNG(Parseable p) {
    SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);

    try {
        DPattern out = (DPattern)p.parse(sb);
        return RELAXNGCompiler.build(out,codeModel,opt);
    } catch (IllegalSchemaException e) {
        errorReceiver.error(e.getMessage(),e);
        return null;
    }
}
 
Example #12
Source File: ModelLoader.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Common part between the XML syntax and the compact syntax.
 */
private Model loadRELAXNG(Parseable p) {
    SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);

    try {
        DPattern out = (DPattern)p.parse(sb);
        return RELAXNGCompiler.build(out,codeModel,opt);
    } catch (IllegalSchemaException e) {
        errorReceiver.error(e.getMessage(),e);
        return null;
    }
}
 
Example #13
Source File: ModelLoader.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Common part between the XML syntax and the compact syntax.
 */
private Model loadRELAXNG(Parseable p) {
    SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);

    try {
        DPattern out = (DPattern)p.parse(sb);
        return RELAXNGCompiler.build(out,codeModel,opt);
    } catch (IllegalSchemaException e) {
        errorReceiver.error(e.getMessage(),e);
        return null;
    }
}
 
Example #14
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
  this(r);
  this.sourceUri = sourceUri;
  this.parseable = parseable;
  this.sb = sb;
  this.ncb = sb.getNameClassBuilder();
  this.eh = eh;
  // this causes the root pattern to have non-null annotations
  // which is useful because it gives a context to trang
  this.topLevelComments = sb.makeCommentList();
  this.inheritedNs = defaultNamespace = new String(inheritedNs);
}
 
Example #15
Source File: CompactSyntax.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
  this(r);
  this.sourceUri = sourceUri;
  this.parseable = parseable;
  this.sb = sb;
  this.ncb = sb.getNameClassBuilder();
  this.eh = eh;
  // this causes the root pattern to have non-null annotations
  // which is useful because it gives a context to trang
  this.topLevelComments = sb.makeCommentList();
  this.inheritedNs = defaultNamespace = new String(inheritedNs);
}
 
Example #16
Source File: PatternParseable.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parseExternal(String uri, SchemaBuilder f, Scope s, String inheritedNs) throws BuildException {
    throw new UnsupportedOperationException();
}
 
Example #17
Source File: PatternParseable.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parseInclude(String uri, SchemaBuilder f, IncludedGrammar g, String inheritedNs) throws BuildException {
    throw new UnsupportedOperationException();
}
 
Example #18
Source File: CheckingSchemaBuilder.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public CheckingSchemaBuilder( SchemaBuilder sb, ErrorHandler eh, DatatypeLibraryFactory dlf ) {
    super(new SchemaBuilderImpl(eh,dlf,new SchemaPatternBuilder()),sb);
}
 
Example #19
Source File: CompactParseable.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parseInclude(String uri, SchemaBuilder sb, IncludedGrammar g, String inheritedNs)
        throws BuildException, IllegalSchemaException {
  InputSource tem = new InputSource(uri);
  tem.setEncoding(in.getEncoding());
  return new CompactSyntax(this, makeReader(tem), uri, sb, eh, inheritedNs).parseInclude(g);
}
 
Example #20
Source File: CompactParseable.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parse(SchemaBuilder sb) throws BuildException, IllegalSchemaException {
    ParsedPattern p = new CompactSyntax(this, makeReader(in), in.getSystemId(), sb, eh, "").parse(null);
    return sb.expandPattern(p);
}
 
Example #21
Source File: PatternParseable.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parseInclude(String uri, SchemaBuilder f, IncludedGrammar g, String inheritedNs) throws BuildException {
    throw new UnsupportedOperationException();
}
 
Example #22
Source File: CompactParseable.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parse(SchemaBuilder sb) throws BuildException, IllegalSchemaException {
    ParsedPattern p = new CompactSyntax(this, makeReader(in), in.getSystemId(), sb, eh, "").parse(null);
    return sb.expandPattern(p);
}
 
Example #23
Source File: PatternParseable.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Parser(SchemaBuilder sb) {
    this.sb = sb;
}
 
Example #24
Source File: PatternParseable.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parseExternal(String uri, SchemaBuilder f, Scope s, String inheritedNs) throws BuildException {
    throw new UnsupportedOperationException();
}
 
Example #25
Source File: PatternParseable.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parseInclude(String uri, SchemaBuilder f, IncludedGrammar g, String inheritedNs) throws BuildException {
    throw new UnsupportedOperationException();
}
 
Example #26
Source File: CompactParseable.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parseInclude(String uri, SchemaBuilder sb, IncludedGrammar g, String inheritedNs)
        throws BuildException, IllegalSchemaException {
  InputSource tem = new InputSource(uri);
  tem.setEncoding(in.getEncoding());
  return new CompactSyntax(this, makeReader(tem), uri, sb, eh, inheritedNs).parseInclude(g);
}
 
Example #27
Source File: CompactParseable.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parseExternal(String uri, SchemaBuilder sb, Scope scope, String inheritedNs)
        throws BuildException, IllegalSchemaException {
  InputSource tem = new InputSource(uri);
  tem.setEncoding(in.getEncoding());
  return new CompactSyntax(this, makeReader(tem), uri, sb, eh, inheritedNs).parse(scope);
}
 
Example #28
Source File: PatternParseable.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ParsedPattern parse(SchemaBuilder sb) throws BuildException {
    return (ParsedPattern)pattern.accept(new Parser(sb));
}
 
Example #29
Source File: SchemaBuilderHost.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public SchemaBuilderHost( SchemaBuilder lhs, SchemaBuilder rhs ) {
    this.lhs = lhs;
    this.rhs = rhs;
}
 
Example #30
Source File: CheckingSchemaBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public CheckingSchemaBuilder( SchemaBuilder sb, ErrorHandler eh, DatatypeLibraryFactory dlf ) {
    super(new SchemaBuilderImpl(eh,dlf,new SchemaPatternBuilder()),sb);
}