aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala
diff options
context:
space:
mode:
authorFederico Igne <git@federicoigne.com>2021-07-27 10:30:07 +0100
committerFederico Igne <git@federicoigne.com>2021-07-27 10:30:07 +0100
commit7d619706551117a485d93d0d6847a25afa6a359d (patch)
treec26aeb7024b1f2c9288983b78dfc7223094df6d6 /src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala
parent79ca4d0b3fe7df238bede90b96226e72707d05b7 (diff)
downloadRSAComb-7d619706551117a485d93d0d6847a25afa6a359d.tar.gz
RSAComb-7d619706551117a485d93d0d6847a25afa6a359d.zip
Rework class structure to match more general workflow
The major change is the introduction of a new class Ontology (superclass of RSAOntology) that contains all those operation that we would like to perform on *any* OWL 2 ontology. Approximation is also generic on the return type, allowing for example intermediate steps (or chaining of approximations).
Diffstat (limited to 'src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala')
-rw-r--r--src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala
index 8e5169d..713a9e8 100644
--- a/src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala
+++ b/src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala
@@ -131,18 +131,18 @@ object RSAComb extends App {
131 Logger.print(s"$answers", Logger.VERBOSE) 131 Logger.print(s"$answers", Logger.VERBOSE)
132 Logger print s"Number of answers: ${answers.length} (${answers.lengthWithMultiplicity})" 132 Logger print s"Number of answers: ${answers.length} (${answers.lengthWithMultiplicity})"
133 // Retrieve unfiltered answers 133 // Retrieve unfiltered answers
134 val unfiltered = rsa.queryDataStore( 134 // val unfiltered = rsa.queryDataStore(
135 """ 135 // """
136 SELECT (count(?K) as ?COUNT) 136 // SELECT (count(?K) as ?COUNT)
137 WHERE { 137 // WHERE {
138 ?K a rsa:QM . 138 // ?K a rsa:QM .
139 } 139 // }
140 """, 140 // """,
141 RSA.Prefixes 141 // RSA.Prefixes
142 ) 142 // )
143 unfiltered.foreach((u) => 143 // unfiltered.foreach((u) =>
144 Logger print s"Number of unfiltered answers: ${u.head._2}" 144 // Logger print s"Number of unfiltered answers: ${u.head._2}"
145 ) 145 // )
146 } 146 }
147 case None => 147 case None =>
148 throw new RuntimeException("Submitted query is not conjunctive") 148 throw new RuntimeException("Submitted query is not conjunctive")