Package uk.ac.ebi.pride.tools

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


     */
    private String validateMzIdentML(File mzidFile) throws SAXException, MalformedURLException, FileNotFoundException, URISyntaxException {

        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;
View Full Code Here

TOP

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

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.