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

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

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

    https://github.com/apache/incubator-rya/pull/174#discussion_r127007411
  
    --- Diff: 
sail/src/main/java/org/apache/rya/rdftriplestore/RdfCloudTripleStoreConnection.java
 ---
    @@ -345,6 +346,7 @@ protected void commitInternal() throws SailException {
                         && this.inferenceEngine != null
                         ) {
                     try {
    --- End diff --
    
    Yeah, this is a general issue with Rya's approach to inference (for 
example, TransitivePropertyVisitor is applied before SubPropertyOfVisitor and 
SameAsVisitor, and any expansion produced by any of the three will be passed 
over by the others). In this case, since the original statement is preserved as 
one branch of the union, there's no conflict as long as the HasValueVisitor is 
applied first. In cases where there is a conflict, keep in mind that it only 
manifests when both inference rules in question actually would apply to the 
same query (e.g. if hasAncestor is transitive, and is a subproperty of 
hasRelative, and the data says A hasAncestor B has Ancestor C hasAncestor D, I 
don't believe a query for "?x hasRelative D" will return A). A related 
limitation is that each visitor only applies once, even if another visitor 
later produces an expansion that would be relevant. For example, if p1 and p2 
are inverse properties, and we have a hasValue condition for p1, queries for p2 
won't trigger the hasValue expansion.


> Implement owl:hasValue inference
> --------------------------------
>
>                 Key: RYA-291
>                 URL: https://issues.apache.org/jira/browse/RYA-291
>             Project: Rya
>          Issue Type: Sub-task
>          Components: sail
>            Reporter: Jesse Hatfield
>            Assignee: Jesse Hatfield
>
> *{{owl:hasValue}}* is used to define a property restriction representing the 
> set of resources with a specific value for a specific predicate.
> If the ontology states that the class {{:ChildOfJohn}} represents all 
> resources with {{:parent}} equal to {{:John}}, then the inference engine 
> should be able to:
> 1. Rewrite a query pattern {{?X rdf:type :ChildOfJohn}} to check for 
> resources whose {{:parent}} is {{:John}} (in addition to those explicitly 
> stated to have type {{:ChildOfJohn}})
> 2. Rewrite a query pattern {{:Jane :parent :?Y}} to check whether :Jane has 
> the type {{:ChildOfJohn}} (in addition to querying for any specifically 
> stated {{:parent}} s)



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

Reply via email to