uncommented logs and set them in debug mode
This commit is contained in:
parent
031f4d92f5
commit
83ecd94c6f
|
@ -132,19 +132,19 @@ public class RunSPARQLQueryService {
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
// log.info("Retrieving "+recordId+" - isCollection:"+isCollection );
|
log.debug("Retrieving "+recordId+" - isCollection:"+isCollection );
|
||||||
String query = selectQueryTemplate.replaceAll("%record", "<"+recordId+">");
|
String query = selectQueryTemplate.replaceAll("%record", "<"+recordId+">");
|
||||||
openConnection();
|
openConnection();
|
||||||
StringWriter recordWriter = null;
|
StringWriter recordWriter = null;
|
||||||
Model resultsModel = null;
|
Model resultsModel = null;
|
||||||
try {
|
try {
|
||||||
// log.debug("Started at: "+Calendar.getInstance().getTime().toString());
|
log.debug("Started at: "+Calendar.getInstance().getTime().toString());
|
||||||
GraphQuery graphQuery = connection.prepareGraphQuery(QueryLanguage.SPARQL, query);
|
GraphQuery graphQuery = connection.prepareGraphQuery(QueryLanguage.SPARQL, query);
|
||||||
GraphQueryResult graphQueryResult = graphQuery.evaluate();
|
GraphQueryResult graphQueryResult = graphQuery.evaluate();
|
||||||
resultsModel = QueryResults.asModel(graphQueryResult);
|
resultsModel = QueryResults.asModel(graphQueryResult);
|
||||||
graphQueryResult.close();
|
graphQueryResult.close();
|
||||||
// log.debug("Finished at: "+Calendar.getInstance().getTime().toString());
|
log.debug("Finished at: "+Calendar.getInstance().getTime().toString());
|
||||||
// log.info("Statements retrieved: " + resultsModel.size());
|
log.debug("Statements retrieved: " + resultsModel.size());
|
||||||
if (resultsModel.size()==0) {
|
if (resultsModel.size()==0) {
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ public class RunSPARQLQueryService {
|
||||||
parser.setCollection(isCollection);
|
parser.setCollection(isCollection);
|
||||||
String bufferedRecord = recordWriter.toString();
|
String bufferedRecord = recordWriter.toString();
|
||||||
int size = parser.parse(bufferedRecord);
|
int size = parser.parse(bufferedRecord);
|
||||||
// log.debug("json elements: "+size);
|
log.debug("json elements: "+size);
|
||||||
if (size==-1) {
|
if (size==-1) {
|
||||||
return -4;
|
return -4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue