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

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

Go to download

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

The newest version!
package nl.vpro.domain.constraint.media;

import java.util.stream.Stream;

import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.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