All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.vpro.domain.constraint.page.GenreConstraint Maven / Gradle / Ivy

Go to download

Contains the objects used by the Frontend API, like forms and result objects

There is a newer version: 8.3.3
Show newest version
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