System.out.println("For more information, please see:\n"
+ " <URL:http://wiki.github.com/joshsh/twitlogic/configuring-and-running-twitlogic>.");
}
private static void runDemo() throws Exception {
TweetStore store = new TweetStore();
store.initialize();
//store.dumpToFile(new File("/tmp/places-demo-dump.nt"), RDFFormat.NTRIPLES);
try {
CustomTwitterClient client = new CustomTwitterClient();
store.startServer(client);
TweetPersister persister = new TweetPersister(store, client);
TweetDeleter d = new TweetDeleter(store);
TweetPersistedLogger pLogger = new TweetPersistedLogger(client.getStatistics(), persister);
TweetFilterCriterion crit = new TweetFilterCriterion(TwitLogic.getConfiguration());
Filter<Tweet> f = new Filter<Tweet>(crit, pLogger);
TweetReceivedLogger rLogger = new TweetReceivedLogger(client.getStatistics(), f);
Set<User> users = TwitLogic.findFollowList(client);
Set<String> terms = TwitLogic.findTrackTerms();
if (0 < users.size() || 0 < terms.size()) {
client.processFilterStream(users, terms, null, rLogger, d, 0);
} else {
client.processSampleStream(rLogger, d);
}
} finally {
store.shutDown();
}
}