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

org.openestate.io.immobiliare_it.xml.Building Maven / Gradle / Ivy

Go to download

OpenEstate-IO-ImmobiliareIT is a Java library to read and write real estate data in the XML format of immobiliare.it.

There is a newer version: 1.4
Show newest version

package org.openestate.io.immobiliare_it.xml;

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.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.io.immobiliare_it.xml.types.Category;


/**
 * 

Java class for building complex type. * *

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

 * <complexType name="building">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <all>
 *         <element name="status" type="{http://feed.immobiliare.it}status"/>
 *         <element name="terrains" type="{http://feed.immobiliare.it}terrains" minOccurs="0"/>
 *         <element name="class" type="{http://feed.immobiliare.it}class" minOccurs="0"/>
 *       </all>
 *       <attribute name="category" type="{http://feed.immobiliare.it}cat" />
 *       <attribute name="type" type="{http://feed.immobiliare.it}allPropertyTypeSimple" />
 *       <attribute name="detail" type="{http://feed.immobiliare.it}PropertyTypeBusiness" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "building", propOrder = { }) public class Building implements Cloneable, CopyTo2, Equals2, ToString2 { @XmlElement(required = true) @XmlSchemaType(name = "string") protected Status status; protected Terrains terrains; @XmlElement(name = "class") @XmlSchemaType(name = "string") protected Clazz clazz; @XmlAttribute(name = "category") @XmlJavaTypeAdapter(Adapter5 .class) protected Category category; @XmlAttribute(name = "type") protected PropertyType type; @XmlAttribute(name = "detail") protected PropertyTypeBusiness detail; /** * Gets the value of the status property. * * @return * possible object is * {@link Status } * */ public Status getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link Status } * */ public void setStatus(Status value) { this.status = value; } /** * Gets the value of the terrains property. * * @return * possible object is * {@link Terrains } * */ public Terrains getTerrains() { return terrains; } /** * Sets the value of the terrains property. * * @param value * allowed object is * {@link Terrains } * */ public void setTerrains(Terrains value) { this.terrains = value; } /** * Gets the value of the clazz property. * * @return * possible object is * {@link Clazz } * */ public Clazz getClazz() { return clazz; } /** * Sets the value of the clazz property. * * @param value * allowed object is * {@link Clazz } * */ public void setClazz(Clazz value) { this.clazz = value; } /** * Gets the value of the category property. * * @return * possible object is * {@link String } * */ public Category getCategory() { return category; } /** * Sets the value of the category property. * * @param value * allowed object is * {@link String } * */ public void setCategory(Category value) { this.category = value; } /** * Gets the value of the type property. * * @return * possible object is * {@link PropertyType } * */ public PropertyType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link PropertyType } * */ public void setType(PropertyType value) { this.type = value; } /** * Gets the value of the detail property. * * @return * possible object is * {@link PropertyTypeBusiness } * */ public PropertyTypeBusiness getDetail() { return detail; } /** * Sets the value of the detail property. * * @param value * allowed object is * {@link PropertyTypeBusiness } * */ public void setDetail(PropertyTypeBusiness value) { this.detail = 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) { { Status theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null)); } { Terrains theTerrains; theTerrains = this.getTerrains(); strategy.appendField(locator, this, "terrains", buffer, theTerrains, (this.terrains!= null)); } { Clazz theClazz; theClazz = this.getClazz(); strategy.appendField(locator, this, "clazz", buffer, theClazz, (this.clazz!= null)); } { Category theCategory; theCategory = this.getCategory(); strategy.appendField(locator, this, "category", buffer, theCategory, (this.category!= null)); } { PropertyType theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null)); } { PropertyTypeBusiness theDetail; theDetail = this.getDetail(); strategy.appendField(locator, this, "detail", buffer, theDetail, (this.detail!= 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 Building) { final Building copy = ((Building) draftCopy); { Boolean statusShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.status!= null)); if (statusShouldBeCopiedAndSet == Boolean.TRUE) { Status sourceStatus; sourceStatus = this.getStatus(); Status copyStatus = ((Status) strategy.copy(LocatorUtils.property(locator, "status", sourceStatus), sourceStatus, (this.status!= null))); copy.setStatus(copyStatus); } else { if (statusShouldBeCopiedAndSet == Boolean.FALSE) { copy.status = null; } } } { Boolean terrainsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.terrains!= null)); if (terrainsShouldBeCopiedAndSet == Boolean.TRUE) { Terrains sourceTerrains; sourceTerrains = this.getTerrains(); Terrains copyTerrains = ((Terrains) strategy.copy(LocatorUtils.property(locator, "terrains", sourceTerrains), sourceTerrains, (this.terrains!= null))); copy.setTerrains(copyTerrains); } else { if (terrainsShouldBeCopiedAndSet == Boolean.FALSE) { copy.terrains = null; } } } { Boolean clazzShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.clazz!= null)); if (clazzShouldBeCopiedAndSet == Boolean.TRUE) { Clazz sourceClazz; sourceClazz = this.getClazz(); Clazz copyClazz = ((Clazz) strategy.copy(LocatorUtils.property(locator, "clazz", sourceClazz), sourceClazz, (this.clazz!= null))); copy.setClazz(copyClazz); } else { if (clazzShouldBeCopiedAndSet == Boolean.FALSE) { copy.clazz = null; } } } { Boolean categoryShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.category!= null)); if (categoryShouldBeCopiedAndSet == Boolean.TRUE) { Category sourceCategory; sourceCategory = this.getCategory(); Category copyCategory = ((Category) strategy.copy(LocatorUtils.property(locator, "category", sourceCategory), sourceCategory, (this.category!= null))); copy.setCategory(copyCategory); } else { if (categoryShouldBeCopiedAndSet == Boolean.FALSE) { copy.category = null; } } } { Boolean typeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.type!= null)); if (typeShouldBeCopiedAndSet == Boolean.TRUE) { PropertyType sourceType; sourceType = this.getType(); PropertyType copyType = ((PropertyType) strategy.copy(LocatorUtils.property(locator, "type", sourceType), sourceType, (this.type!= null))); copy.setType(copyType); } else { if (typeShouldBeCopiedAndSet == Boolean.FALSE) { copy.type = null; } } } { Boolean detailShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.detail!= null)); if (detailShouldBeCopiedAndSet == Boolean.TRUE) { PropertyTypeBusiness sourceDetail; sourceDetail = this.getDetail(); PropertyTypeBusiness copyDetail = ((PropertyTypeBusiness) strategy.copy(LocatorUtils.property(locator, "detail", sourceDetail), sourceDetail, (this.detail!= null))); copy.setDetail(copyDetail); } else { if (detailShouldBeCopiedAndSet == Boolean.FALSE) { copy.detail = null; } } } } return draftCopy; } public Object createNewInstance() { return new Building(); } 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 Building that = ((Building) object); { Status lhsStatus; lhsStatus = this.getStatus(); Status rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus, (this.status!= null), (that.status!= null))) { return false; } } { Terrains lhsTerrains; lhsTerrains = this.getTerrains(); Terrains rhsTerrains; rhsTerrains = that.getTerrains(); if (!strategy.equals(LocatorUtils.property(thisLocator, "terrains", lhsTerrains), LocatorUtils.property(thatLocator, "terrains", rhsTerrains), lhsTerrains, rhsTerrains, (this.terrains!= null), (that.terrains!= null))) { return false; } } { Clazz lhsClazz; lhsClazz = this.getClazz(); Clazz rhsClazz; rhsClazz = that.getClazz(); if (!strategy.equals(LocatorUtils.property(thisLocator, "clazz", lhsClazz), LocatorUtils.property(thatLocator, "clazz", rhsClazz), lhsClazz, rhsClazz, (this.clazz!= null), (that.clazz!= null))) { return false; } } { Category lhsCategory; lhsCategory = this.getCategory(); Category rhsCategory; rhsCategory = that.getCategory(); if (!strategy.equals(LocatorUtils.property(thisLocator, "category", lhsCategory), LocatorUtils.property(thatLocator, "category", rhsCategory), lhsCategory, rhsCategory, (this.category!= null), (that.category!= null))) { return false; } } { PropertyType lhsType; lhsType = this.getType(); PropertyType rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) { return false; } } { PropertyTypeBusiness lhsDetail; lhsDetail = this.getDetail(); PropertyTypeBusiness rhsDetail; rhsDetail = that.getDetail(); if (!strategy.equals(LocatorUtils.property(thisLocator, "detail", lhsDetail), LocatorUtils.property(thatLocator, "detail", rhsDetail), lhsDetail, rhsDetail, (this.detail!= null), (that.detail!= 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