removed duplicated log

This commit is contained in:
Enrico Ottonello 2020-10-30 17:29:18 +01:00
parent 529151828f
commit 075490f4da
1 changed files with 9 additions and 6 deletions

View File

@ -309,25 +309,28 @@ public class GraphDBClient {
manager.setUsernameAndPassword(getWriterUser(), getWriterPwd());
Repository repository = manager.getRepository(getRepository());
ValueFactory factory = repository.getValueFactory();
try (RepositoryConnection con = repository.getConnection()) {
try {
RepositoryConnection con = repository.getConnection();
con.begin();
IRI contextIRI = factory.createIRI(getGraphDBBaseURI(), context);
log.debug("adding data from IRI: "+contextIRI.toString());
log.debug("adding data from: "+dataUrl+" to context: "+contextIRI.toString());
con.add(new URL(dataUrl), null, RDFFormat.TURTLE, contextIRI);
result.concat("data added from url: "+dataUrl+" into graph "+context);
con.commit();
log.debug("add data from Url executed");
}
catch (RDF4JException | MalformedURLException e) {
log.error("error executing query ...", e);
throw new AriadnePlusPublisherException(e);
} catch (IOException e) {
log.error("error executing query ...", e);
throw new AriadnePlusPublisherException(e);
}
finally {
repository.shutDown();
manager.shutDown();
try {
repository.shutDown();
manager.shutDown();
} catch (Exception e) {
}
}
return result;
}