Java Code Examples for com.sun.tools.internal.xjc.reader.xmlschema.parser.SchemaConstraintChecker#check()

The following examples show how to use com.sun.tools.internal.xjc.reader.xmlschema.parser.SchemaConstraintChecker#check() . 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: ModelLoader.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses a set of XML Schema files into an annotated grammar.
 */
public XSSchemaSet loadXMLSchema() throws SAXException {

    if( opt.strictCheck && !SchemaConstraintChecker.check(opt.getGrammars(),errorReceiver,opt.entityResolver, opt.disableXmlSecurity)) {
        // schema error. error should have been reported
        return null;
    }

    if(opt.getBindFiles().length==0) {
        // no external binding. try the speculative no DOMForest execution,
        // which is faster if the speculation succeeds.
        try {
            return createXSOMSpeculative();
        } catch( SpeculationFailure e) {
            // failed. go the slow way
        }
    }

    // the default slower way is to parse everything into DOM first.
    // so that we can take external annotations into account.
    DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
    return createXSOM(forest, scdBasedBindingSet);
}
 
Example 2
Source File: ModelLoader.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses a set of XML Schema files into an annotated grammar.
 */
public XSSchemaSet loadXMLSchema() throws SAXException {

    if( opt.strictCheck && !SchemaConstraintChecker.check(opt.getGrammars(),errorReceiver,opt.entityResolver, opt.disableXmlSecurity)) {
        // schema error. error should have been reported
        return null;
    }

    if(opt.getBindFiles().length==0) {
        // no external binding. try the speculative no DOMForest execution,
        // which is faster if the speculation succeeds.
        try {
            return createXSOMSpeculative();
        } catch( SpeculationFailure e) {
            // failed. go the slow way
        }
    }

    // the default slower way is to parse everything into DOM first.
    // so that we can take external annotations into account.
    DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
    return createXSOM(forest, scdBasedBindingSet);
}
 
Example 3
Source File: ModelLoader.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses a set of XML Schema files into an annotated grammar.
 */
public XSSchemaSet loadXMLSchema() throws SAXException {

    if( opt.strictCheck && !SchemaConstraintChecker.check(opt.getGrammars(),errorReceiver,opt.entityResolver, opt.disableXmlSecurity)) {
        // schema error. error should have been reported
        return null;
    }

    if(opt.getBindFiles().length==0) {
        // no external binding. try the speculative no DOMForest execution,
        // which is faster if the speculation succeeds.
        try {
            return createXSOMSpeculative();
        } catch( SpeculationFailure e) {
            // failed. go the slow way
        }
    }

    // the default slower way is to parse everything into DOM first.
    // so that we can take external annotations into account.
    DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
    return createXSOM(forest, scdBasedBindingSet);
}
 
Example 4
Source File: ModelLoader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses a set of XML Schema files into an annotated grammar.
 */
public XSSchemaSet loadXMLSchema() throws SAXException {

    if( opt.strictCheck && !SchemaConstraintChecker.check(opt.getGrammars(),errorReceiver,opt.entityResolver, opt.disableXmlSecurity)) {
        // schema error. error should have been reported
        return null;
    }

    if(opt.getBindFiles().length==0) {
        // no external binding. try the speculative no DOMForest execution,
        // which is faster if the speculation succeeds.
        try {
            return createXSOMSpeculative();
        } catch( SpeculationFailure e) {
            // failed. go the slow way
        }
    }

    // the default slower way is to parse everything into DOM first.
    // so that we can take external annotations into account.
    DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
    return createXSOM(forest, scdBasedBindingSet);
}
 
Example 5
Source File: ModelLoader.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses a set of XML Schema files into an annotated grammar.
 */
public XSSchemaSet loadXMLSchema() throws SAXException {

    if( opt.strictCheck && !SchemaConstraintChecker.check(opt.getGrammars(),errorReceiver,opt.entityResolver, opt.disableXmlSecurity)) {
        // schema error. error should have been reported
        return null;
    }

    if(opt.getBindFiles().length==0) {
        // no external binding. try the speculative no DOMForest execution,
        // which is faster if the speculation succeeds.
        try {
            return createXSOMSpeculative();
        } catch( SpeculationFailure e) {
            // failed. go the slow way
        }
    }

    // the default slower way is to parse everything into DOM first.
    // so that we can take external annotations into account.
    DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
    return createXSOM(forest, scdBasedBindingSet);
}
 
Example 6
Source File: ModelLoader.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses a set of XML Schema files into an annotated grammar.
 */
public XSSchemaSet loadXMLSchema() throws SAXException {

    if( opt.strictCheck && !SchemaConstraintChecker.check(opt.getGrammars(),errorReceiver,opt.entityResolver, opt.disableXmlSecurity)) {
        // schema error. error should have been reported
        return null;
    }

    if(opt.getBindFiles().length==0) {
        // no external binding. try the speculative no DOMForest execution,
        // which is faster if the speculation succeeds.
        try {
            return createXSOMSpeculative();
        } catch( SpeculationFailure e) {
            // failed. go the slow way
        }
    }

    // the default slower way is to parse everything into DOM first.
    // so that we can take external annotations into account.
    DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
    return createXSOM(forest, scdBasedBindingSet);
}
 
Example 7
Source File: ModelLoader.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses a set of XML Schema files into an annotated grammar.
 */
public XSSchemaSet loadXMLSchema() throws SAXException {

    if( opt.strictCheck && !SchemaConstraintChecker.check(opt.getGrammars(),errorReceiver,opt.entityResolver, opt.disableXmlSecurity)) {
        // schema error. error should have been reported
        return null;
    }

    if(opt.getBindFiles().length==0) {
        // no external binding. try the speculative no DOMForest execution,
        // which is faster if the speculation succeeds.
        try {
            return createXSOMSpeculative();
        } catch( SpeculationFailure e) {
            // failed. go the slow way
        }
    }

    // the default slower way is to parse everything into DOM first.
    // so that we can take external annotations into account.
    DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
    return createXSOM(forest, scdBasedBindingSet);
}
 
Example 8
Source File: ModelLoader.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses a set of XML Schema files into an annotated grammar.
 */
public XSSchemaSet loadXMLSchema() throws SAXException {

    if( opt.strictCheck && !SchemaConstraintChecker.check(opt.getGrammars(),errorReceiver,opt.entityResolver, opt.disableXmlSecurity)) {
        // schema error. error should have been reported
        return null;
    }

    if(opt.getBindFiles().length==0) {
        // no external binding. try the speculative no DOMForest execution,
        // which is faster if the speculation succeeds.
        try {
            return createXSOMSpeculative();
        } catch( SpeculationFailure e) {
            // failed. go the slow way
        }
    }

    // the default slower way is to parse everything into DOM first.
    // so that we can take external annotations into account.
    DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
    return createXSOM(forest, scdBasedBindingSet);
}