org.openestate.is24.restapi.xml.gis.Countries Maven / Gradle / Ivy
Show all versions of OpenEstate-IS24-REST Show documentation
package org.openestate.is24.restapi.xml.gis;
import java.io.Serializable;
import java.net.URL;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
import org.openestate.is24.restapi.xml.Adapter2;
import org.openestate.is24.restapi.xml.Adapter4;
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Country" maxOccurs="unbounded" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{http://rest.immobilienscout24.de/schema/common/1.0}Reference"/>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"country"
})
@XmlRootElement(name = "countries")
public class Countries implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{
@XmlElement(name = "Country")
protected List country;
/**
* Gets the value of the country property.
*
*
* 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 set
method for the country property.
*
*
* For example, to add a new item, do as follows:
*
* getCountry().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Countries.Country }
*
*
*/
public List getCountry() {
if (country == null) {
country = new ArrayList();
}
return this.country;
}
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
List theCountry;
theCountry = (((this.country!= null)&&(!this.country.isEmpty()))?this.getCountry():null);
strategy.appendField(locator, this, "country", buffer, theCountry, ((this.country!= null)&&(!this.country.isEmpty())));
}
return buffer;
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof Countries) {
final Countries copy = ((Countries) draftCopy);
{
Boolean countryShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.country!= null)&&(!this.country.isEmpty())));
if (countryShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceCountry;
sourceCountry = (((this.country!= null)&&(!this.country.isEmpty()))?this.getCountry():null);
@SuppressWarnings("unchecked")
List copyCountry = ((List ) strategy.copy(LocatorUtils.property(locator, "country", sourceCountry), sourceCountry, ((this.country!= null)&&(!this.country.isEmpty()))));
copy.country = null;
if (copyCountry!= null) {
List uniqueCountryl = copy.getCountry();
uniqueCountryl.addAll(copyCountry);
}
} else {
if (countryShouldBeCopiedAndSet == Boolean.FALSE) {
copy.country = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new Countries();
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final Countries that = ((Countries) object);
{
List lhsCountry;
lhsCountry = (((this.country!= null)&&(!this.country.isEmpty()))?this.getCountry():null);
List rhsCountry;
rhsCountry = (((that.country!= null)&&(!that.country.isEmpty()))?that.getCountry():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "country", lhsCountry), LocatorUtils.property(thatLocator, "country", rhsCountry), lhsCountry, rhsCountry, ((this.country!= null)&&(!this.country.isEmpty())), ((that.country!= null)&&(!that.country.isEmpty())))) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{http://rest.immobilienscout24.de/schema/common/1.0}Reference"/>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
public static class Country implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
@XmlJavaTypeAdapter(Adapter4 .class)
@XmlSchemaType(name = "anyURI")
protected URL href;
@XmlAttribute(name = "id")
protected Long id;
@XmlAttribute(name = "label")
protected String label;
@XmlAttribute(name = "modification")
@XmlJavaTypeAdapter(Adapter2 .class)
@XmlSchemaType(name = "dateTime")
protected Calendar modification;
@XmlAttribute(name = "creation")
@XmlJavaTypeAdapter(Adapter2 .class)
@XmlSchemaType(name = "dateTime")
protected Calendar creation;
@XmlAttribute(name = "publishDate")
@XmlJavaTypeAdapter(Adapter2 .class)
@XmlSchemaType(name = "dateTime")
protected Calendar publishDate;
/**
* Link zum Element.
*
* @return
* possible object is
* {@link String }
*
*/
public URL getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(URL value) {
this.href = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setId(Long value) {
this.id = value;
}
/**
* Gets the value of the label property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLabel() {
return label;
}
/**
* Sets the value of the label property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLabel(String value) {
this.label = value;
}
/**
* Gets the value of the modification property.
*
* @return
* possible object is
* {@link String }
*
*/
public Calendar getModification() {
return modification;
}
/**
* Sets the value of the modification property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setModification(Calendar value) {
this.modification = value;
}
/**
* Gets the value of the creation property.
*
* @return
* possible object is
* {@link String }
*
*/
public Calendar getCreation() {
return creation;
}
/**
* Sets the value of the creation property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCreation(Calendar value) {
this.creation = value;
}
/**
* Gets the value of the publishDate property.
*
* @return
* possible object is
* {@link String }
*
*/
public Calendar getPublishDate() {
return publishDate;
}
/**
* Sets the value of the publishDate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPublishDate(Calendar value) {
this.publishDate = value;
}
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
URL theHref;
theHref = this.getHref();
strategy.appendField(locator, this, "href", buffer, theHref, (this.href!= null));
}
{
Long theId;
theId = this.getId();
strategy.appendField(locator, this, "id", buffer, theId, (this.id!= null));
}
{
String theLabel;
theLabel = this.getLabel();
strategy.appendField(locator, this, "label", buffer, theLabel, (this.label!= null));
}
{
Calendar theModification;
theModification = this.getModification();
strategy.appendField(locator, this, "modification", buffer, theModification, (this.modification!= null));
}
{
Calendar theCreation;
theCreation = this.getCreation();
strategy.appendField(locator, this, "creation", buffer, theCreation, (this.creation!= null));
}
{
Calendar thePublishDate;
thePublishDate = this.getPublishDate();
strategy.appendField(locator, this, "publishDate", buffer, thePublishDate, (this.publishDate!= null));
}
return buffer;
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof Countries.Country) {
final Countries.Country copy = ((Countries.Country) draftCopy);
{
Boolean hrefShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.href!= null));
if (hrefShouldBeCopiedAndSet == Boolean.TRUE) {
URL sourceHref;
sourceHref = this.getHref();
URL copyHref = ((URL) strategy.copy(LocatorUtils.property(locator, "href", sourceHref), sourceHref, (this.href!= null)));
copy.setHref(copyHref);
} else {
if (hrefShouldBeCopiedAndSet == Boolean.FALSE) {
copy.href = null;
}
}
}
{
Boolean idShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.id!= null));
if (idShouldBeCopiedAndSet == Boolean.TRUE) {
Long sourceId;
sourceId = this.getId();
Long copyId = ((Long) strategy.copy(LocatorUtils.property(locator, "id", sourceId), sourceId, (this.id!= null)));
copy.setId(copyId);
} else {
if (idShouldBeCopiedAndSet == Boolean.FALSE) {
copy.id = null;
}
}
}
{
Boolean labelShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.label!= null));
if (labelShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceLabel;
sourceLabel = this.getLabel();
String copyLabel = ((String) strategy.copy(LocatorUtils.property(locator, "label", sourceLabel), sourceLabel, (this.label!= null)));
copy.setLabel(copyLabel);
} else {
if (labelShouldBeCopiedAndSet == Boolean.FALSE) {
copy.label = null;
}
}
}
{
Boolean modificationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.modification!= null));
if (modificationShouldBeCopiedAndSet == Boolean.TRUE) {
Calendar sourceModification;
sourceModification = this.getModification();
Calendar copyModification = ((Calendar) strategy.copy(LocatorUtils.property(locator, "modification", sourceModification), sourceModification, (this.modification!= null)));
copy.setModification(copyModification);
} else {
if (modificationShouldBeCopiedAndSet == Boolean.FALSE) {
copy.modification = null;
}
}
}
{
Boolean creationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.creation!= null));
if (creationShouldBeCopiedAndSet == Boolean.TRUE) {
Calendar sourceCreation;
sourceCreation = this.getCreation();
Calendar copyCreation = ((Calendar) strategy.copy(LocatorUtils.property(locator, "creation", sourceCreation), sourceCreation, (this.creation!= null)));
copy.setCreation(copyCreation);
} else {
if (creationShouldBeCopiedAndSet == Boolean.FALSE) {
copy.creation = null;
}
}
}
{
Boolean publishDateShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.publishDate!= null));
if (publishDateShouldBeCopiedAndSet == Boolean.TRUE) {
Calendar sourcePublishDate;
sourcePublishDate = this.getPublishDate();
Calendar copyPublishDate = ((Calendar) strategy.copy(LocatorUtils.property(locator, "publishDate", sourcePublishDate), sourcePublishDate, (this.publishDate!= null)));
copy.setPublishDate(copyPublishDate);
} else {
if (publishDateShouldBeCopiedAndSet == Boolean.FALSE) {
copy.publishDate = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new Countries.Country();
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final Countries.Country that = ((Countries.Country) object);
{
URL lhsHref;
lhsHref = this.getHref();
URL rhsHref;
rhsHref = that.getHref();
if (!strategy.equals(LocatorUtils.property(thisLocator, "href", lhsHref), LocatorUtils.property(thatLocator, "href", rhsHref), lhsHref, rhsHref, (this.href!= null), (that.href!= null))) {
return false;
}
}
{
Long lhsId;
lhsId = this.getId();
Long rhsId;
rhsId = that.getId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId, (this.id!= null), (that.id!= null))) {
return false;
}
}
{
String lhsLabel;
lhsLabel = this.getLabel();
String rhsLabel;
rhsLabel = that.getLabel();
if (!strategy.equals(LocatorUtils.property(thisLocator, "label", lhsLabel), LocatorUtils.property(thatLocator, "label", rhsLabel), lhsLabel, rhsLabel, (this.label!= null), (that.label!= null))) {
return false;
}
}
{
Calendar lhsModification;
lhsModification = this.getModification();
Calendar rhsModification;
rhsModification = that.getModification();
if (!strategy.equals(LocatorUtils.property(thisLocator, "modification", lhsModification), LocatorUtils.property(thatLocator, "modification", rhsModification), lhsModification, rhsModification, (this.modification!= null), (that.modification!= null))) {
return false;
}
}
{
Calendar lhsCreation;
lhsCreation = this.getCreation();
Calendar rhsCreation;
rhsCreation = that.getCreation();
if (!strategy.equals(LocatorUtils.property(thisLocator, "creation", lhsCreation), LocatorUtils.property(thatLocator, "creation", rhsCreation), lhsCreation, rhsCreation, (this.creation!= null), (that.creation!= null))) {
return false;
}
}
{
Calendar lhsPublishDate;
lhsPublishDate = this.getPublishDate();
Calendar rhsPublishDate;
rhsPublishDate = that.getPublishDate();
if (!strategy.equals(LocatorUtils.property(thisLocator, "publishDate", lhsPublishDate), LocatorUtils.property(thatLocator, "publishDate", rhsPublishDate), lhsPublishDate, rhsPublishDate, (this.publishDate!= null), (that.publishDate!= null))) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
}
}