[Pellet-users] execute SWRL rules

Fani eserral at dsic.upv.es
Wed Jul 9 14:20:34 UTC 2008


Hi Mike,

I've removed all owl:imports statements from the ontology that I didn't need. Now, I can load the ontology, I can add the individual of a Person, but then I can't save the ontology:
   RDFXMLOntologyFormat format=new RDFXMLOntologyFormat();
   manager.saveOntology(ontology, format);
		
it produces an exception java.lang.IllegalStateException: Node is null!. 

If I remove the swrl rule, I can add the individual and save the ontology. 
Any idea?
I've attached my ontology.

Thank you very much.
Regards, 
Fani


 

Exception in thread "main" java.lang.IllegalStateException: Node is null!
    at 
org.coode.owl.rdf.model.AbstractTranslator.getNode(AbstractTranslator.java:867)
    at 
org.coode.owl.rdf.model.AbstractTranslator.addTriple(AbstractTranslator.java:897)
    at 
org.coode.owl.rdf.model.AbstractTranslator.visit(AbstractTranslator.java:666)
    at 
uk.ac.manchester.cs.owl.SWRLObjectPropertyAtomImpl.accept(SWRLObjectPropertyAtomImpl.java:43)
    at 
org.coode.owl.rdf.model.AbstractTranslator.getNode(AbstractTranslator.java:864)
    at 
org.coode.owl.rdf.model.AbstractTranslator.translateList(AbstractTranslator.java:880)
    at 
org.coode.owl.rdf.model.AbstractTranslator.addTriple(AbstractTranslator.java:902)
    at 
org.coode.owl.rdf.model.AbstractTranslator.visit(AbstractTranslator.java:634)
    at uk.ac.manchester.cs.owl.SWRLRuleImpl.accept(SWRLRuleImpl.java:67)
    at 
org.coode.owl.rdf.rdfxml.RDFXMLRenderer.createGraph(RDFXMLRenderer.java:227)
    at 
org.coode.owl.rdf.rdfxml.RDFXMLRenderer.render(RDFXMLRenderer.java:173)
    at 
org.coode.owl.rdf.rdfxml.RDFXMLOntologyStorer.storeOntology(RDFXMLOntologyStorer.java:56)
    at 
uk.ac.manchester.cs.owl.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:347)
    at 
uk.ac.manchester.cs.owl.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:331)
    at 
orgi.mindswap.pellet.examples.EjecucionReglas_fich_separado.executeRules(EjecucionReglas_fich_separado.java:123)
    at 
orgi.mindswap.pellet.examples.EjecucionReglas_fich_separado.main(EjecucionReglas_fich_separado.java:45)


Fani escribió:
> Hi All,
> I'm trying to execute a SWRL rule by using Pellet-1.5 and OWLAPI.
> The swrl rule is: ns_2:isLocated(?x, ?y)  ?  ns_2:mobility(?y, ?z) ? ns_2:WhereCanGo(?x, ?z). This rule find out where a person can go.
>
> To check the rule, I'm trying to add an Person individual with its property /isLocated/
> and then get the values of its property WhereCanGo. 
> I did the same with Protege 3.3.1 and Jess and the rule works well. But using Pellet-1.5 and OWLAPI, when I load the Ontology:
> OWLOntology ontology = manager.loadOntology( URI.create(absolutePath + "ontology_with_rules.owl") );
>
> the exception "org.semanticweb.owl.model.OWLOntologyCreationException: Problem parsing org.semanticweb.owl.io.PhysicalURIInputSource" is produced. 
> Can Anyone help me?
>
>
>
> Thanks in advance.
>
> Regards,
> Fani
>
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ontology_with_rules.owl
Type: text/xml
Size: 8603 bytes
Desc: not available
Url : http://lists.owldl.com/pipermail/pellet-users/attachments/20080709/9a160031/attachment.bin 


More information about the Pellet-users mailing list