org.somda.sdc.biceps.model.participant.LocalizedTextWidth Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biceps-model Show documentation
Show all versions of biceps-model Show documentation
SDCri is a set of Java libraries that implements a network communication framework conforming
with the IEEE 11073 SDC specifications. This project implements the model for
IEEE 11073-10207.
The newest version!
package org.somda.sdc.biceps.model.participant;
import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlEnumValue;
import jakarta.xml.bind.annotation.XmlType;
/**
* LocalizedTextWidth indicates the width of a localized text based on the number of fullwidth characters in order to allow a SERVICE CONSUMER an effective filtering and querying for translations.
*
* In the following, a line is defined as the content of the text from either the beginning of the text or the beginning of a previous line until the next occurance of period mark, question mark, exclamation mark, or paragraph.
*
* Java class for LocalizedTextWidth
.
*
* The following schema fragment specifies the expected content contained within this class.
* {@code
*
*
*
*
*
*
*
*
*
*
* }
*
*/
@XmlType(name = "LocalizedTextWidth", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
@XmlEnum
public enum LocalizedTextWidth {
/**
* A line has 4 or less fullwidth characters.
*
*/
@XmlEnumValue("xs")
XS("xs"),
/**
* A line has 8 or less fullwidth characters.
*
*/
@XmlEnumValue("s")
S("s"),
/**
* A line has 12 or less fullwidth characters.
*
*/
@XmlEnumValue("m")
M("m"),
/**
* A line has 16 or less fullwidth characters.
*
*/
@XmlEnumValue("l")
L("l"),
/**
* A line has 20 or less fullwidth characters.
*
*/
@XmlEnumValue("xl")
XL("xl"),
/**
* A line has 21 or more fullwidth characters.
*
*/
@XmlEnumValue("xxl")
XXL("xxl");
private final String value;
LocalizedTextWidth(String v) {
value = v;
}
/**
* Gets the value associated to the enum constant.
*
* @return
* The value linked to the enum.
*/
public String value() {
return value;
}
/**
* Gets the enum associated to the value passed as parameter.
*
* @param v
* The value to get the enum from.
* @return
* The enum which corresponds to the value, if it exists.
* @throws IllegalArgumentException
* If no value matches in the enum declaration.
*/
public static LocalizedTextWidth fromValue(String v) {
for (LocalizedTextWidth c: LocalizedTextWidth.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}