Package org.jibx.schema.validation

Examples of org.jibx.schema.validation.ProblemConsoleLister


           
            // load and validate schemas
            ValidationContext vctx = new ValidationContext();
            ValidationUtils.load(resolves, null, vctx);
            ProblemMultiHandler handler = new ProblemMultiHandler();
            handler.addHandler(new ProblemConsoleLister());
            handler.addHandler(new ProblemLogLister(s_logger));
            if (vctx.reportProblems(handler)) {
                System.exit(2);
            }
           
View Full Code Here


        }
    }
   
    private void testDump(SchemasetCustom custom, SchemaElement[] schemas) throws JiBXException, IOException {
        CodeGen generator = new CodeGen(custom, m_validationContext);
        ProblemHandler handler = new ProblemConsoleLister();
        assertTrue("Schema customization failure", generator.customizeSchemas("dflt", handler));
        generator.applyAndNormalize();
        generator.pruneDefinitions();
        ValidationUtils.validateSchemas(schemas, m_validationContext);
        assertFalse("Errors in schema validation", m_validationContext.reportProblems(handler));
View Full Code Here

    }
   
    private void testGeneration(SchemasetCustom custom, SchemaElement[] schemas, StringObjectPair[] image,
        StringPair[] bindings) throws Exception {
        CodeGen generator = new CodeGen(custom, m_validationContext);
        ProblemHandler handler = new ProblemConsoleLister();
        assertTrue("Schema customization failure", generator.customizeSchemas("dflt", handler));
        generator.applyAndNormalize();
        generator.pruneDefinitions();
        ValidationUtils.validateSchemas(schemas, m_validationContext);
        assertFalse("Errors in schema validation", m_validationContext.reportProblems(handler));
View Full Code Here

     */
    protected boolean loadCustomizations(String path) throws JiBXException, IOException {
       
        // load customizations and check for errors
        ProblemMultiHandler handler = new ProblemMultiHandler();
        handler.addHandler(new ProblemConsoleLister());
        handler.addHandler(new ProblemLogLister(s_logger));
        m_customRoot = SchemasetCustom.loadCustomizations(path, handler);
       
        // set specified default package on root customization element
        if (m_defaultPackage != null) {
View Full Code Here

                System.exit(2);
            }
           
            // handle code generation from schemas
            ProblemMultiHandler handler = new ProblemMultiHandler();
            handler.addHandler(new ProblemConsoleLister());
            handler.addHandler(new ProblemLogLister(s_logger));
            CodeGen inst = new CodeGen(parms.getCustomRoot(), parms.getSchemaRoot(),
                parms.getGeneratePath());
            inst.generate(parms.isVerbose(), parms.getUsingNamespace(), parms.getNonamespacePackage(),
                parms.getBindingName(), fileset.asList(), parms.getIncludePaths(), parms.getModelFile(), handler);
View Full Code Here

            custroot = new SchemasetCustom((SchemasetCustom)null);
        } else {
            custroot = loadCustomization(custom);
        }
        CodeGen generator = new CodeGen(custroot, m_validationContext);
        ProblemHandler handler = new ProblemConsoleLister();
        assertTrue("Schema customization failure", generator.customizeSchemas("dflt", handler));
        generator.applyAndNormalize();
        generator.pruneDefinitions();
        verifySchema(resolver.getText(), writeSchema(schemas[0]));
        SchemaElement schema = m_validationContext.getSchemaById(inclname);
View Full Code Here

TOP

Related Classes of org.jibx.schema.validation.ProblemConsoleLister

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.