use of org.collectionspace.csp.helper.core.ConfigFinder in project application by collectionspace.
the class TestConfigFinder method getConfigFile.
public static File getConfigFile(String filename) throws CSPDependencyException {
try {
ConfigFinder cfg = new ConfigFinder(null);
// InputSource out=cfg.resolveEntity("-//CSPACE//ROOT",filename);
File out = cfg.resolveEntityAsFile("-//CSPACE//TESTROOT", filename);
if (out != null) {
return out;
}
throw new CSPDependencyException("No config file found by any method");
} catch (SAXException x) {
throw new CSPDependencyException("Parsing failed", x);
} catch (IOException x) {
throw new CSPDependencyException("Parsing failed", x);
}
}
Aggregations