- table.setRowData(new String[][] { //
- new String[] { " Author", meta.getAuthor() }, //
- new String[] { " Publication date", formatDate(meta.getDate()) },
- new String[] { " Word count", format(meta.getWords()) },
- new String[] { " Source", meta.getSource() } //
- });
- table.setHeaders(Arrays.asList("key", "value"), false);
- table.toTop();
- }
-
- private String format(long value) {
- String display = "";
-
- while (value > 0) {
- if (!display.isEmpty()) {
- display = "." + display;
- }
- display = (value % 1000) + display;
- value = value / 1000;
+ Map<String, String> metaDesc = BasicReader.getMetaDesc(meta);
+ String[][] metaDescObj = new String[metaDesc.size()][2];
+ int i = 0;
+ for (String key : metaDesc.keySet()) {
+ metaDescObj[i][0] = " " + key;
+ metaDescObj[i][1] = metaDesc.get(key);
+ i++;