aboutsummaryrefslogtreecommitdiff
path: root/src/uk/ac/ox/cs/pagoda/approx/Clausifier.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/approx/Clausifier.java')
-rw-r--r--src/uk/ac/ox/cs/pagoda/approx/Clausifier.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/approx/Clausifier.java b/src/uk/ac/ox/cs/pagoda/approx/Clausifier.java
new file mode 100644
index 0000000..ee23def
--- /dev/null
+++ b/src/uk/ac/ox/cs/pagoda/approx/Clausifier.java
@@ -0,0 +1,37 @@
1package uk.ac.ox.cs.pagoda.approx;
2
3import java.util.HashMap;
4import java.util.HashSet;
5import java.util.Set;
6
7import org.semanticweb.HermiT.model.DLClause;
8import org.semanticweb.owlapi.model.OWLDataFactory;
9import org.semanticweb.owlapi.model.OWLDataProperty;
10import org.semanticweb.owlapi.model.OWLOntology;
11
12public class Clausifier {
13
14 OWLDataFactory factory;
15 Set<String> dataProperties = new HashSet<String>();
16
17 private Clausifier(OWLOntology ontology) {
18 factory = ontology.getOWLOntologyManager().getOWLDataFactory();
19 for (OWLDataProperty dataProperty: ontology.getDataPropertiesInSignature(true))
20 dataProperties.add(dataProperty.toStringID());
21 }
22
23 public Clause clasuify(DLClause clause) {
24 return new Clause(this, clause);
25 }
26
27 private static HashMap<OWLOntology, Clausifier> AllInstances = new HashMap<OWLOntology, Clausifier>();
28
29 public static Clausifier getInstance(OWLOntology onto) {
30 Clausifier c = AllInstances.get(onto);
31 if (c != null) return c;
32 c = new Clausifier(onto);
33 AllInstances.put(onto, c);
34 return c;
35 }
36
37}