aboutsummaryrefslogtreecommitdiff
path: root/test/uk/ac/ox/cs/pagoda/approx/ClauseTester.java
blob: cff1d1c20460ed76ff6a806c1717b4b7e140419b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package uk.ac.ox.cs.pagoda.approx;

import org.semanticweb.HermiT.model.DLClause;
import org.semanticweb.owlapi.model.OWLOntology;

import uk.ac.ox.cs.pagoda.constraints.NullaryBottom;
import uk.ac.ox.cs.pagoda.owl.OWLHelper;
import uk.ac.ox.cs.pagoda.rules.GeneralProgram;

public class ClauseTester {

	public static void main(String... args) {
		args = new String[] {
//				"/home/yzhou/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/cco-noDPR.ttl", 
				"/home/yzhou/krr-nas-share/Yujiao/ontologies/bio2rdf/reactome/biopax-level3-processed.owl", 
//				"/media/krr-nas-share/Yujiao/ontologies/bio2rdf/atlas/gxaterms.owl", 
//				"/media/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/core-sat-processed.owl",
//				PagodaTester.npd_tbox,
//				"/users/yzhou/temp/ontologies/core.RLor.rdf",
//				"datatype.owl" 
		}; 
		
		String ontoFile = args[0];   
		OWLOntology ontology = OWLHelper.loadOntology(ontoFile);  
		GeneralProgram program = new GeneralProgram();; 
		program.load(ontology, new NullaryBottom());
		program.transform();
		program.save();
		if (program instanceof GeneralProgram) {
			GeneralProgram gp = ((GeneralProgram) program); 
			for (DLClause clause: gp.getClauses()) {
				System.out.println(clause);
				System.out.println(OWLHelper.getOWLAxiom(ontology, clause)); 
			}
		}
	}
	
}