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

org.zanata.rest.dto.LocaleIdAdapter Maven / Gradle / Ivy

There is a newer version: 4.6.2
Show newest version
package org.zanata.rest.dto;

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

import org.zanata.common.LocaleId;

public class LocaleIdAdapter extends XmlAdapter {
    public LocaleId unmarshal(String s) throws Exception {
        if (s == null)
            return null;
        return new LocaleId(s);
    }

    public String marshal(LocaleId localeId) throws Exception {
        if (localeId == null)
            return null;
        return localeId.toString();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy