Package net.fortytwo.twitlogic.model

Examples of net.fortytwo.twitlogic.model.Entities


        return baseHandler.isOpen();
    }

    public void handle(final Tweet tweet) throws HandlerException {
        if (null == tweet.getEntities() && null != tweet.getText()) {
            Entities entities = new Entities();

            Collection<Resource> topics = entities.getTopics();
            for (String tag : TweetSyntax.findHashtags(tweet.getText())) {
                topics.add(new Hashtag(tag));
            }

            // Note: dollar tags are not "sniffed" here.

            Collection<URIReference> links = entities.getLinks();
            for (String s : TweetSyntax.findLinks(tweet.getText())) {
                links.add(new URIReference(s));
            }

            tweet.setEntities(entities);
View Full Code Here

TOP

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

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.