aboutsummaryrefslogtreecommitdiff
path: root/src/uk/ac/ox/cs/pagoda/rules/GeneralProgram.java
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-10 18:17:06 +0100
committerFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-11 12:34:47 +0100
commit17bd9beaf7f358a44e5bf36a5855fe6727d506dc (patch)
tree47e9310a0cff869d9ec017dcb2c81876407782c8 /src/uk/ac/ox/cs/pagoda/rules/GeneralProgram.java
parent8651164cd632a5db310b457ce32d4fbc97bdc41c (diff)
downloadACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.tar.gz
ACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.zip
[pagoda] Move project to Scala
This commit includes a few changes: - The repository still uses Maven to manage dependency but it is now a Scala project. - The code has been ported from OWLAPI 3.4.10 to 5.1.20 - A proof of concept program using both RSAComb and PAGOdA has been added.
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/rules/GeneralProgram.java')
-rw-r--r--src/uk/ac/ox/cs/pagoda/rules/GeneralProgram.java50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/rules/GeneralProgram.java b/src/uk/ac/ox/cs/pagoda/rules/GeneralProgram.java
deleted file mode 100644
index e390a29..0000000
--- a/src/uk/ac/ox/cs/pagoda/rules/GeneralProgram.java
+++ /dev/null
@@ -1,50 +0,0 @@
1package uk.ac.ox.cs.pagoda.rules;
2
3import org.apache.commons.io.FilenameUtils;
4import org.semanticweb.HermiT.model.DLClause;
5import org.semanticweb.owlapi.model.OWLOntology;
6import uk.ac.ox.cs.pagoda.constraints.UnaryBottom;
7
8import java.util.Collection;
9import java.util.Collections;
10import java.util.Set;
11
12public class GeneralProgram extends Program {
13
14 public GeneralProgram(Set<DLClause> relevantClauses, OWLOntology relevantOntology) {
15 ontology = relevantOntology;
16
17 ontologyDirectory = null;
18// dlOntology = null;
19 botStrategy = new UnaryBottom();
20
21 clauses = botStrategy.process(relevantClauses);
22 }
23
24 public GeneralProgram() {}
25
26 public Collection<DLClause> convert2Clauses(DLClause clause) {
27 return botStrategy.process(Collections.singleton(clause));
28 }
29
30 @Override
31 public String getOutputPath() {
32 return FilenameUtils.concat(getDirectory(), "rules.dlog");
33 }
34
35// @Override
36// public String getDirectory() {
37// File dir = new File(ontologyDirectory + Utility.FILE_SEPARATOR + "general");
38// if (!dir.exists())
39// dir.mkdirs();
40// return dir.getPath();
41// }
42
43 public boolean isHorn() {
44 for (DLClause clause: clauses)
45 if (clause.getHeadLength() > 1)
46 return false;
47 return true;
48 }
49
50}