My owl file is
....
<filePeakHour rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>16</filePeakHour>
...
I want to create query that retireve SUBJECT where FilePeakHour is 16.
For this, When I run below query in Protege SparqlPlugin, it runs ok
SELECT ?x
WHERE { ?x <http://www.semanticweb.org/administrator/ontologies/2014/2/untitled-ontology-5#filePeakHour>"16"^^xsd:int }
But when I convert it to Jena format
String queryString =
"SELECT ?x WHERE { ?x <http://www.semanticweb.org/administrator/ontologies/2014/2/untitled-ontology-5#filePeakHour>\"16\"^^xsd:int }";
it return errors:
Exception in thread "main" com.hp.hpl.jena.query.QueryParseException: Line 1, column 121: Unresolved prefixed name: xsd:int
at com.hp.hpl.jena.sparql.lang.ParserBase.throwParseException(ParserBase.java:661)
at com.hp.hpl.jena.sparql.lang.ParserBase.resolvePName(ParserBase.java:274)
at com.hp.hpl.jena.sparql.lang.sparql_11.SPARQLParser11.PrefixedName(SPARQLParser11.java:4888)
at com.hp.hpl.jena.sparql.lang.sparql_11.SPARQLParser11.iri(SPARQLParser11.java:4872)
at com.hp.hpl.jena.sparql.lang.sparql_11.SPARQLParser11.RDFLiteral(SPARQLParser11.java:4704)
How to retrieve xsd:int value from owl file in Jena