System.out.println("Query 3:");
// select name of all resources with integer age of 19:
queryString = "SELECT ?name WHERE { ?resource <"+hasAge+"> \"19\"^^<"+XSD._integer+"> . ?resource <"+hasName+"> ?name }";
//works also:
DatatypeLiteral nineteen = model.createDatatypeLiteral("19",XSD._integer);
String queryString2 = "SELECT ?name WHERE { ?resource <"+hasAge+"> "+nineteen.toSPARQL()+" . ?resource <"+hasName+"> ?name }";
assert queryString.equals(queryString2);
results = model.sparqlSelect(queryString);
for(QueryRow row : results) {
System.out.println(row);