nl.vpro.domain.classification.bind.TermWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of media-classification Show documentation
Show all versions of media-classification Show documentation
The classes needed for the 'classification' service used in POMS.
This os based on ClassificationScheme xml's as provided by EBU.
It at the moment is only used for genres, but it could in principle accommodate other types of classification based on
a fixed list.
package nl.vpro.domain.classification.bind;
import java.io.Serial;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import nl.vpro.domain.Xmlns;
import nl.vpro.domain.classification.Term;
/**
* @author Michiel Meeuwissen
* @since 3.0
*/
@XmlType(name = "termType", namespace = Xmlns.MEDIA_NAMESPACE)
@XmlAccessorType(XmlAccessType.NONE)
@JsonSerialize(using = TermWrapperJsonString.Serializer.class)
@JsonDeserialize(using = TermWrapper.Deserializer.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TermWrapper extends AbstractTermWrapper {
@Serial
private static final long serialVersionUID = 2711696987261976991L;
public TermWrapper() {
}
public TermWrapper(String name) {
super(name);
}
public TermWrapper(Term term) {
super(term);
}
public static class Deserializer extends TermWrapperJsonString.Deserializer {
@Override
protected TermWrapper getTermWrapper() {
return new TermWrapper();
}
}
}