aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala
diff options
context:
space:
mode:
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.scala26
1 files changed, 12 insertions, 14 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 82da9df..8e5169d 100644
--- a/src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala
+++ b/src/main/scala/uk/ac/ox/cs/rsacomb/Main.scala
@@ -10,6 +10,10 @@ import tech.oxfordsemantic.jrdfox.logic.sparql.statement.SelectQuery
10import util.{Logger, RDFoxUtil, RSA} 10import util.{Logger, RDFoxUtil, RSA}
11import sparql.ConjunctiveQuery 11import sparql.ConjunctiveQuery
12 12
13import uk.ac.ox.cs.rsacomb.ontology.Ontology
14import uk.ac.ox.cs.rsacomb.converter.Normalizer
15import uk.ac.ox.cs.rsacomb.approximation.LowerBound
16
13case class RSAOption[+T](opt: T) { 17case class RSAOption[+T](opt: T) {
14 def get[T]: T = opt.asInstanceOf[T] 18 def get[T]: T = opt.asInstanceOf[T]
15} 19}
@@ -103,24 +107,18 @@ object RSAConfig {
103/** Main entry point to the program */ 107/** Main entry point to the program */
104object RSAComb extends App { 108object RSAComb extends App {
105 109
106 /*
107 * TODO: Aiming for this workflow:
108 *
109 * implicit val manager = new Manager(...)
110 * val original = manager.importFromFile("ontology.owl")
111 * val axioms = original.getAxioms.filter(isLogicalAxiom).normalize(normalizer)
112 * val ontology = new Ontology(axioms, data)
113 * val rsa = ontology.toRSA(approximator)
114 */
115
116 /* Command-line options */ 110 /* Command-line options */
117 val config = RSAConfig.parse(args.toList) 111 val config = RSAConfig.parse(args.toList)
118 112
119 val rsa = RSAOntology( 113 /* Load original ontology and normalize it */
114 val ontology = Ontology(
120 config('ontology).get[File], 115 config('ontology).get[File],
121 config('data).get[List[File]], 116 config('data).get[List[File]]
122 None 117 ).normalize(new Normalizer)
123 ) 118
119 /* Approximate the ontology to RSA */
120 val toRSA = new LowerBound
121 val rsa = ontology approximate toRSA
124 122
125 if (config contains 'query) { 123 if (config contains 'query) {
126 val query = 124 val query =