I use jena to insert data. What is the right syntax of data type?
...
UpdateAction.execute(request, model);
....
This SPARQL can insert to ontology:
PREFIX pre:<http://www.semanticweb.org/ontologies/bookShop.owl#>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#">
INSERT DATA
{
pre:TestBook rdf:type owl:NamedIndividual;
rdf:type pre:History;
pre:creator "TTT";
pre:title "Test Book";
pre:hasCurrency pre:US;
pre:price "10".
}
I need to add the data type decimal by change line:
pre:price "10"^^xsd:decimal.
It has Error:
cmd=[updatequery] sourceFile=[C:\tmp\customRule\bookShop.owl] ,reasoning=[none]
[2556-01-30 15:48:20.656] ERROR java.lang.Class - com.hp.hpl.jena.query.QueryPa
rseException: Encountered " "<" "< "" at line 4, column 12.
Was expecting:
<IRIref> ...
at com.hp.hpl.jena.sparql.lang.ParserARQUpdate._parse(ParserARQUpdate.ja
va:70)
at com.hp.hpl.jena.sparql.lang.ParserARQUpdate.parse$(ParserARQUpdate.ja
va:41)
asked
30 Jan, 04:03
Ton Rawat
26●2
accept rate:
50%