diff options
| author | yzhou <yujiao.zhou@gmail.com> | 2015-04-21 10:34:27 +0100 |
|---|---|---|
| committer | yzhou <yujiao.zhou@gmail.com> | 2015-04-21 10:34:27 +0100 |
| commit | 9ce65c5a963b03ee97fe9cb6c5aa65a3c04a80a8 (patch) | |
| tree | 47511c0fb89dccff0db4b5990522e04f294d795b /test/uk/ac/ox/cs/pagoda/approx/ClauseTester.java | |
| parent | b1ac207612ee8b045244253fb94b866104bc34f2 (diff) | |
| download | ACQuA-9ce65c5a963b03ee97fe9cb6c5aa65a3c04a80a8.tar.gz ACQuA-9ce65c5a963b03ee97fe9cb6c5aa65a3c04a80a8.zip | |
initial version
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/approx/ClauseTester.java')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/approx/ClauseTester.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/approx/ClauseTester.java b/test/uk/ac/ox/cs/pagoda/approx/ClauseTester.java new file mode 100644 index 0000000..cff1d1c --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/approx/ClauseTester.java | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.approx; | ||
| 2 | |||
| 3 | import org.semanticweb.HermiT.model.DLClause; | ||
| 4 | import org.semanticweb.owlapi.model.OWLOntology; | ||
| 5 | |||
| 6 | import uk.ac.ox.cs.pagoda.constraints.NullaryBottom; | ||
| 7 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; | ||
| 8 | import uk.ac.ox.cs.pagoda.rules.GeneralProgram; | ||
| 9 | |||
| 10 | public class ClauseTester { | ||
| 11 | |||
| 12 | public static void main(String... args) { | ||
| 13 | args = new String[] { | ||
| 14 | // "/home/yzhou/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/cco-noDPR.ttl", | ||
| 15 | "/home/yzhou/krr-nas-share/Yujiao/ontologies/bio2rdf/reactome/biopax-level3-processed.owl", | ||
| 16 | // "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/atlas/gxaterms.owl", | ||
| 17 | // "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/core-sat-processed.owl", | ||
| 18 | // PagodaTester.npd_tbox, | ||
| 19 | // "/users/yzhou/temp/ontologies/core.RLor.rdf", | ||
| 20 | // "datatype.owl" | ||
| 21 | }; | ||
| 22 | |||
| 23 | String ontoFile = args[0]; | ||
| 24 | OWLOntology ontology = OWLHelper.loadOntology(ontoFile); | ||
| 25 | GeneralProgram program = new GeneralProgram();; | ||
| 26 | program.load(ontology, new NullaryBottom()); | ||
| 27 | program.transform(); | ||
| 28 | program.save(); | ||
| 29 | if (program instanceof GeneralProgram) { | ||
| 30 | GeneralProgram gp = ((GeneralProgram) program); | ||
| 31 | for (DLClause clause: gp.getClauses()) { | ||
| 32 | System.out.println(clause); | ||
| 33 | System.out.println(OWLHelper.getOWLAxiom(ontology, clause)); | ||
| 34 | } | ||
| 35 | } | ||
| 36 | } | ||
| 37 | |||
| 38 | } | ||
