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

    https://github.com/apache/incubator-rya/pull/209#discussion_r135155573
  
    --- Diff: 
sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java 
---
    @@ -762,6 +800,57 @@ public void handleStatement(final Statement statement) 
throws RDFHandlerExceptio
         }
     
         /**
    +     * For a given type, return any properties and values such that 
owl:hasSelf restrictions on
    +     * those properties could imply this type. No matter how many 
restrictions are returned, each
    +     * one is considered individually sufficient: if a resource has the 
property and the value, then
    +     * it belongs to the provided type. Takes type hierarchy into account, 
so the value may imply a
    +     * subtype which in turn implies the provided type.
    +     * @param type The type (URI or bnode) to check against the known 
restrictions
    +     * @return For each relevant property, a set of values such that 
whenever a resource has that
    +     *      value for that property, it is implied to belong to the type.
    +     */
    +    public Set<URI> getHasSelfImplyingType(final Resource type){
    +        // return properties that imply this type if reflexive
    +        final Set<URI> properties = new HashSet<>();
    +        properties.addAll(hasSelfByType.get(type));
    +        //findParent gets all subclasses, add self.
    +        if (type instanceof URI) {
    +            for (final URI subtype : findParents(subClassOfGraph, (URI) 
type)) {
    +                properties.addAll(hasSelfByType.get(subtype));
    --- End diff --
    
    Same issue here -- should only addAll if we're sure that 
hasSelfByType.get(subtype) returned non-null


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to