GitHub user ejwhite922 opened a pull request:
https://github.com/apache/incubator-rya/pull/215
RYA-300 Added owl:oneOf inference.
## Description
Inference applies owl:oneOf semantics for queries including statement
patterns of the form "?x rdf:type :DefinedClass".
OWL provides a construct for defining a range of data values, namely an
enumerated datatype. This datatype format makes use of the owl:oneOf construct,
that is also used for describing an enumerated class. In the case of an
enumerated datatype, the subject of owl:oneOf is a blank node of class
owl:DataRange and the object is a list of literals. Unfortunately, we cannot
use the rdf:parseType="Collection" idiom for specifying the literal list,
because RDF requires the collection to be a list of RDF node elements.
Therefore we have to specify the list of data values with the basic list
constructs rdf:first, rdf:rest and rdf:nil.
The InferenceEngine, at refresh time, stores information about owl:oneOf.
It stores a mapping of each type that has an enumeration. These mapped
definitions can then be accessed by the method: getEnumeration(Resource).
OneOfVisitor processes statement patterns of the form "?x rdf:type :T2",
and if :T2 is the value type for any owl:oneOf restriction according to the
inference engine, it replaces the statement pattern with a binding set
assignment of all the enumeration items
RdfCloudTripleStoreConnection calls the visitor along with the other
inference logic.
Added a simple example of a query that relies on this inference to
MongoRyaDirectExample.
### Tests
Unit tests
### Links
[Jira](https://issues.apache.org/jira/browse/RYA-300)
### Checklist
- [ ] Code Review
- [ ] Squash Commits
#### People To Review
@jessehatfield
@meiercaleb
@isper3at
@pujav65
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ejwhite922/incubator-rya
RYA-300_OneOfInference
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-rya/pull/215.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #215
----
commit 825f1af7e1f9c84b46c02243aa358201cb786b4b
Author: eric.white <[email protected]>
Date: 2017-08-23T15:08:58Z
RYA-300 Added owl:oneOf inference.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---