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);