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

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

Github user ejwhite922 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/206#discussion_r133567576
  
    --- Diff: 
sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java 
---
    @@ -416,22 +425,131 @@ private void 
refreshHasValueRestrictions(Map<Resource, URI> restrictions) throws
             }
         }
     
    -    private static Vertex getVertex(Graph graph, Object id) {
    -        Iterator<Vertex> it = graph.vertices(id.toString());
    +    private void refreshIntersectionOf() throws QueryEvaluationException {
    +        final Map<Resource, List<Set<Resource>>> intersectionsProp = new 
HashMap<>();
    +
    +        // First query for all the owl:intersectionOf's.
    +        // If we have the following intersectionOf:
    +        // :A owl:intersectionOf[:B, :C]
    +        // It will be represented by triples following a pattern similar 
to:
    +        // <:A> owl:intersectionOf _:bnode1 .
    +        //  _:bnode1 rdf:first <:B> .
    +        //  _:bnode1 rdf:rest _:bnode2 .
    +        // _:bnode2 rdf:first <:C> .
    +        // _:bnode2 rdf:rest rdf:nil .
    --- End diff --
    
    You're welcome


> Implement owl:intersectionOf inference
> --------------------------------------
>
>                 Key: RYA-292
>                 URL: https://issues.apache.org/jira/browse/RYA-292
>             Project: Rya
>          Issue Type: Sub-task
>          Components: sail
>            Reporter: Jesse Hatfield
>            Assignee: Eric White
>
> An *{{owl:intersectionOf}}* expression defines the set of resources who 
> belong to all of a particular set of classes.
> A basic implementation, if the ontology states that {{:Mother}} is the 
> intersection of {{:Parent}} and {{:Woman}}, should cause the inference engine 
> to:
> 1. Rewrite query patterns {{?x rdf:type :Mother}} (the intersection type) to 
> check for resources that have both types {{:Parent}} and {{:Woman}} (as well 
> as check for resources that are explicitly stated to be {{:Mother}} s)
> 2. Rewrite query patterns {{?y rdf:type :Parent}} (one of the intersecting 
> sets) to check for resources that are stated to be either {{:Mother}} or 
> {{:Parent}} , since belonging to the intersection type implies membership in 
> the component types. (Equivalent logic applies to {{Woman}} )



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

Reply via email to