rdf2owl

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

rdf2owl

Maciej Gawinecki-2

How can I convert RDF to OWL ?

Has anyone tried to prepare good tool for that ?

I tried to use RDF2OWL tool from Protege-OWL bundled with Protege
3.1.1

      OntModel model = ModelFactory.createOntologyModel();
      manager.readModel(model, args[0]);
      RDF2OWL tool = new RDF2OWL(model);
      tool.run();
      model.write(new DataOutputStream(new
        FileOutputStream(args[1])));

But this what I get on attached ontology:

*****************
[RDF2OWL] Replaced triple [http://www.ibspan.waw.pl/tss/Restaurant#Accessibility
Code, http://www.w3.org/2000/01/rdf-schema#subClassOf, http://www.w3.org/2000/01
/rdf-schema#Resource] with (x, x, owl:Thing)
Exception in thread "main" java.lang.UnsupportedOperationException
        at com.hp.hpl.jena.reasoner.rulesys.impl.LPTopGoalIterator.remove(LPTopG
oalIterator.java:176)
        at com.hp.hpl.jena.util.iterator.WrappedIterator.remove(WrappedIterator.
java:69)
        at com.hp.hpl.jena.util.iterator.WrappedIterator.remove(WrappedIterator.
java:69)
        at com.hp.hpl.jena.util.iterator.WrappedIterator.remove(WrappedIterator.
java:69)
        at com.hp.hpl.jena.util.iterator.FilterIterator.remove(FilterIterator.ja
va:80)
        at com.hp.hpl.jena.util.iterator.WrappedIterator.remove(WrappedIterator.
java:69)
        at com.hp.hpl.jena.util.iterator.WrappedIterator.remove(WrappedIterator.
java:69)
        at com.hp.hpl.jena.rdf.model.impl.StmtIteratorImpl.remove(StmtIteratorIm
pl.java:37)
        at edu.stanford.smi.protegex.owl.jena.rdf2owl.RDF2OWL.convertRDFSResourc
e(RDF2OWL.java:64)
        at edu.stanford.smi.protegex.owl.jena.rdf2owl.RDF2OWL.run(RDF2OWL.java:9
8)
        at tool.rdf2owl.main(rdf2owl.java:27)
*****************

I also tried to rewrite the code to work only with Jena (2.3) but
there arises similar exception with iterator.remove() action.

Best regards,

Maciej

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html