Package net.fortytwo.twitlogic.syntax

Examples of net.fortytwo.twitlogic.syntax.MatcherException


            if (TweetSyntax.HASHTAG_PATTERN.matcher(rest).matches()) {
                try {
                    context.handleCompletedTriple(new URIReference(RDF.TYPE), new Hashtag(rest.substring(1)));
                } catch (HandlerException e) {
                    throw new MatcherException(e);
                }
            } else {
                String rl = rest.toLowerCase();
                if (MALE_SYNONYMS.contains(rl)) {
                    produceGender(Gender.MALE, context);
View Full Code Here


                               final AfterthoughtContext context) throws MatcherException {
        try {
            context.handleCompletedTriple(new URIReference(FOAF.GENDER),
                    new PlainLiteral(gender.toString()));
        } catch (HandlerException e) {
            throw new MatcherException(e);
        }
    }
View Full Code Here

                    context.handle(new Triple(review, RATING, new PlainLiteral("" + rating)));
                    context.handle(new Triple(review, MAXRATING, new PlainLiteral("" + maxRating)));
                    context.handle(new Triple(review, MINRATING, new PlainLiteral("" + minRating)));
                    context.handle(new Triple(review, TEXT, new PlainLiteral(context.thisTweet().getText())));
                } catch (HandlerException e) {
                    throw new MatcherException(e);
                }

                // FIXME: restore this.  Currently, it causes a transaction to hang.
                //context.handle(new Triple(review, REVIEWER, context.thisPerson()));
            }
View Full Code Here

                    context.getSubject());

            try {
                context.handle(t);
            } catch (HandlerException e) {
                throw new MatcherException(e);
            }
        }
    }
View Full Code Here

        try {
            //System.out.println("expression: " + expression);
            parser.tweet();
        } catch (RecognitionException e) {
            throw new MatcherException(e);
        }
    }
View Full Code Here

        if (predicateMatches(predicate)) {
            try {
                context.handleCompletedTriple(new URIReference(getPropertyURI()), object);
            } catch (HandlerException e) {
                throw new MatcherException(e);
            }
        }
    }
View Full Code Here

            if (0 < v.length()) {
                try {
                    context.handleCompletedTriple(new URIReference(propertyURI()),
                            new PlainLiteral(v));
                } catch (HandlerException e) {
                    throw new MatcherException(e);
                }
            }
        }
    }
View Full Code Here

                        break;
                    }

                    resultHandler.handle(st);
                } catch (HandlerException e) {
                    throw new MatcherException(e);
                }
            }
        }
    }
View Full Code Here

        List<List<Resource>> sequences;
        try {
            sequences = parser.tweet();
        } catch (RecognitionException e) {
            throw new MatcherException(e);
        }

        for (List<Resource> sequence : sequences) {
            matchTriples(sequence, handler);
        }
View Full Code Here

TOP

Related Classes of net.fortytwo.twitlogic.syntax.MatcherException

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.