diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2021-01-21 11:01:02 +0000 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2021-01-21 17:03:59 +0000 |
commit | 5a7c5b14a825d940956040541e127bc62f22fe6f (patch) | |
tree | b4e0d636d5ee35b49d1f37622215d76459ed0c33 /src/main/scala/uk/ac/ox/cs/rsacomb/converter | |
parent | 35f41c0529f65c4b3ee941e087d497a931d17d9e (diff) | |
download | RSAComb-5a7c5b14a825d940956040541e127bc62f22fe6f.tar.gz RSAComb-5a7c5b14a825d940956040541e127bc62f22fe6f.zip |
Fix support for a few axiom types.
Namely:
+ OWLEquivalentClassesAxiom
+ OWLFunctionalObjectPropertyAxiom
+ OWLInverseFunctionalObjectPropertyAxiom
Diffstat (limited to 'src/main/scala/uk/ac/ox/cs/rsacomb/converter')
-rw-r--r-- | src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxConverter.scala | 41 |
1 files changed, 10 insertions, 31 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxConverter.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxConverter.scala index 845ec1f..e3c44c6 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxConverter.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxConverter.scala | |||
@@ -1,35 +1,7 @@ | |||
1 | package uk.ac.ox.cs.rsacomb.converter | 1 | package uk.ac.ox.cs.rsacomb.converter |
2 | 2 | ||
3 | import java.util.stream.Collectors | 3 | import java.util.stream.Collectors |
4 | import org.semanticweb.owlapi.model.{ | 4 | import org.semanticweb.owlapi.model._ |
5 | OWLAnnotationProperty, | ||
6 | OWLLogicalAxiom, | ||
7 | OWLClass, | ||
8 | OWLClassAssertionAxiom, | ||
9 | OWLClassExpression, | ||
10 | OWLDataProperty, | ||
11 | OWLDataPropertyAssertionAxiom, | ||
12 | OWLDataPropertyDomainAxiom, | ||
13 | OWLDataPropertyExpression, | ||
14 | OWLDataSomeValuesFrom, | ||
15 | OWLEquivalentClassesAxiom, | ||
16 | OWLEquivalentObjectPropertiesAxiom, | ||
17 | OWLInverseObjectPropertiesAxiom, | ||
18 | OWLNamedIndividual, | ||
19 | OWLObjectIntersectionOf, | ||
20 | OWLObjectInverseOf, | ||
21 | OWLObjectMaxCardinality, | ||
22 | OWLObjectOneOf, | ||
23 | OWLObjectProperty, | ||
24 | OWLObjectPropertyAssertionAxiom, | ||
25 | OWLObjectPropertyDomainAxiom, | ||
26 | OWLObjectPropertyExpression, | ||
27 | OWLObjectPropertyRangeAxiom, | ||
28 | OWLObjectSomeValuesFrom, | ||
29 | OWLPropertyExpression, | ||
30 | OWLSubClassOfAxiom, | ||
31 | OWLSubObjectPropertyOfAxiom | ||
32 | } | ||
33 | import scala.collection.JavaConverters._ | 5 | import scala.collection.JavaConverters._ |
34 | import tech.oxfordsemantic.jrdfox.logic.datalog.{ | 6 | import tech.oxfordsemantic.jrdfox.logic.datalog.{ |
35 | BindAtom, | 7 | BindAtom, |
@@ -120,9 +92,7 @@ trait RDFoxConverter { | |||
120 | * - [[org.semanticweb.owlapi.model.OWLDisjointUnionAxiom OWLDisjointUnionAxiom]] | 92 | * - [[org.semanticweb.owlapi.model.OWLDisjointUnionAxiom OWLDisjointUnionAxiom]] |
121 | * - [[org.semanticweb.owlapi.model.OWLEquivalentDataPropertiesAxiom OWLEquivalentDataPropertiesAxiom]] | 93 | * - [[org.semanticweb.owlapi.model.OWLEquivalentDataPropertiesAxiom OWLEquivalentDataPropertiesAxiom]] |
122 | * - [[org.semanticweb.owlapi.model.OWLFunctionalDataPropertyAxiom OWLFunctionalDataPropertyAxiom]] | 94 | * - [[org.semanticweb.owlapi.model.OWLFunctionalDataPropertyAxiom OWLFunctionalDataPropertyAxiom]] |
123 | * - [[org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom OWLFunctionalObjectPropertyAxiom]] | ||
124 | * - [[org.semanticweb.owlapi.model.OWLHasKeyAxiom OWLHasKeyAxiom]] | 95 | * - [[org.semanticweb.owlapi.model.OWLHasKeyAxiom OWLHasKeyAxiom]] |
125 | * - [[org.semanticweb.owlapi.model.OWLInverseFunctionalObjectPropertyAxiom OWLInverseFunctionalObjectPropertyAxiom]] | ||
126 | * - [[org.semanticweb.owlapi.model.OWLIrreflexiveObjectPropertyAxiom OWLIrreflexiveObjectPropertyAxiom]] | 96 | * - [[org.semanticweb.owlapi.model.OWLIrreflexiveObjectPropertyAxiom OWLIrreflexiveObjectPropertyAxiom]] |
127 | * - [[org.semanticweb.owlapi.model.OWLNegativeDataPropertyAssertionAxiom OWLNegativeDataPropertyAssertionAxiom]] | 97 | * - [[org.semanticweb.owlapi.model.OWLNegativeDataPropertyAssertionAxiom OWLNegativeDataPropertyAssertionAxiom]] |
128 | * - [[org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom OWLNegativeObjectPropertyAssertionAxiom]] | 98 | * - [[org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom OWLNegativeObjectPropertyAssertionAxiom]] |
@@ -190,6 +160,9 @@ trait RDFoxConverter { | |||
190 | case a: OWLDataPropertyDomainAxiom => | 160 | case a: OWLDataPropertyDomainAxiom => |
191 | convert(a.asOWLSubClassOfAxiom, term, unsafe, skolem, suffix) | 161 | convert(a.asOWLSubClassOfAxiom, term, unsafe, skolem, suffix) |
192 | 162 | ||
163 | case a: OWLDataPropertyRangeAxiom => | ||
164 | Result() // ignored | ||
165 | |||
193 | case a: OWLInverseObjectPropertiesAxiom => { | 166 | case a: OWLInverseObjectPropertiesAxiom => { |
194 | val (atoms, rules) = a.asSubObjectPropertyOfAxioms | 167 | val (atoms, rules) = a.asSubObjectPropertyOfAxioms |
195 | .map(a => convert(a, term, unsafe, skolem dup a, suffix)) | 168 | .map(a => convert(a, term, unsafe, skolem dup a, suffix)) |
@@ -197,6 +170,12 @@ trait RDFoxConverter { | |||
197 | (atoms.flatten, rules.flatten) | 170 | (atoms.flatten, rules.flatten) |
198 | } | 171 | } |
199 | 172 | ||
173 | case a: OWLFunctionalObjectPropertyAxiom => | ||
174 | convert(a.asOWLSubClassOfAxiom, term, unsafe, skolem, suffix) | ||
175 | |||
176 | case a: OWLInverseFunctionalObjectPropertyAxiom => | ||
177 | convert(a.asOWLSubClassOfAxiom, term, unsafe, skolem, suffix) | ||
178 | |||
200 | case a: OWLClassAssertionAxiom => { | 179 | case a: OWLClassAssertionAxiom => { |
201 | val ind = a.getIndividual | 180 | val ind = a.getIndividual |
202 | ind match { | 181 | ind match { |