You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/04 17:48:00 UTC

[jira] [Commented] (RYA-298) Implement rdfs:domain inference

    [ https://issues.apache.org/jira/browse/RYA-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114707#comment-16114707 ] 

ASF GitHub Bot commented on RYA-298:
------------------------------------

GitHub user jessehatfield opened a pull request:

    https://github.com/apache/incubator-rya/pull/197

    RYA-298, RYA-299 Domain/range inference.

    <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
    
      http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
    ## Description
    InferenceEngine: Added a method to query for and infer domain/range schema, incorporating subclass, subproperty, and inverse property information to compute the closure. Extended graph traversal methods to allow traversal in each direction (findParents has the same behavior as before, but is joined by findChildren, both of which call findConnections with a direction parameter).
    
    DomainRangeVisitor: New class rewrites queries for members of a specific defined type to check for domain and range implications as well. Applies to StatementPatterns of the form <?s a Class>, where Class is not a variable, and produces (if domain and/or range exist for that type) a union which includes the original pattern as well.
    
    RdfCloudTripleStoreConnection: Call the DomainRangeVisitor if inference is enabled. Called at the beginning of the sequence of visitors because the original statement is preserved as one branch of the union, so this won't stop other inference rules from being applied in that branch. However, as with the other visitors, the inferred branches of the unions won't be expanded. This means we won't infer the type by applying multiple rules at once (regardless of order of visitor calls), but we will have a union of alternative ways of inferring the type.
    
    ### Tests
    Added tests to: Verify that InferenceEngine loads and infers expected schema (taking into account class hierarchy, property graph, and inverse properties); verify that the visitor produces the expected query tree; and verify that a type query returns the expected results given an ontology.
    
    ### Links
    [RYA-298](https://issues.apache.org/jira/browse/RYA-298)
    [RYA-299](https://issues.apache.org/jira/browse/RYA-299)
    
    ### Checklist
    - [ ] Code Review
    - [ ] Squash Commits
    
    #### People To Reivew
    @meiercaleb 
    @ejwhite922 
    @pujav65
    @amihalik 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jessehatfield/incubator-rya RYA-298-299-domain-range-inference

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-rya/pull/197.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 #197
    
----
commit 36d8f752da4a3c5e8d7ebbbcb790ec0117c790ea
Author: Jesse Hatfield <je...@parsons.com>
Date:   2017-08-04T17:05:45Z

    RYA-298, RYA-299 Domain/range inference.

----


> Implement rdfs:domain inference
> -------------------------------
>
>                 Key: RYA-298
>                 URL: https://issues.apache.org/jira/browse/RYA-298
>             Project: Rya
>          Issue Type: Sub-task
>          Components: sail
>            Reporter: Jesse Hatfield
>            Assignee: Jesse Hatfield
>
> If a predicate has an *{{rdfs:domain}}* of some class, than the subject of any triple including that predicate belongs to the class.
> If the ontology states that {{:advisor}} has the domain of {{:Person}}, then the inference engine should rewrite queries of the form {{?x rdf:type :Person}} to check for resources which have any {{:advisor}} (as well as any specifically stated to have type {{:Person}} ).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)