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

    https://github.com/apache/incubator-rya/pull/215#discussion_r134867088
  
    --- Diff: extras/indexingExample/src/main/java/MongoRyaDirectExample.java 
---
    @@ -572,6 +573,108 @@ public static void testAllValuesFromInference(final 
SailRepositoryConnection con
             Validate.isTrue(resultHandler.getCount() == 2);
         }
     
    +    public static void testOneOfInference(final SailRepositoryConnection 
conn, final Sail sail) throws MalformedQueryException, RepositoryException, 
UpdateExecutionException, QueryEvaluationException, 
TupleQueryResultHandlerException, InferenceEngineException {
    +        log.info("Adding Data");
    +        final String instances = "INSERT DATA"
    +                + "{ GRAPH <http://updated/test> {\n"
    +                + "  <urn:FlopCard1> a <urn:Card> . \n"
    +                + "    <urn:FlopCard1> <urn:HasRank> <urn:Ace> . \n"
    +                + "    <urn:FlopCard1> <urn:HasSuit> <urn:Diamonds> . \n"
    +                + "  <urn:FlopCard2> a <urn:Card> . \n"
    +                + "    <urn:FlopCard2> <urn:HasRank> <urn:Ace> . \n"
    +                + "    <urn:FlopCard2> <urn:HasSuit> <urn:Hearts> . \n"
    +                + "  <urn:FlopCard3> a <urn:Card> . \n"
    +                + "    <urn:FlopCard3> <urn:HasRank> <urn:King> . \n"
    +                + "    <urn:FlopCard3> <urn:HasSuit> <urn:Spades> . \n"
    +                + "  <urn:TurnCard> a <urn:Card> . \n"
    +                + "    <urn:TurnCard> <urn:HasRank> <urn:10> . \n"
    +                + "    <urn:TurnCard> <urn:HasSuit> <urn:Clubs> . \n"
    +                + "  <urn:RiverCard> a <urn:Card> . \n"
    +                + "    <urn:RiverCard> <urn:HasRank> <urn:Queen> . \n"
    +                + "    <urn:RiverCard> <urn:HasSuit> <urn:Hearts> . \n"
    +                + "}}";
    +        Update update = conn.prepareUpdate(QueryLanguage.SPARQL, 
instances);
    +        update.execute();
    +        final String inferQuery = "select distinct ?card { GRAPH 
<http://updated/test> { ?card a <urn:Card> . ?suit a <urn:Suits> . ?card 
<urn:HasSuit> ?suit} } \n";
    +        final String explicitQuery = "select distinct ?card { GRAPH 
<http://updated/test> {\n"
    +                + "  { ?card <urn:HasSuit> <urn:Clubs> }\n"
    --- End diff --
    
    Is there some sort of shorthand going on here?  Where did the ?card a 
<urn:Card> statement pattern go?  <urn:Card> is only a subClass of the Range 
property restrictions on <urn:hasRank> and <urn:hasSuit>.  Seems like you would 
still need to join on <urn:Card> here unless you replace subClassOf with 
equivalentClass.  


---
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.
---

Reply via email to