Java Code Examples for com.sun.xml.internal.rngom.digested.DPattern#accept()

The following examples show how to use com.sun.xml.internal.rngom.digested.DPattern#accept() . 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: RELAXNGCompiler.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public RELAXNGCompiler(DPattern grammar, JCodeModel codeModel, Options opts) {
    this.grammar = grammar;
    this.opts = opts;
    this.model = new Model(opts,codeModel, NameConverter.smart,opts.classNameAllocator,null);

    datatypes.put("",DatatypeLib.BUILTIN);
    datatypes.put(WellKnownNamespaces.XML_SCHEMA_DATATYPES,DatatypeLib.XMLSCHEMA);

    // find all defines
    DefineFinder deff = new DefineFinder();
    grammar.accept(deff);
    this.defs = deff.defs;

    if(opts.defaultPackage2!=null)
        pkg = codeModel._package(opts.defaultPackage2);
    else
    if(opts.defaultPackage!=null)
        pkg = codeModel._package(opts.defaultPackage);
    else
        pkg = codeModel.rootPackage();
}
 
Example 2
Source File: RELAXNGCompiler.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public RELAXNGCompiler(DPattern grammar, JCodeModel codeModel, Options opts) {
    this.grammar = grammar;
    this.opts = opts;
    this.model = new Model(opts,codeModel, NameConverter.smart,opts.classNameAllocator,null);

    datatypes.put("",DatatypeLib.BUILTIN);
    datatypes.put(WellKnownNamespaces.XML_SCHEMA_DATATYPES,DatatypeLib.XMLSCHEMA);

    // find all defines
    DefineFinder deff = new DefineFinder();
    grammar.accept(deff);
    this.defs = deff.defs;

    if(opts.defaultPackage2!=null)
        pkg = codeModel._package(opts.defaultPackage2);
    else
    if(opts.defaultPackage!=null)
        pkg = codeModel._package(opts.defaultPackage);
    else
        pkg = codeModel.rootPackage();
}
 
Example 3
Source File: RELAXNGCompiler.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public RELAXNGCompiler(DPattern grammar, JCodeModel codeModel, Options opts) {
    this.grammar = grammar;
    this.opts = opts;
    this.model = new Model(opts,codeModel, NameConverter.smart,opts.classNameAllocator,null);

    datatypes.put("",DatatypeLib.BUILTIN);
    datatypes.put(WellKnownNamespaces.XML_SCHEMA_DATATYPES,DatatypeLib.XMLSCHEMA);

    // find all defines
    DefineFinder deff = new DefineFinder();
    grammar.accept(deff);
    this.defs = deff.defs;

    if(opts.defaultPackage2!=null)
        pkg = codeModel._package(opts.defaultPackage2);
    else
    if(opts.defaultPackage!=null)
        pkg = codeModel._package(opts.defaultPackage);
    else
        pkg = codeModel.rootPackage();
}
 
Example 4
Source File: RELAXNGCompiler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public RELAXNGCompiler(DPattern grammar, JCodeModel codeModel, Options opts) {
    this.grammar = grammar;
    this.opts = opts;
    this.model = new Model(opts,codeModel, NameConverter.smart,opts.classNameAllocator,null);

    datatypes.put("",DatatypeLib.BUILTIN);
    datatypes.put(WellKnownNamespaces.XML_SCHEMA_DATATYPES,DatatypeLib.XMLSCHEMA);

    // find all defines
    DefineFinder deff = new DefineFinder();
    grammar.accept(deff);
    this.defs = deff.defs;

    if(opts.defaultPackage2!=null)
        pkg = codeModel._package(opts.defaultPackage2);
    else
    if(opts.defaultPackage!=null)
        pkg = codeModel._package(opts.defaultPackage);
    else
        pkg = codeModel.rootPackage();
}
 
Example 5
Source File: RELAXNGCompiler.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public RELAXNGCompiler(DPattern grammar, JCodeModel codeModel, Options opts) {
    this.grammar = grammar;
    this.opts = opts;
    this.model = new Model(opts,codeModel, NameConverter.smart,opts.classNameAllocator,null);

    datatypes.put("",DatatypeLib.BUILTIN);
    datatypes.put(WellKnownNamespaces.XML_SCHEMA_DATATYPES,DatatypeLib.XMLSCHEMA);

    // find all defines
    DefineFinder deff = new DefineFinder();
    grammar.accept(deff);
    this.defs = deff.defs;

    if(opts.defaultPackage2!=null)
        pkg = codeModel._package(opts.defaultPackage2);
    else
    if(opts.defaultPackage!=null)
        pkg = codeModel._package(opts.defaultPackage);
    else
        pkg = codeModel.rootPackage();
}
 
Example 6
Source File: TypeUseBinder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private TypeUse onContainer(DContainerPattern p) {
    TypeUse t=null;
    for( DPattern child : p ) {
        TypeUse s = child.accept(this);
        if(t!=null && t!=s)
            return CBuiltinLeafInfo.STRING; // heterogenous
        t = s;
    }
    return t;
}
 
