diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-08-19 11:33:40 +0100 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-08-19 11:33:40 +0100 |
commit | 50f5cd42f73b655d7d349eef70e5c269826429f9 (patch) | |
tree | c55081e07fc4246b210170eee55dc4dd96a1df93 /src/main/scala/rsacomb/RSA.scala | |
parent | 3a166085e656be5f957423e6e371b6647b313997 (diff) | |
download | RSAComb-50f5cd42f73b655d7d349eef70e5c269826429f9.tar.gz RSAComb-50f5cd42f73b655d7d349eef70e5c269826429f9.zip |
Generalise prefixes
Diffstat (limited to 'src/main/scala/rsacomb/RSA.scala')
-rw-r--r-- | src/main/scala/rsacomb/RSA.scala | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/main/scala/rsacomb/RSA.scala b/src/main/scala/rsacomb/RSA.scala index 1fa0fc1..79617c7 100644 --- a/src/main/scala/rsacomb/RSA.scala +++ b/src/main/scala/rsacomb/RSA.scala | |||
@@ -2,17 +2,26 @@ package rsacomb | |||
2 | 2 | ||
3 | /* Java imports */ | 3 | /* Java imports */ |
4 | import java.io.File | 4 | import java.io.File |
5 | import java.util.Map | ||
5 | 6 | ||
7 | import tech.oxfordsemantic.jrdfox.Prefixes | ||
8 | import tech.oxfordsemantic.jrdfox.logic.IRI | ||
6 | import org.semanticweb.owlapi.apibinding.OWLManager | 9 | import org.semanticweb.owlapi.apibinding.OWLManager |
7 | import org.semanticweb.owlapi.model.OWLOntology | 10 | import org.semanticweb.owlapi.model.OWLOntology |
8 | 11 | ||
9 | object RSA extends RSAOntology { | 12 | object RSA extends RSAOntology { |
10 | 13 | ||
11 | val PrefixBase = "http://example.com/rsa_example.owl#" | 14 | val Prefixes = new Prefixes() |
12 | val PrefixInternal = "http://127.0.0.1/" | 15 | Prefixes.declarePrefix(":", "http://example.com/rsa_example.owl#") |
13 | val PredicatePE = PrefixInternal + "PE" | 16 | Prefixes.declarePrefix("internal:", "http://127.0.0.1/") |
14 | val PredicateU = PrefixInternal + "U" | 17 | Prefixes.declarePrefix("rdf:", "http://www.w3.org/1999/02/22-rdf-syntax-ns#") |
15 | val PredicateE = PrefixInternal + "E" | 18 | Prefixes.declarePrefix("rdfs:", "http://www.w3.org/2000/01/rdf-schema#") |
19 | Prefixes.declarePrefix("owl:", "http://www.w3.org/2002/07/owl#") | ||
20 | |||
21 | def internal(name: String): IRI = | ||
22 | IRI.create( | ||
23 | Prefixes.getPrefixIRIsByPrefixName.get("internal:").getIRI + name | ||
24 | ) | ||
16 | 25 | ||
17 | // TODO: move this somewhere else... maybe an OntoUtils class or something. | 26 | // TODO: move this somewhere else... maybe an OntoUtils class or something. |
18 | def loadOntology(onto: File): OWLOntology = { | 27 | def loadOntology(onto: File): OWLOntology = { |