| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
package org.kuali.student.r2.common.dto; |
| 18 | |
|
| 19 | |
import java.io.Serializable; |
| 20 | |
import java.util.List; |
| 21 | |
|
| 22 | |
import javax.xml.bind.annotation.XmlAccessType; |
| 23 | |
import javax.xml.bind.annotation.XmlAccessorType; |
| 24 | |
import javax.xml.bind.annotation.XmlAnyElement; |
| 25 | |
import javax.xml.bind.annotation.XmlAttribute; |
| 26 | |
import javax.xml.bind.annotation.XmlElement; |
| 27 | |
import javax.xml.bind.annotation.XmlType; |
| 28 | |
|
| 29 | |
import org.kuali.student.r2.common.infc.Locale; |
| 30 | |
import org.w3c.dom.Element; |
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
@XmlAccessorType(XmlAccessType.FIELD) |
| 40 | |
@XmlType(name = "LocaleInfo", propOrder = { |
| 41 | |
"localeLanguage", "localeVariant", |
| 42 | |
"localeRegion", "localeScript", |
| 43 | |
"_futureElements"}) |
| 44 | |
|
| 45 | |
public class LocaleInfo |
| 46 | |
implements Locale, Serializable { |
| 47 | |
|
| 48 | |
private static final long serialVersionUID = 1L; |
| 49 | |
|
| 50 | |
@XmlElement |
| 51 | |
private String localeLanguage; |
| 52 | |
|
| 53 | |
@XmlElement |
| 54 | |
private String localeVariant; |
| 55 | |
|
| 56 | |
@XmlElement |
| 57 | |
private String localeRegion; |
| 58 | |
|
| 59 | |
@XmlElement |
| 60 | |
private String localeScript; |
| 61 | |
|
| 62 | |
@XmlAnyElement |
| 63 | |
private List<Element> _futureElements; |
| 64 | |
|
| 65 | |
|
| 66 | |
|
| 67 | |
|
| 68 | |
|
| 69 | 0 | public LocaleInfo() { |
| 70 | 0 | } |
| 71 | |
|
| 72 | |
|
| 73 | |
|
| 74 | |
|
| 75 | |
|
| 76 | |
|
| 77 | 0 | public LocaleInfo(Locale locale) { |
| 78 | 0 | if (null != locale) { |
| 79 | 0 | this.localeLanguage = locale.getLocaleLanguage(); |
| 80 | 0 | this.localeVariant = locale.getLocaleVariant(); |
| 81 | 0 | this.localeRegion = locale.getLocaleRegion(); |
| 82 | 0 | this.localeScript = locale.getLocaleScript(); |
| 83 | |
} |
| 84 | 0 | } |
| 85 | |
|
| 86 | |
@Override |
| 87 | |
public String getLocaleLanguage() { |
| 88 | 0 | return this.localeLanguage; |
| 89 | |
} |
| 90 | |
|
| 91 | |
public void setLocaleLanguage(String localeLanguage) { |
| 92 | 0 | this.localeLanguage = localeLanguage; |
| 93 | 0 | } |
| 94 | |
|
| 95 | |
@Override |
| 96 | |
public String getLocaleVariant() { |
| 97 | 0 | return this.localeVariant; |
| 98 | |
} |
| 99 | |
|
| 100 | |
public void setLocaleVariant(String localeVariant) { |
| 101 | 0 | this.localeVariant = localeVariant; |
| 102 | 0 | } |
| 103 | |
|
| 104 | |
@Override |
| 105 | |
public String getLocaleRegion() { |
| 106 | 0 | return this.localeRegion; |
| 107 | |
} |
| 108 | |
|
| 109 | |
public void setLocaleRegion(String localeRegion) { |
| 110 | 0 | this.localeRegion = localeRegion; |
| 111 | 0 | } |
| 112 | |
|
| 113 | |
@Override |
| 114 | |
public String getLocaleScript() { |
| 115 | 0 | return this.localeScript; |
| 116 | |
} |
| 117 | |
|
| 118 | |
public void setLocaleScript(String localeScript) { |
| 119 | 0 | this.localeScript = localeScript; |
| 120 | 0 | } |
| 121 | |
} |