nl.vpro.domain.constraint.page.GenreConstraint Maven / Gradle / Ivy
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