private TranslationMemoryQuery createQueryFromArgs(String[] args)
throws IOException {
SimpleCommandLineParser parser = new SimpleCommandLineParser(args);
URL feedUrl = FeedUris.getTranslationMemoriesFeedUrl();
TranslationMemoryQuery query = new TranslationMemoryQuery(feedUrl);
if (parser.containsKey("onlyprivate")) {
System.out.println("You asked to list all private translation "
+ "memories...");
query.setScope(ScopeEntry.Value.PRIVATE.toString());
} else if (parser.containsKey("onlypublic")) {
System.out.println("You asked to list all public translation "
+ "memories...");
query.setScope(ScopeEntry.Value.PUBLIC.toString());
} else {
System.out.println("You asked to list all translation "
+ "memories...");
}