//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// 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: 2011.01.14 at 01:47:35 EET
//
package org.betaconceptframework.astroboa.model.jaxb.type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
/**
* <p>Java class for localizationType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="localizationType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="label" maxOccurs="unbounded">
* <complexType>
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
* <attribute ref="{http://www.w3.org/XML/1998/namespace}lang use="required""/>
* </extension>
* </simpleContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "localizationType", propOrder = {
"label"
})
public class LocalizationType {
@XmlElement(required = true)
protected List<LocalizationType.Label> label;
/**
* Gets the value of the label property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the label property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getLocalizedLabel().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link LocalizationType.Label }
*
*
*/
public List<LocalizationType.Label> getLabel() {
if (label == null) {
label = new ArrayList<LocalizationType.Label>();
}
return this.label;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
* <attribute ref="{http://www.w3.org/XML/1998/namespace}lang use="required""/>
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value"
})
public static class Label {
/*
* This map is used only when we need to generate JSON using JAXB
* LocalizationAdapter knows whether JSON or XML export takes places
* and uses either this map or variables 'value' and 'lang.
*
* This is used primarily because Localized Label representation is totally
* different than the one used in XML
*/
@XmlAnyAttribute
private Map<QName, String> labelsPerLang = new HashMap<QName, String>();
@XmlValue
protected String value;
@XmlAttribute(name = "lang", namespace = "http://www.w3.org/XML/1998/namespace", required = true)
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "language")
protected String lang;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the lang property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLang() {
return lang;
}
/**
* Sets the value of the lang property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLang(String value) {
this.lang = value;
}
public void addLabelForLang(String lang, String label){
if (lang != null && label != null){
labelsPerLang.put(new QName(lang), label);
}
}
public Map<QName, String> getLabelsPerLang() {
return labelsPerLang;
}
}
}