Package uk.ac.ebi.pride.tools

Examples of uk.ac.ebi.pride.tools.ValidationErrorHandler


        String errors = "";

        GenericSchemaValidator genericValidator = new GenericSchemaValidator();
        genericValidator.setSchema(new URI("http://www.psidev.info/files/mzIdentML1.1.0.xsd"));

        ErrorHandlerIface handler = new ValidationErrorHandler();
        genericValidator.setErrorHandler(handler);
        BufferedReader br = new BufferedReader(new FileReader(mzidFile));
        genericValidator.validate(br);

        //noinspection unchecked
        List<String> errorMsgs = handler.getErrorMessages();
        if (!errorMsgs.isEmpty()) {
            int errorCount = 0;
            for (String error : errorMsgs) {
                errors += ++errorCount + ": " + error + "\n\n";
                System.out.println(errorCount + ": " + error);
View Full Code Here

TOP

Related Classes of uk.ac.ebi.pride.tools.ValidationErrorHandler

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.