org.mitre.cybox.common.DatePrecisionEnum Maven / Gradle / Ivy
The newest version!
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.11.01 at 11:48:17 AM PST
//
package org.mitre.cybox.common;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* Java class for DatePrecisionEnum.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <simpleType name="DatePrecisionEnum">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="year"/>
* <enumeration value="month"/>
* <enumeration value="day"/>
* </restriction>
* </simpleType>
*
*
*/
@XmlType(name = "DatePrecisionEnum")
@XmlEnum
public enum DatePrecisionEnum {
/**
* Date is precise to the given year.
*
*/
@XmlEnumValue("year")
YEAR("year"),
/**
* Date is precise to the given month.
*
*/
@XmlEnumValue("month")
MONTH("month"),
/**
* Date is precise to the given day.
*
*/
@XmlEnumValue("day")
DAY("day");
private final String value;
DatePrecisionEnum(String v) {
value = v;
}
public String value() {
return value;
}
public static DatePrecisionEnum fromValue(String v) {
for (DatePrecisionEnum c: DatePrecisionEnum.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}