use of uk.nhs.digital.ps.beans.Series in project hippo by NHS-digital-website.
the class RssModifier method getCategory.
private String getCategory(Publication publicationBean) {
HippoBean parentDocument = publicationBean.getParentDocument();
if (parentDocument instanceof Series) {
Series series = (Series) parentDocument;
StringBuilder category = new StringBuilder();
try {
if (series.getFullTaxonomyList() != null && series.getFullTaxonomyList().size() > 0) {
category.append(Arrays.toString(series.getFullTaxonomyList().toArray()));
}
} catch (Exception ex) {
LOGGER.warn(" Failed to get the Full Taxonomy.", ex.getMessage());
}
if (series.getInformationType() != null && series.getInformationType().length > 0) {
category.append(Arrays.toString(series.getInformationType()));
}
if (series.getGranularity() != null && series.getGranularity().length > 0) {
category.append(Arrays.toString(series.getGranularity()));
}
if (series.getGeographicCoverage() != null && series.getGeographicCoverage().length > 0) {
category.append(Arrays.toString(Arrays.stream(series.getGeographicCoverage()).toArray()));
}
return category.toString();
} else {
return "";
}
}
Aggregations