nl.vpro.domain.api.page.PageFacetsResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-domain Show documentation
Show all versions of api-domain Show documentation
Contains the objects used by the Frontend API, like forms and result objects
/*
* Copyright (C) 2013 All rights reserved
* VPRO The Netherlands
*/
package nl.vpro.domain.api.page;
import lombok.Data;
import nl.vpro.domain.api.DateFacetResultItem;
import nl.vpro.domain.api.MultipleFacetsResult;
import nl.vpro.domain.api.TermFacetResultItem;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import java.util.ArrayList;
import java.util.List;
/**
* @author Roelof Jan Koekoek
* @since 2.0
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "pageFacetsResultType",
propOrder = {
"sortDates",
"types",
"broadcasters",
"tags",
"keywords",
"genres",
"portals",
"sections",
"relations"
})
@Data
public class PageFacetsResult {
private List sortDates;
private List broadcasters;
private List types;
private List tags;
private List keywords;
private List genres;
private List portals;
private List sections;
private List relations;
List getBroadcasters(PageForm form) {
if (form.getSearches() != null && form.getSearches().getBroadcasters() != null && broadcasters == null) {
broadcasters = new ArrayList<>();
}
return broadcasters;
}
List getGenres(PageForm form) {
if (form.getSearches() != null && form.getSearches().getGenres() != null && genres == null) {
genres = new ArrayList<>();
}
return genres;
}
List getTags(PageForm form) {
if (form.getSearches() != null && form.getSearches().getTags() != null && tags == null) {
tags = new ArrayList<>();
}
return tags;
}
List getKeywords(PageForm form) {
if (form.getSearches() != null && form.getSearches().getKeywords() != null && keywords == null) {
keywords = new ArrayList<>();
}
return keywords;
}
List getTypes(PageForm form) {
if (form.getSearches() != null && form.getSearches().getTypes() != null && types == null) {
types = new ArrayList<>();
}
return types;
}
List getPortals(PageForm form) {
if (form.getSearches() != null && form.getSearches().getPortals() != null && portals == null) {
portals = new ArrayList<>();
}
return portals;
}
List getSections(PageForm form) {
if (form.getSearches() != null && form.getSearches().getSections() != null && sections == null) {
sections = new ArrayList<>();
}
return sections;
}
List getSortDates(PageForm form) {
if (form.getSearches() != null && form.getSearches().getSortDates() != null && sortDates == null) {
sortDates = new ArrayList<>();
}
return sortDates;
}
List getRelations(PageForm form) {
if (form.getSearches() != null && form.getSearches().getRelations() != null && relations == null) {
relations = new ArrayList<>();
}
return relations;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy