For JIRA issue NIHVIVO-4026, checking query model resource is not null before accessing it

This commit is contained in:
hudajkhan 2013-01-07 17:35:00 -05:00
parent 4c4334d6f4
commit 28ce7ce277

View file

@ -128,10 +128,11 @@ public class ProcessSparqlDataGetterN3 extends ProcessDataGetterAbstract {
existingLiteralValues.put(this.getVarName("query", counter),
new ArrayList<Literal>(Arrays.asList(queryLiteral)));
existingUriValues.put(this.getVarName("queryModel", counter),
//Query model is optional
if(queryModelResource != null && queryModelResource.getURI() != null) {
existingUriValues.put(this.getVarName("queryModel", counter),
new ArrayList<String>(Arrays.asList(queryModelResource.getURI())));
}
}
} catch(Exception ex) {