In the best of my knowledge, you can¹t do it with OWL or OWL2(pellet reasoner). You need something like rules or spin-rules.
Miguel On 15/03/14 03:14, "Adeeb Noor" <[email protected]> wrote: >Would someone please help me with the question > >Thanks in advance > > >On Fri, Mar 14, 2014 at 3:04 PM, Adeeb Noor <[email protected]> >wrote: > >> >> Need your advice below please when you have a chance . >> >> Miguel though I need to do it with RuleEngine but in fact I want to do >>the >> work with pellet reasoner. >> >> thanks and sorry for bothering. >> >> >> ---------- Forwarded message ---------- >> From: Adeeb Noor <[email protected]> >> Date: Fri, Mar 14, 2014 at 2:08 AM >> Subject: Jena + pellet Reasoner >> To: "[email protected]" <[email protected]> >> >> >> Hello everyone: >> >> I have been struggling a lot with a problem that I did not find a >>solution >> for, so hopefully guys can guide me or help me with it. >> >> I have my data (rdfs) store in jena tdb as model and my owl (schema) >>using >> protoge. >> >> Here is the code to merge data and schema: >> >> System.out.println("creting infeer dataset "); >> Dataset dataset = TDBFactory.createDataset(data.infereedTDB); >> >> System.out.println("creting OntModel "); >> OntModel Infmodel = >> ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC, >> dataset.getNamedModel(this.URL)); >> >> System.out.println("adding schema (OWL) to OntModel"); >> Infmodel.add(this.owl); >> >> System.out.println("adding data (RDF) to OntModel "); >> Infmodel.add(data.tdb); >> >> System.out.println("creting ModelExtractor "); >> ModelExtractor ext = new ModelExtractor(Infmodel); >> >> dataset.replaceNamedModel(this.URL, ext.extractModel()); >> >> System.out.println("saving infead model"); >> Infmodel.close(); >> System.out.println("closing infeed dataset"); >> dataset.close(); >> >> So I have the ability to store my inferred data into new tdb and to >>reason >> or build any rule based on Literal values . For example: this is one >>triple >> that has UMLS_type as a property and I can group all subjects with two >>or >> more UMLS_types for instance. >> >> ddidd:C0007586 | ddids:label >> | "Cell Cycle" >> ddidd:C0007586 | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | >> ddids:Pathway >> ddidd:C0007586 | ddids:UMLS_type >> | "T043" >> ddidd:C0007586 | >> ddids:x-kegg.pathway | < >> http://identifiers.org/kegg.pathway/hsa04110> >> >> However, as you can see from the triple above I have x-kegg.pathway as >>an >> external uri. By default protoge takes it to be object property. What I >> cannot do is to write a rule for example to group all subject under same >> x-kegg.pathway number since it is external URI. For example, I want to >> create a class called sameKEGG that its members has < >> http://identifiers.org/kegg.pathway/hsa04110> value for example. BTW, I >> can do such a thing easily by SPARQL but I would love to use the >>reasoner >> to make complex rules. >> >> I have been struggling with this for awhile and I frankly appreciate any >> comments or feedback. >> >> -- >> Adeeb Noor >> Ph.D. Candidate >> Dept of Computer Science >> University of Colorado at Boulder >> Cell: 571-484-3303 >> Email: [email protected] >> >> >> >> -- >> Adeeb Noor >> Ph.D. Candidate >> Dept of Computer Science >> University of Colorado at Boulder >> Cell: 571-484-3303 >> Email: [email protected] >> > > > >-- >Adeeb Noor >Ph.D. Candidate >Dept of Computer Science >University of Colorado at Boulder >Cell: 571-484-3303 >Email: [email protected]
