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

nl.vpro.domain.media.bind.LocaleCodeAdapter Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 8.3.1
Show newest version
package nl.vpro.domain.media.bind;


import java.util.Locale;

import jakarta.xml.bind.annotation.adapters.XmlAdapter;

import nl.vpro.i18n.LocalizedString;

/**
 * @author Michiel Meeuwissen
 * @since 3.0
 */
public class LocaleCodeAdapter extends XmlAdapter {

    @Override
    public Locale unmarshal(String v) {
        return LocalizedString.adapt(v);
    }

    @Override
    public String marshal(Locale v) {
        return v.toLanguageTag();
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy