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

nl.vpro.domain.classification.bind.AbstractTermWrapper Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 8.3.0
Show newest version
package nl.vpro.domain.classification.bind;

import java.io.Serial;
import java.io.Serializable;
import java.util.Locale;

import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlValue;

import nl.vpro.domain.classification.Term;

/**
 * @author Michiel Meeuwissen
 * @since 3.0
 */
@XmlTransient
public abstract class AbstractTermWrapper implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;


    private String termId;

    private String name;

    public AbstractTermWrapper() {
    }

    public AbstractTermWrapper(String name) {
        this.name = name;
    }

    public AbstractTermWrapper(Term term) {
        this.termId = term.getTermId();
        this.name = term.getName(Locale.getDefault());
    }

    public String getTermId() {
        return termId;
    }

    public void setTermId(String id) {
        this.termId = id;
    }
    @XmlValue
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy