nl.vpro.domain.constraint.page.GenreConstraint 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
package nl.vpro.domain.constraint.page;
import java.util.stream.Stream;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import nl.vpro.domain.constraint.AbstractGenreConstraint;
import nl.vpro.domain.page.Genre;
import nl.vpro.domain.page.Page;
/**
* @author machiel
* @since 5.4
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "pageGenreConstraintType")
public class GenreConstraint extends AbstractGenreConstraint {
public GenreConstraint() {
}
public GenreConstraint(String value) {
super(value);
}
@Override
protected Stream getTermIds(Page p) {
return p.getGenres().stream().map(Genre::getTermId);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy