26 package org.nexusformat.nxvalidate;
29 import org.nexusformat.nxvalidate.exceptions.NXvalidateException;
30 import java.util.logging.Level;
31 import java.util.logging.Logger;
39 private File reduced = null;
40 private File nxsFile = null;
41 private boolean keepTemp =
false;
42 private File schematronFile = null;
43 private boolean convertNxs =
false;
44 private String nxconvertCommand = null;
49 this.nxconvertCommand = nxconvertCommand;
50 this.nxsFile = nxsFile;
59 this.reduced = reduced;
78 this.nxsFile = nxsFile;
98 this.schematronFile = schematronFile;
108 return schematronFile;
118 this.convertNxs = convertNxs;
129 this.keepTemp = keepTemp;
143 if (convertNxs && nxsFile != null) {
147 }
catch (Exception e) {
148 Logger.getLogger(
ValidatorUtils.class.getName()).log(Level.SEVERE,
149 "While converting \"" + nxsFile
150 +
"\" to reduced xml format");
151 throw new NXvalidateException(
"While converting \"" + nxsFile
152 +
"\" to reduced xml format");
157 if (reduced != null && schematronFile != null) {
161 schematronFile, keepTemp);
164 result = schematron.validate();
165 }
catch (Exception e) {
166 Logger.getLogger(
ValidatorUtils.class.getName()).log(Level.SEVERE,
167 "While creating validation report");
168 throw new NXvalidateException(
"While creating validation report", e);