Example 7
Source File: TypeUseBinder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private TypeUse onContainer(DContainerPattern p) {
    TypeUse t=null;
    for( DPattern child : p ) {
        TypeUse s = child.accept(this);
        if(t!=null && t!=s)
            return CBuiltinLeafInfo.STRING; // heterogenous
        t = s;
    }
    return t;
}
 
Example 8
Source File: TypeUseBinder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private TypeUse onContainer(DContainerPattern p) {
    TypeUse t=null;
    for( DPattern child : p ) {
        TypeUse s = child.accept(this);
        if(t!=null && t!=s)
            return CBuiltinLeafInfo.STRING; // heterogenous
        t = s;
    }
    return t;
}
 
Example 9
Source File: TypeUseBinder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private TypeUse onContainer(DContainerPattern p) {
    TypeUse t=null;
    for( DPattern child : p ) {
        TypeUse s = child.accept(this);
        if(t!=null && t!=s)
            return CBuiltinLeafInfo.STRING; // heterogenous
        t = s;
    }
    return t;
}
 
Example 10
Source File: TypeUseBinder.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private TypeUse onContainer(DContainerPattern p) {
    TypeUse t=null;
    for( DPattern child : p ) {
        TypeUse s = child.accept(this);
        if(t!=null && t!=s)
            return CBuiltinLeafInfo.STRING; // heterogenous
        t = s;
    }
    return t;
}
 
Example 11
Source File: TypeUseBinder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private TypeUse onContainer(DContainerPattern p) {
    TypeUse t=null;
    for( DPattern child : p ) {
        TypeUse s = child.accept(this);
        if(t!=null && t!=s)
            return CBuiltinLeafInfo.STRING; // heterogenous
        t = s;
    }
    return t;
}
 
Example 12
Source File: TypeUseBinder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private TypeUse onContainer(DContainerPattern p) {
    TypeUse t=null;
    for( DPattern child : p ) {
        TypeUse s = child.accept(this);
        if(t!=null && t!=s)
            return CBuiltinLeafInfo.STRING; // heterogenous
        t = s;
    }
    return t;
}
 
Example 13
Source File: RELAXNGCompiler.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void bindContentModel(CClassInfo clazz, DPattern pattern) {
    // first we decide which patterns in it map to properties
    // then we process each of them by using RawTypeSetBuilder.
    // much like DefaultParticleBinder in XSD
    pattern.accept(new ContentModelBinder(this,clazz));
}
 
Example 14
Source File: RawTypeSetBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public static RawTypeSet build( RELAXNGCompiler compiler, DPattern contentModel, Multiplicity mul ) {
    RawTypeSetBuilder builder = new RawTypeSetBuilder(compiler,mul);
    contentModel.accept(builder);
    return builder.create();
}
 
Example 15
Source File: RawTypeSetBuilder.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static RawTypeSet build( RELAXNGCompiler compiler, DPattern contentModel, Multiplicity mul ) {
    RawTypeSetBuilder builder = new RawTypeSetBuilder(compiler,mul);
    contentModel.accept(builder);
    return builder.create();
}
 
Example 16
Source File: RELAXNGCompiler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void bindContentModel(CClassInfo clazz, DPattern pattern) {
    // first we decide which patterns in it map to properties
    // then we process each of them by using RawTypeSetBuilder.
    // much like DefaultParticleBinder in XSD
    pattern.accept(new ContentModelBinder(this,clazz));
}
 
Example 17
Source File: RELAXNGCompiler.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void bindContentModel(CClassInfo clazz, DPattern pattern) {
    // first we decide which patterns in it map to properties
    // then we process each of them by using RawTypeSetBuilder.
    // much like DefaultParticleBinder in XSD
    pattern.accept(new ContentModelBinder(this,clazz));
}
 
Example 18
Source File: RawTypeSetBuilder.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public static RawTypeSet build( RELAXNGCompiler compiler, DPattern contentModel, Multiplicity mul ) {
    RawTypeSetBuilder builder = new RawTypeSetBuilder(compiler,mul);
    contentModel.accept(builder);
    return builder.create();
}
 
Example 19
Source File: RawTypeSetBuilder.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static RawTypeSet build( RELAXNGCompiler compiler, DPattern contentModel, Multiplicity mul ) {
    RawTypeSetBuilder builder = new RawTypeSetBuilder(compiler,mul);
    contentModel.accept(builder);
    return builder.create();
}
 
Example 20
Source File: RELAXNGCompiler.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void bindContentModel(CClassInfo clazz, DPattern pattern) {
    // first we decide which patterns in it map to properties
    // then we process each of them by using RawTypeSetBuilder.
    // much like DefaultParticleBinder in XSD
    pattern.accept(new ContentModelBinder(this,clazz));
}