diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-11-17 14:19:08 +0000 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-11-17 14:19:08 +0000 |
commit | e1a04294ed8737444e40323474f4084cb64c1d55 (patch) | |
tree | f3464a10152e7df6b7831f11e3d355b34dec1a2c /src/main/scala/rsacomb/RSA.scala | |
parent | e6c211b6a9c497b625710f7b97f793d1a796b461 (diff) | |
download | RSAComb-e1a04294ed8737444e40323474f4084cb64c1d55.tar.gz RSAComb-e1a04294ed8737444e40323474f4084cb64c1d55.zip |
Remove implicit RSAOntology conversion
This was causing problems without giving any significant advantage. Now
it will be easier to refactor classes like RSA, RSAOntology,
CanonicalModel.
Diffstat (limited to 'src/main/scala/rsacomb/RSA.scala')
-rw-r--r-- | src/main/scala/rsacomb/RSA.scala | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/main/scala/rsacomb/RSA.scala b/src/main/scala/rsacomb/RSA.scala index dd09899..b0e140b 100644 --- a/src/main/scala/rsacomb/RSA.scala +++ b/src/main/scala/rsacomb/RSA.scala | |||
@@ -1,13 +1,11 @@ | |||
1 | package rsacomb | 1 | package rsacomb |
2 | 2 | ||
3 | /* Java imports */ | 3 | /* Java imports */ |
4 | import java.io.File | ||
5 | import java.util.Map | 4 | import java.util.Map |
6 | 5 | ||
7 | import tech.oxfordsemantic.jrdfox.formats.SPARQLParser | 6 | import tech.oxfordsemantic.jrdfox.formats.SPARQLParser |
8 | import tech.oxfordsemantic.jrdfox.Prefixes | 7 | import tech.oxfordsemantic.jrdfox.Prefixes |
9 | import tech.oxfordsemantic.jrdfox.logic.expression.{Variable, IRI} | 8 | import tech.oxfordsemantic.jrdfox.logic.expression.{Variable, IRI} |
10 | import org.semanticweb.owlapi.apibinding.OWLManager | ||
11 | import org.semanticweb.owlapi.model.OWLOntology | 9 | import org.semanticweb.owlapi.model.OWLOntology |
12 | import org.semanticweb.owlapi.model.{ | 10 | import org.semanticweb.owlapi.model.{ |
13 | OWLAxiom, | 11 | OWLAxiom, |
@@ -18,7 +16,7 @@ import org.semanticweb.owlapi.model.{ | |||
18 | // Debug only | 16 | // Debug only |
19 | import scala.collection.JavaConverters._ | 17 | import scala.collection.JavaConverters._ |
20 | 18 | ||
21 | object RSA extends RSAOntology with RSAAxiom { | 19 | object RSA extends RSAAxiom { |
22 | 20 | ||
23 | val Prefixes: Prefixes = new Prefixes() | 21 | val Prefixes: Prefixes = new Prefixes() |
24 | Prefixes.declarePrefix(":", "http://example.com/rsa_example.owl#") | 22 | Prefixes.declarePrefix(":", "http://example.com/rsa_example.owl#") |
@@ -28,6 +26,7 @@ object RSA extends RSAOntology with RSAAxiom { | |||
28 | Prefixes.declarePrefix("owl:", "http://www.w3.org/2002/07/owl#") | 26 | Prefixes.declarePrefix("owl:", "http://www.w3.org/2002/07/owl#") |
29 | 27 | ||
30 | val EquivTo: IRI = this.rsa("EquivTo") | 28 | val EquivTo: IRI = this.rsa("EquivTo") |
29 | val Named: IRI = this.rsa("NAMED") | ||
31 | 30 | ||
32 | // Counter used to implement a simple fresh variable generator | 31 | // Counter used to implement a simple fresh variable generator |
33 | private var counter = -1; | 32 | private var counter = -1; |
@@ -61,10 +60,4 @@ object RSA extends RSAOntology with RSAAxiom { | |||
61 | this.hashed(cls1, prop, cls2) | 60 | this.hashed(cls1, prop, cls2) |
62 | } | 61 | } |
63 | 62 | ||
64 | // TODO: move this somewhere else... maybe an OntoUtils class or something. | ||
65 | def loadOntology(onto: File): OWLOntology = { | ||
66 | val manager = OWLManager.createOWLOntologyManager() | ||
67 | manager.loadOntologyFromOntologyDocument(onto) | ||
68 | } | ||
69 | |||
70 | } // object RSA | 63 | } // object RSA |