// // 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.05.30 at 01:37:07 odp. CEST // package cz.cuni.mff.peckam.java.origamist.common.jaxb; import java.util.Locale; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import cz.cuni.mff.peckam.java.origamist.common.GeneratedClassBase; import org.jvnet.jaxb2_commons.lang.Equals; import org.jvnet.jaxb2_commons.lang.EqualsStrategy; import org.jvnet.jaxb2_commons.lang.HashCode; import org.jvnet.jaxb2_commons.lang.HashCodeStrategy; import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy; import org.jvnet.jaxb2_commons.locator.ObjectLocator; import org.jvnet.jaxb2_commons.locator.util.LocatorUtils; import org.w3._2001.xmlschema.Adapter3; /** * <p>Provided property: value * <p>Provided property: lang * <p>Java class for LangString complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="LangString"> * <simpleContent> * <extension base="<http://www.w3.org/2001/XMLSchema>string"> * <attribute name="lang" type="{http://www.w3.org/2001/XMLSchema}language" default="en-US" /> * </extension> * </simpleContent> * </complexType> * </pre> * * */ @XmlType(name = "LangString", propOrder = { "value" }) @XmlAccessorType(XmlAccessType.PROPERTY) public class LangString extends GeneratedClassBase implements Equals, HashCode { protected String value; /** * Property value * */ public final static String VALUE_PROPERTY = "value:cz.cuni.mff.peckam.java.origamist.common.jaxb.LangString"; protected Locale lang; /** * Property lang * */ public final static String LANG_PROPERTY = "lang:cz.cuni.mff.peckam.java.origamist.common.jaxb.LangString"; public LangString() { if (getClass().getName().equals("cz.cuni.mff.peckam.java.origamist.common.LangString")) { init(); } } /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ @XmlValue public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { String old = this.value; this.value = value; if (((old!= value)&&((old == null)||(value == null)))||((old!= null)&&(!old.equals(value)))) { support.firePropertyChange(LangString.VALUE_PROPERTY, old, value); } } /** * Gets the value of the lang property. * * @return * possible object is * {@link String } * */ @XmlAttribute @XmlJavaTypeAdapter(Adapter3 .class) public Locale getLang() { if (lang == null) { return new Adapter3().unmarshal("en-US"); } else { return lang; } } /** * Sets the value of the lang property. * * @param value * allowed object is * {@link String } * */ public void setLang(Locale value) { Locale old = this.lang; this.lang = value; if (((old!= value)&&((old == null)||(value == null)))||((old!= null)&&(!old.equals(value)))) { support.firePropertyChange(LangString.LANG_PROPERTY, old, value); } } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof LangString)) { return false; } if (this == object) { return true; } final LangString that = ((LangString) object); { String lhsValue; lhsValue = this.getValue(); String rhsValue; rhsValue = that.getValue(); if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) { return false; } } { Locale lhsLang; lhsLang = this.getLang(); Locale rhsLang; rhsLang = that.getLang(); if (!strategy.equals(LocatorUtils.property(thisLocator, "lang", lhsLang), LocatorUtils.property(thatLocator, "lang", rhsLang), lhsLang, rhsLang)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue); } { Locale theLang; theLang = this.getLang(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "lang", theLang), currentHashCode, theLang); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } }