public Set<String> getTags() { DocumentList docs = this.getAllTagsFromPublishedPosts(); Set<String> result = new HashSet<>(); for (Map<String, Object> document : docs) { String[] tags = DBUtil.toStringArray(document.get(Crawler.Attributes.TAGS)); Collections.addAll(result, tags); } return result; }
public Set<String> getAllTags() { Set<String> result = new HashSet<>(); for (String docType : DocumentTypes.getDocumentTypes()) { String statement = String.format(STATEMENT_GET_TAGS_BY_DOCTYPE, docType); DocumentList docs = query(statement); for (Map<String, Object> document : docs) { String[] tags = DBUtil.toStringArray(document.get(Crawler.Attributes.TAGS)); Collections.addAll(result, tags); } } return result; }
public Set<String> getTags() { DocumentList docs = this.getAllTagsFromPublishedPosts(); Set<String> result = new HashSet<>(); for (Map<String, Object> document : docs) { String[] tags = DBUtil.toStringArray(document.get(Crawler.Attributes.TAGS)); Collections.addAll(result, tags); } return result; }
public Set<String> getAllTags() { Set<String> result = new HashSet<>(); for (String docType : DocumentTypes.getDocumentTypes()) { String statement = String.format(STATEMENT_GET_TAGS_BY_DOCTYPE, docType); DocumentList docs = query(statement); for (Map<String, Object> document : docs) { String[] tags = DBUtil.toStringArray(document.get(Crawler.Attributes.TAGS)); Collections.addAll(result, tags); } } return result; }