Document document = DocumentBuilderHelper.getDocumentFromInputStream(in);
logger.debug("Finished parsing of resource filename: " + filename);
in.close();
return document;
} catch (FileNotFoundException e) {
throw new ResourceNotFoundException(e.getMessage()); // propagate
} catch (Exception e) {
throw new OntoSpreadModelException(e, "OntoSpread files resource loaded: parsing Resource file " + filename);
}
}