diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-12-08 14:29:35 +0000 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-12-08 14:29:35 +0000 |
commit | 2b0f0d0079484b00a1b788414ff1499282a86aeb (patch) | |
tree | 3e31df8a6fea594b704d2a5013659c9a59483996 /src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala | |
parent | 17285895dec47f4ca05590c861a7e8ef6f595c0c (diff) | |
parent | f8e612288f3a604ee1bd60016b7320f00b763e6b (diff) | |
download | RSAComb-2b0f0d0079484b00a1b788414ff1499282a86aeb.tar.gz RSAComb-2b0f0d0079484b00a1b788414ff1499282a86aeb.zip |
Merge branch 'master' into logger
Diffstat (limited to 'src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala')
-rw-r--r-- | src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala index 79f2ef3..dc64c79 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala | |||
@@ -11,6 +11,7 @@ import org.semanticweb.owlapi.model.{OWLOntology, OWLAxiom, OWLLogicalAxiom} | |||
11 | import org.semanticweb.owlapi.model.{ | 11 | import org.semanticweb.owlapi.model.{ |
12 | OWLClass, | 12 | OWLClass, |
13 | OWLClassExpression, | 13 | OWLClassExpression, |
14 | OWLDataPropertyAssertionAxiom, | ||
14 | OWLObjectProperty, | 15 | OWLObjectProperty, |
15 | OWLSubObjectPropertyOfAxiom, | 16 | OWLSubObjectPropertyOfAxiom, |
16 | OWLObjectPropertyExpression, | 17 | OWLObjectPropertyExpression, |
@@ -35,7 +36,8 @@ import tech.oxfordsemantic.jrdfox.logic.expression.{ | |||
35 | Term, | 36 | Term, |
36 | Variable, | 37 | Variable, |
37 | IRI, | 38 | IRI, |
38 | Resource | 39 | Resource, |
40 | Literal | ||
39 | } | 41 | } |
40 | import tech.oxfordsemantic.jrdfox.logic.sparql.statement.SelectQuery | 42 | import tech.oxfordsemantic.jrdfox.logic.sparql.statement.SelectQuery |
41 | 43 | ||
@@ -122,6 +124,12 @@ class RSAOntology(val ontology: OWLOntology) { | |||
122 | .map(implicits.RDFox.owlapiToRdfoxIri) | 124 | .map(implicits.RDFox.owlapiToRdfoxIri) |
123 | .toList | 125 | .toList |
124 | 126 | ||
127 | val literals: List[Literal] = | ||
128 | abox | ||
129 | .collect { case a: OWLDataPropertyAssertionAxiom => a } | ||
130 | .map(_.getObject) | ||
131 | .map(implicits.RDFox.owlapiToRdfoxLiteral) | ||
132 | |||
125 | val concepts: List[OWLClass] = | 133 | val concepts: List[OWLClass] = |
126 | ontology.getClassesInSignature().asScala.toList | 134 | ontology.getClassesInSignature().asScala.toList |
127 | 135 | ||
@@ -298,7 +306,7 @@ class RSAOntology(val ontology: OWLOntology) { | |||
298 | 306 | ||
299 | def filteringProgram(query: ConjunctiveQuery): FilteringProgram = | 307 | def filteringProgram(query: ConjunctiveQuery): FilteringProgram = |
300 | Logger.timed( | 308 | Logger.timed( |
301 | new FilteringProgram(query, individuals), | 309 | new FilteringProgram(query, individuals ++ literals), |
302 | "Generating filtering program", | 310 | "Generating filtering program", |
303 | Logger.DEBUG | 311 | Logger.DEBUG |
304 | ) | 312 | ) |