Hi everybody, I am trying to execute a Jena Rule using Jena TDB. I have already expertise using Jena rules in Jena SDB but now I was trying using TBD.
The rule inserts an instance in an ontology. The content of jena.rule file has this rule: @prefix pi: <http://www.co-ode.org/ontologies/pizza/2005/10/18/pizza.owl#>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. [AddingPizza: -> (pi:PizzaXXXX rdf:type pi:Pizza) ] The code that I use is the following. Perhaps is something is wrong, please anyone can help me ? Model jenaModel=datasetJena.getDefaultModel(); Reasoner reasoner = new GenericRuleReasoner(Rule.rulesFromURL("file:./src/jena.rule")); InfModel infModel = ModelFactory.createInfModel(reasoner, jenamodel); infModel.prepare(); jenamodel.add(infModel); datasetJena.commit(); TDB.sync(jenamodel); infmodel.close(); datasetJena.commit(); datasetJena.end(); Best regards, Urtza OPTIMA - Optimization Modelling & Analytics Area ICT - European Software Institute Division TECNALIA Parque Tecnológico de Bizkaia, Edificio 700 C/ Geldo. E-48160 Derio- Bizkaia (Spain) Mobile: 664 00 21 51 Telephone: 902 760 002 / 946 430 850 (International calls) [email protected]<mailto:[email protected]> www.tecnalia.com<http://www.tecnalia.com/>
