aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2020-12-08 12:22:56 +0000
committerFederico Igne <federico.igne@cs.ox.ac.uk>2020-12-08 12:22:56 +0000
commitc3ff5305c30cdf31755972df4c3dc554d5246ae9 (patch)
treeccc7836dff048e1dc2f0bdac6c5644a9c7fe7a25 /src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala
parentd24365ffde5cf402c173901e3ffdd05c6c786edc (diff)
downloadRSAComb-c3ff5305c30cdf31755972df4c3dc554d5246ae9.tar.gz
RSAComb-c3ff5305c30cdf31755972df4c3dc554d5246ae9.zip
Include literals in instances of `Named` internal predicate
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 7b4b142..0fb6c96 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
@@ -117,6 +119,12 @@ class RSAOntology(val ontology: OWLOntology) {
117 .map(implicits.RDFox.owlapiToRdfoxIri) 119 .map(implicits.RDFox.owlapiToRdfoxIri)
118 .toList 120 .toList
119 121
122 val literals: List[Literal] =
123 abox
124 .collect { case a: OWLDataPropertyAssertionAxiom => a }
125 .map(_.getObject)
126 .map(implicits.RDFox.owlapiToRdfoxLiteral)
127
120 val concepts: List[OWLClass] = 128 val concepts: List[OWLClass] =
121 ontology.getClassesInSignature().asScala.toList 129 ontology.getClassesInSignature().asScala.toList
122 130
@@ -288,7 +296,7 @@ class RSAOntology(val ontology: OWLOntology) {
288 } 296 }
289 297
290 def filteringProgram(query: ConjunctiveQuery): FilteringProgram = 298 def filteringProgram(query: ConjunctiveQuery): FilteringProgram =
291 new FilteringProgram(query, individuals) 299 new FilteringProgram(query, individuals ++ literals)
292 300
293 lazy val canonicalModel = new CanonicalModel(this) 301 lazy val canonicalModel = new CanonicalModel(this)
294 302