- } else {
- // TODO i18n
- System.out.println("Known tags: ");
- int i = 1;
- for (SearchableTag s : stags) {
- System.out.println(String.format("%d: %s", i, s.getName()));
- i++;
+ }
+ }
+
+ private void displayTag(SearchableTag subtag) {
+ // TODO: i18n
+ String stories = "stories";
+ String num = StringUtils.formatNumber(subtag.getCount());
+ System.out.println(String.format("%s (%s), %s %s", subtag.getName(),
+ subtag.getFqName(), num, stories));
+ }
+
+ private void displayStory(MetaData meta) {
+ System.out.println(meta.getTitle());
+ System.out.println();
+ System.out.println(meta.getUrl());
+ System.out.println();
+ System.out.println("Tags: " + meta.getTags());
+ System.out.println();
+ for (Paragraph para : meta.getResume()) {
+ System.out.println(para.getContent());
+ System.out.println("");
+ }
+ }
+
+ private void displayTags(List<SearchableTag> subtags) {
+ int i = 1;
+ for (SearchableTag subtag : subtags) {
+ String total = "";
+ if (subtag.getCount() > 0) {
+ total = StringUtils.formatNumber(subtag.getCount());