removed duplicated log
This commit is contained in:
parent
529151828f
commit
075490f4da
|
@ -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 {
|
||||
try {
|
||||
repository.shutDown();
|
||||
manager.shutDown();
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue