diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-03-08 08:07:11 +0100 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-03-08 08:07:11 +0100 |
commit | c7e92047632432346c13723925f45888461887e9 (patch) | |
tree | 3cc1e96e2d0bc59047b484bbb86f227e21aa9cb9 /src/main/java/at/gv/util/xsd/mis/usp_v2/persondata/SexType.java | |
parent | e5474ef416f8d9f6cb2c3b6e900ad1eb5ac20a38 (diff) | |
download | egovutils-c7e92047632432346c13723925f45888461887e9.tar.gz egovutils-c7e92047632432346c13723925f45888461887e9.tar.bz2 egovutils-c7e92047632432346c13723925f45888461887e9.zip |
add USP_v2 client implementation
Diffstat (limited to 'src/main/java/at/gv/util/xsd/mis/usp_v2/persondata/SexType.java')
-rw-r--r-- | src/main/java/at/gv/util/xsd/mis/usp_v2/persondata/SexType.java | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/main/java/at/gv/util/xsd/mis/usp_v2/persondata/SexType.java b/src/main/java/at/gv/util/xsd/mis/usp_v2/persondata/SexType.java new file mode 100644 index 0000000..8659b07 --- /dev/null +++ b/src/main/java/at/gv/util/xsd/mis/usp_v2/persondata/SexType.java @@ -0,0 +1,54 @@ + +package at.gv.util.xsd.mis.usp_v2.persondata; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + * <p>Java-Klasse für SexType. + * + * <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. + * <p> + * <pre> + * <simpleType name="SexType"> + * <restriction base="{http://www.w3.org/2001/XMLSchema}token"> + * <enumeration value="male"/> + * <enumeration value="female"/> + * <enumeration value="unknown"/> + * </restriction> + * </simpleType> + * </pre> + * + */ +@XmlType(name = "SexType") +@XmlEnum +public enum SexType { + + @XmlEnumValue("male") + MALE("male"), + @XmlEnumValue("female") + FEMALE("female"), + @XmlEnumValue("unknown") + UNKNOWN("unknown"); + private final String value; + + SexType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static SexType fromValue(String v) { + for (SexType c: SexType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} |