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

nl.vpro.domain.classification.LocalizedString 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.1
Show newest version
package nl.vpro.domain.classification;

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

/**
 * Extension of {@link nl.vpro.i18n.LocalizedString} in the correct XML namespace
 */

public class LocalizedString extends nl.vpro.i18n.LocalizedString {
    @Serial
    private static final long serialVersionUID = -6545505135867762847L;

    public static LocalizedString copy(nl.vpro.i18n.LocalizedString copy) {
        return  new LocalizedString(
            copy.getValue(),
            copy.getLocale(),
            copy.getCharsetName()
        );
    }

    protected LocalizedString(String value, Locale locale, String charsetName) {
        setValue(value);
        setLocale(locale);
        setCharsetName(charsetName);
    }

    public static LocalizedString of(String value, Locale locale) {
         if (value == null) {
            return null;
        } else {
            return new LocalizedString(value, locale, null);
        }
    }

    public LocalizedString() {

    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy