On Fri, Jul 27, 2012 at 4:48 AM, Don S <[email protected]> wrote:
>  I posted  this question some times before in Protege community, but I
> didn't  received the exact reason. The ontology was developed in Protege
> and initially I inserted few tuples manually from the protege editor, after
> that start updating the ontology using jena API and SPARQL1.1 Updates  in
> my eclipse application. My doubt is the xml code generated for one of the
> class named*  "Beats"*  from Protege was start with
> * *
> <*Beats* rdf:about="http://www.localhost:3030/personal.owl#1";>
>
> where as in the case of tuple insertion using Jena gives
>
> <*rdf:Description* rdf:about="http://www.localhost:3030/personal.owl#300";>
>
>  Instead of "*rdf:Description"* I want to update the tuples with
> "*Beats"*class.

RDF can be serialized into XML in many different ways.  First, check
whether the individual that you want to be a Beats has an rdf:type
"...Beats".     For instance, even though you see rdf:Description in
the following RDF/XML, the individual 300 is has type Beat.

  <rdf:Description rdf:about="http://www.localhost:3030/personal.owl#300";>
    <rdf:type rdf:resource="http://www.localhost:3030/personal.owl#Beat"/>
  </rdf:Description>

But, if 300 really isn't of type Beat (and looking at the SPARQL
you're using, that wouldn't surprise me), update your SPARQL to assert
that 300 is a Beat ("a" is shorthand for rdf:type, but you can also
use "rdf:type" if you want):

<http://www.localhost:3030/personal.owl#300>
   a <http://www.localhost:3030/personal.owl#Beat> ;
   ...

Hope this helps!

//JT

-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to