nl.vpro.domain.constraint.media.GenreConstraint Maven / Gradle / Ivy
package nl.vpro.domain.constraint.media;
import java.util.stream.Stream;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import org.meeuw.xml.bind.annotation.XmlDocumentation;
import nl.vpro.domain.constraint.AbstractGenreConstraint;
import nl.vpro.domain.media.Genre;
import nl.vpro.domain.media.MediaObject;
/**
* @author machiel
* @since 5.4
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "genreConstraintType")
@XmlDocumentation("A constraint on the genre id. This may be postfixed with an asterix")
public class GenreConstraint extends AbstractGenreConstraint {
public GenreConstraint() {
}
public GenreConstraint(String value) {
super(value);
}
@Override
protected Stream getTermIds(MediaObject p) {
return p.getGenres().stream().map(Genre::getTermId);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy