nl.vpro.domain.AbstractTextualObjectUpdate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of media-domain Show documentation
Show all versions of media-domain Show documentation
The basic domain classes for 'media', the core of POMS. Also, the 'update' XML bindings for it.
It also contains some closely related domain classes like the enum to contain NICAM kijkwijzer settings.
package nl.vpro.domain;
import lombok.Getter;
import lombok.Setter;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.function.BiFunction;
import nl.vpro.domain.media.support.TextualType;
/**
* @author Michiel Meeuwissen
* @since 5.3
*/
public abstract class AbstractTextualObjectUpdate>
implements TextualObjectUpdate {
@Getter
private final BiFunction titleCreator;
@Getter
private final BiFunction descriptionCreator;
@Getter
@Setter
private SortedSet titles = new TreeSet<>();
@Getter
@Setter
private SortedSet descriptions = new TreeSet<>();
protected AbstractTextualObjectUpdate(BiFunction titleCreator,
BiFunction descriptionCreator) {
this.titleCreator = titleCreator;
this.descriptionCreator = descriptionCreator;
}
@Override
public String toString() {
return getMainTitle() + " " + getMainDescription();
}
}