All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openestate.is24.restapi.xml.common.Address Maven / Gradle / Ivy

Go to download

OpenEstate-IS24-REST is a client library for the REST-Webservice of ImmobilienScout24.de written in Java.

There is a newer version: 0.5
Show newest version

package org.openestate.is24.restapi.xml.common;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSeeAlso;
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;


/**
 * Definition der Basisfelder einer Adresse.
 * 
 * 

Java class for Address complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="Address">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="street" minOccurs="0">
 *           <simpleType>
 *             <restriction base="{http://rest.immobilienscout24.de/schema/common/1.0}TextField">
 *               <maxLength value="100"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *         <element name="houseNumber" minOccurs="0">
 *           <simpleType>
 *             <restriction base="{http://rest.immobilienscout24.de/schema/common/1.0}TextField">
 *               <maxLength value="30"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *         <element name="postcode" minOccurs="0">
 *           <simpleType>
 *             <restriction base="{http://rest.immobilienscout24.de/schema/common/1.0}TextField">
 *               <maxLength value="20"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *         <element name="city" minOccurs="0">
 *           <simpleType>
 *             <restriction base="{http://rest.immobilienscout24.de/schema/common/1.0}TextField">
 *               <maxLength value="50"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *         <element name="internationalCountryRegion" type="{http://rest.immobilienscout24.de/schema/common/1.0}CountryRegion" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Address", propOrder = { "street", "houseNumber", "postcode", "city", "internationalCountryRegion" }) @XmlSeeAlso({ Wgs84Address.class }) public class Address implements Serializable, Cloneable, CopyTo2, Equals2, ToString2 { @XmlJavaTypeAdapter(Adapter36 .class) protected String street; @XmlJavaTypeAdapter(Adapter37 .class) protected String houseNumber; @XmlJavaTypeAdapter(Adapter38 .class) protected String postcode; @XmlJavaTypeAdapter(Adapter39 .class) protected String city; protected CountryRegion internationalCountryRegion; /** * Gets the value of the street property. * * @return * possible object is * {@link String } * */ public String getStreet() { return street; } /** * Sets the value of the street property. * * @param value * allowed object is * {@link String } * */ public void setStreet(String value) { this.street = value; } /** * Gets the value of the houseNumber property. * * @return * possible object is * {@link String } * */ public String getHouseNumber() { return houseNumber; } /** * Sets the value of the houseNumber property. * * @param value * allowed object is * {@link String } * */ public void setHouseNumber(String value) { this.houseNumber = value; } /** * Gets the value of the postcode property. * * @return * possible object is * {@link String } * */ public String getPostcode() { return postcode; } /** * Sets the value of the postcode property. * * @param value * allowed object is * {@link String } * */ public void setPostcode(String value) { this.postcode = value; } /** * Gets the value of the city property. * * @return * possible object is * {@link String } * */ public String getCity() { return city; } /** * Sets the value of the city property. * * @param value * allowed object is * {@link String } * */ public void setCity(String value) { this.city = value; } /** * Gets the value of the internationalCountryRegion property. * * @return * possible object is * {@link CountryRegion } * */ public CountryRegion getInternationalCountryRegion() { return internationalCountryRegion; } /** * Sets the value of the internationalCountryRegion property. * * @param value * allowed object is * {@link CountryRegion } * */ public void setInternationalCountryRegion(CountryRegion value) { this.internationalCountryRegion = 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) { { String theStreet; theStreet = this.getStreet(); strategy.appendField(locator, this, "street", buffer, theStreet, (this.street!= null)); } { String theHouseNumber; theHouseNumber = this.getHouseNumber(); strategy.appendField(locator, this, "houseNumber", buffer, theHouseNumber, (this.houseNumber!= null)); } { String thePostcode; thePostcode = this.getPostcode(); strategy.appendField(locator, this, "postcode", buffer, thePostcode, (this.postcode!= null)); } { String theCity; theCity = this.getCity(); strategy.appendField(locator, this, "city", buffer, theCity, (this.city!= null)); } { CountryRegion theInternationalCountryRegion; theInternationalCountryRegion = this.getInternationalCountryRegion(); strategy.appendField(locator, this, "internationalCountryRegion", buffer, theInternationalCountryRegion, (this.internationalCountryRegion!= 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 Address) { final Address copy = ((Address) draftCopy); { Boolean streetShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.street!= null)); if (streetShouldBeCopiedAndSet == Boolean.TRUE) { String sourceStreet; sourceStreet = this.getStreet(); String copyStreet = ((String) strategy.copy(LocatorUtils.property(locator, "street", sourceStreet), sourceStreet, (this.street!= null))); copy.setStreet(copyStreet); } else { if (streetShouldBeCopiedAndSet == Boolean.FALSE) { copy.street = null; } } } { Boolean houseNumberShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.houseNumber!= null)); if (houseNumberShouldBeCopiedAndSet == Boolean.TRUE) { String sourceHouseNumber; sourceHouseNumber = this.getHouseNumber(); String copyHouseNumber = ((String) strategy.copy(LocatorUtils.property(locator, "houseNumber", sourceHouseNumber), sourceHouseNumber, (this.houseNumber!= null))); copy.setHouseNumber(copyHouseNumber); } else { if (houseNumberShouldBeCopiedAndSet == Boolean.FALSE) { copy.houseNumber = null; } } } { Boolean postcodeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.postcode!= null)); if (postcodeShouldBeCopiedAndSet == Boolean.TRUE) { String sourcePostcode; sourcePostcode = this.getPostcode(); String copyPostcode = ((String) strategy.copy(LocatorUtils.property(locator, "postcode", sourcePostcode), sourcePostcode, (this.postcode!= null))); copy.setPostcode(copyPostcode); } else { if (postcodeShouldBeCopiedAndSet == Boolean.FALSE) { copy.postcode = null; } } } { Boolean cityShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.city!= null)); if (cityShouldBeCopiedAndSet == Boolean.TRUE) { String sourceCity; sourceCity = this.getCity(); String copyCity = ((String) strategy.copy(LocatorUtils.property(locator, "city", sourceCity), sourceCity, (this.city!= null))); copy.setCity(copyCity); } else { if (cityShouldBeCopiedAndSet == Boolean.FALSE) { copy.city = null; } } } { Boolean internationalCountryRegionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.internationalCountryRegion!= null)); if (internationalCountryRegionShouldBeCopiedAndSet == Boolean.TRUE) { CountryRegion sourceInternationalCountryRegion; sourceInternationalCountryRegion = this.getInternationalCountryRegion(); CountryRegion copyInternationalCountryRegion = ((CountryRegion) strategy.copy(LocatorUtils.property(locator, "internationalCountryRegion", sourceInternationalCountryRegion), sourceInternationalCountryRegion, (this.internationalCountryRegion!= null))); copy.setInternationalCountryRegion(copyInternationalCountryRegion); } else { if (internationalCountryRegionShouldBeCopiedAndSet == Boolean.FALSE) { copy.internationalCountryRegion = null; } } } } return draftCopy; } public Object createNewInstance() { return new Address(); } 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 Address that = ((Address) object); { String lhsStreet; lhsStreet = this.getStreet(); String rhsStreet; rhsStreet = that.getStreet(); if (!strategy.equals(LocatorUtils.property(thisLocator, "street", lhsStreet), LocatorUtils.property(thatLocator, "street", rhsStreet), lhsStreet, rhsStreet, (this.street!= null), (that.street!= null))) { return false; } } { String lhsHouseNumber; lhsHouseNumber = this.getHouseNumber(); String rhsHouseNumber; rhsHouseNumber = that.getHouseNumber(); if (!strategy.equals(LocatorUtils.property(thisLocator, "houseNumber", lhsHouseNumber), LocatorUtils.property(thatLocator, "houseNumber", rhsHouseNumber), lhsHouseNumber, rhsHouseNumber, (this.houseNumber!= null), (that.houseNumber!= null))) { return false; } } { String lhsPostcode; lhsPostcode = this.getPostcode(); String rhsPostcode; rhsPostcode = that.getPostcode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "postcode", lhsPostcode), LocatorUtils.property(thatLocator, "postcode", rhsPostcode), lhsPostcode, rhsPostcode, (this.postcode!= null), (that.postcode!= null))) { return false; } } { String lhsCity; lhsCity = this.getCity(); String rhsCity; rhsCity = that.getCity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "city", lhsCity), LocatorUtils.property(thatLocator, "city", rhsCity), lhsCity, rhsCity, (this.city!= null), (that.city!= null))) { return false; } } { CountryRegion lhsInternationalCountryRegion; lhsInternationalCountryRegion = this.getInternationalCountryRegion(); CountryRegion rhsInternationalCountryRegion; rhsInternationalCountryRegion = that.getInternationalCountryRegion(); if (!strategy.equals(LocatorUtils.property(thisLocator, "internationalCountryRegion", lhsInternationalCountryRegion), LocatorUtils.property(thatLocator, "internationalCountryRegion", rhsInternationalCountryRegion), lhsInternationalCountryRegion, rhsInternationalCountryRegion, (this.internationalCountryRegion!= null), (that.internationalCountryRegion!= null))) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy