HTTPRepository repo = (HTTPRepository)request.getSession().getAttribute(SessionKeys.REPOSITORY_KEY);
RepositoryConnection conn = null;
try {
conn = repo.getConnection();
conn.add(in, rdfUpload.getBaseUri(), rdfUpload.getFormat());
conn.commit();
logger.info("Upload committed.");
}
catch (RDFParseException e) {
logger.warn("Unable to upload file {}", e.getMessage());
errors.rejectValue("contents", "repository.modify.add.error", new String[] { e.getMessage() }, "Malformed document");