diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-12-06 12:14:07 +0000 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-12-06 12:14:07 +0000 |
commit | 3362dd371ddcac7d60b4f64ddacb83c7d5b0a21e (patch) | |
tree | 76875bbcacee37ec28975321c748f226637a2807 /src/main/scala/uk/ac/ox/cs/rsacomb/converter | |
parent | 9dd3da94d106fed295ab7bef167f35fab0050d95 (diff) | |
download | RSAComb-3362dd371ddcac7d60b4f64ddacb83c7d5b0a21e.tar.gz RSAComb-3362dd371ddcac7d60b4f64ddacb83c7d5b0a21e.zip |
Add support for data property assertion axioms (OWLDataPropertyAssertionAxiom)
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 | 15 |
1 files changed, 15 insertions, 0 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 4f4df26..6c83caf 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 | |||
@@ -8,6 +8,7 @@ import org.semanticweb.owlapi.model.{ | |||
8 | OWLClassAssertionAxiom, | 8 | OWLClassAssertionAxiom, |
9 | OWLClassExpression, | 9 | OWLClassExpression, |
10 | OWLDataProperty, | 10 | OWLDataProperty, |
11 | OWLDataPropertyAssertionAxiom, | ||
11 | OWLDataPropertyDomainAxiom, | 12 | OWLDataPropertyDomainAxiom, |
12 | OWLDataPropertyExpression, | 13 | OWLDataPropertyExpression, |
13 | OWLDataSomeValuesFrom, | 14 | OWLDataSomeValuesFrom, |
@@ -219,6 +220,20 @@ trait RDFoxConverter { | |||
219 | ResultF(List(prop)) | 220 | ResultF(List(prop)) |
220 | } | 221 | } |
221 | 222 | ||
223 | /** Data property assertion. | ||
224 | * | ||
225 | * @see [[org.semanticweb.owlapi.model.OWLDataPropertyAssertionAxiom OWLDataPropertyAssertionAxiom]] | ||
226 | */ | ||
227 | case a: OWLDataPropertyAssertionAxiom => | ||
228 | if (!a.getSubject.isNamed || !a.getObject.isNamed) | ||
229 | Result() | ||
230 | else { | ||
231 | val subj = a.getSubject.asOWLNamedIndividual.getIRI | ||
232 | val obj = a.getObject | ||
233 | val prop = convert(a.getProperty, subj, obj, suffix) | ||
234 | ResultF(List(prop)) | ||
235 | } | ||
236 | |||
222 | /** Catch-all case for all unhandled axiom types. */ | 237 | /** Catch-all case for all unhandled axiom types. */ |
223 | case a => | 238 | case a => |
224 | throw new RuntimeException( | 239 | throw new RuntimeException( |