/**
* =============================================================================
*
* ORCID (R) Open Source
* http://orcid.org
*
* Copyright (c) 2012-2014 ORCID, Inc.
* Licensed under an MIT-Style License (MIT)
* http://orcid.org/open-source-license
*
* This copyright and license information (including a link to the full license)
* shall be included in its entirety in all copies or substantial portion of
* the software.
*
* =============================================================================
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.18 at 10:32:14 AM GMT
//
package org.orcid.jaxb.model.common_v2;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
import java.io.Serializable;
/**
* <p/>
* Java class for visibility.
* <p/>
* <p/>
* The following schema fragment specifies the expected content contained within
* this class.
* <p/>
* <p/>
*
* <pre>
* <simpleType name="locale">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="en"/>
* <enumeration value="es"/>
* <enumeration value="fr"/>
* <enumeration value="zh_TW"/>
* <enumeration value="zh_CN"/>
* </restriction>
* </simpleType>
* </pre>
*/
@XmlType(name = "locale")
@XmlEnum
public enum Locale implements Serializable {
@XmlEnumValue("en")
EN("en"),
@XmlEnumValue("es")
ES("es"),
@XmlEnumValue("fr")
FR("fr"),
@XmlEnumValue("ko")
KO("ko"),
@XmlEnumValue("pt")
PT("pt"),
@XmlEnumValue("ru")
RU("ru"),
@XmlEnumValue("zh_CN")
ZH_CN("zh_CN"),
@XmlEnumValue("zh_TW")
ZH_TW("zh_TW"),
@XmlEnumValue("it")
IT("it"),
@XmlEnumValue("ja")
JA("ja"),
@XmlEnumValue("xx")
XX("xx");
private final String value;
Locale(String v) {
value = v;
}
public String value() {
return value;
}
public static Locale fromValue(String v) {
for (Locale c : Locale.values()) {
if (v.startsWith(c.value)) {
return c;
}
}
// if we don't support the specified language return english
return Locale.EN;
}
@Override
public String toString() {
return value;
}
}