Package net.fortytwo.twitlogic.model

Examples of net.fortytwo.twitlogic.model.Triple


    public void testFalseStart() throws Exception {
        // The "ht" will cause the lexer to expect a URL beginning with
        // "http://", and it will emit an error message.  However, parsing will
        // still succeed.
        assertExpected("ht -- @joshsh (Who knows @xixiluo)",
                new Triple(JOSHSH_PERSON, KNOWS, XIXILUO_PERSON));
    }
View Full Code Here


    }

    public void testCaseSensitivity() throws Exception {
        // Relative pronouns are not case-sensitive
        assertExpected("@joshsh (Who knows @xixiluo)",
                new Triple(JOSHSH_PERSON, KNOWS, XIXILUO_PERSON));

        // Predicates are generally not case-sensitive
        assertExpected("@joshsh (who kNows @xixiluo)",
                new Triple(JOSHSH_PERSON, KNOWS, XIXILUO_PERSON));

        // Usernames are case-sensitive.
        assertExpected("@joshsh (who knows @XixiLuo)",
                new Triple(JOSHSH_PERSON, KNOWS, new User("XixiLuo").getHeldBy()));
    }
View Full Code Here

                new Triple(JOSHSH_PERSON, KNOWS, new User("XixiLuo").getHeldBy()));
    }

    public void testDatatypeProperty() throws Exception {
        assertExpected("@joshsh (phone +1 555 123 4567)",
                new Triple(JOSHSH_PERSON, PHONE, new PlainLiteral("+1 555 123 4567")));
        assertExpected("@joshsh (phone number +1 555 123 4567)",
                new Triple(JOSHSH_PERSON, PHONE, new PlainLiteral("+1 555 123 4567")));
    }
View Full Code Here

                new Triple(JOSHSH_PERSON, PHONE, new PlainLiteral("+1 555 123 4567")));
    }

    public void testMultipleParenBlocks() throws Exception {
        assertExpected("@joshsh (who knows @xixiluo) (knows @joshsh) ...",
                new Triple(JOSHSH_PERSON, KNOWS, XIXILUO_PERSON),
                new Triple(JOSHSH_PERSON, KNOWS, JOSHSH_PERSON));
    }
View Full Code Here

    }

    public void testAll() throws Exception {
        Resource review = bnode(bnodeIndex + 1);
        assertExpected("IMHO, #thebestmovieever (3/5) is only so-so.",
                new Triple(THEBESTMOVIEEVER, HASREVIEW, review),
                new Triple(review, TYPE, REVIEW),
                new Triple(review, RATING, new PlainLiteral("3")),
                new Triple(review, MAXRATING, new PlainLiteral("5")),
                new Triple(review, MINRATING, new PlainLiteral("0")),
                // FIXME: restore this once the corresponding statement is restored in ReviewMatcher
          //      new Triple(review, REVIEWER, tweetContext.thisPerson()),
                new Triple(review, TEXT, new PlainLiteral("IMHO, #thebestmovieever (3/5) is only so-so.")));
    }
View Full Code Here

        matcher = new DemoAfterthoughtMatcher();
    }

    public void testAll() throws Exception {
        assertExpected("Just tried out #brandx (see http://example.org/brandx). It's as inferior as they say.",
                new Triple(BRANDX, SEEALSO, BRANDX_URL));
    }
View Full Code Here

TOP

Related Classes of net.fortytwo.twitlogic.model.Triple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.