/** * Parses the specified file and returns the document. * * @param file The file to parse. * @return Document * @throws Exception Thrown if an error occurred. */ public Document parseFile(File file) throws Exception { return parseFile(file, null); }
/** * Validate the specified file * Any validation errors thrown as an exception. * @param file The file to parse. * @param schemaStreamArray The schema as array of stream sources used to validate the specified file. * @throws Exception Thrown if an error occurred. */ public void validateFile(File file, StreamSource[] schemaStreamArray) throws Exception { // try parsing the file parseFileWithStreamArray(file, schemaStreamArray); }
/** * Validate the specified file * Any validation errors are sent to StdErr, not thrown as an exception. * @param file The file to parse. * @param schemaStreamArray The schema as array of stream sources used to validate the specified file. * @throws Exception Thrown if other (NON-VALIDATION) errors occurred. */ public void validateFileToStdError(File file, StreamSource[] schemaStreamArray) throws Exception { // try parsing the file parseFileWithStreamArrayToSdtErr(file, schemaStreamArray); }
transformFileWithStream(middleFileB, outputFile, STYLESHEET_C); Document doc = anOmeValidator.parseFileWithStreamArray(outputFile, schemaArray); Assert.assertNotNull(doc); String name; Node n; Document docSrc = anOmeValidator.parseFile(inFile, null); Node rootSrc = docSrc.getChildNodes().item(0); Node imageNode = null;
/** * Validates the specified input. * * @param input * The input to validate * @throws Exception * Thrown if an error occurred during the validation */ private void validate(File input) throws Exception { OmeValidator validator = new OmeValidator(); validator.parseFile(input); }
transformFileWithStream(middleFileB, outputFile, STYLESHEET_C); Document doc = anOmeValidator.parseFileWithStreamArray(outputFile, schemaArray); Assert.assertNotNull(doc); String name; Node n; Document docSrc = anOmeValidator.parseFile(inFile, null); Node rootSrc = docSrc.getChildNodes().item(0); Node imageNode = null;
transformFileWithStream(middleFileA, outputFile, STYLESHEET_B); Document doc = anOmeValidator.parseFileWithStreamArray(outputFile, schemaArray); Assert.assertNotNull(doc); String name; Node n; Document docSrc = anOmeValidator.parseFile(inFile, null); Node rootSrc = docSrc.getChildNodes().item(0); Node imageNode = null;
public void validateFile(File file, File schema) throws Exception { // try parsing the file parseFile(file, schema); }
/** * Validate the specified file * @param file The file to parse. * @param schemaStreamArray The schema as array of stream sources used to validate the specified file. * @return true if no errors */ public boolean isValidFile(File file, StreamSource[] schemaStreamArray) { try { // try parsing the file and return true if no errors parseFileWithStreamArray(file, schemaStreamArray); return true; } catch (Exception e) { return false; } }
/** * Validate the specified file * @param file The file to parse. * @param schema The schema used to validate the specified file. * @return true if no errors */ public boolean isValidFile(File file, File schema) { try { // try parsing the file and return true if no errors parseFile(file, schema); return true; } catch (Exception e) { return false; } }