aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala
diff options
context:
space:
mode:
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.scala12
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}
11import org.semanticweb.owlapi.model.{ 11import 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}
40import tech.oxfordsemantic.jrdfox.logic.sparql.statement.SelectQuery 42import 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 )