
org.openestate.io.immobiliare_it.xml.Publisher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of OpenEstate-IO-ImmobiliareIT Show documentation
Show all versions of OpenEstate-IO-ImmobiliareIT Show documentation
OpenEstate-IO-ImmobiliareIT is a Java library to read and write real estate data in the XML format of
immobiliare.it.
package org.openestate.io.immobiliare_it.xml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
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;
/**
* Java class for publisher complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="publisher">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="site" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="email" type="{http://feed.immobiliare.it}emailType"/>
* <element name="phone" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "publisher", propOrder = {
})
public class Publisher implements Cloneable, CopyTo2, Equals2, ToString2
{
@XmlElement(required = true)
protected String name;
protected String site;
@XmlElement(required = true)
@XmlJavaTypeAdapter(Adapter4 .class)
protected String email;
@XmlElement(required = true)
protected String phone;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the site property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSite() {
return site;
}
/**
* Sets the value of the site property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSite(String value) {
this.site = value;
}
/**
* Gets the value of the email property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEmail() {
return email;
}
/**
* Sets the value of the email property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setEmail(String value) {
this.email = value;
}
/**
* Gets the value of the phone property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPhone() {
return phone;
}
/**
* Sets the value of the phone property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPhone(String value) {
this.phone = 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 theName;
theName = this.getName();
strategy.appendField(locator, this, "name", buffer, theName, (this.name!= null));
}
{
String theSite;
theSite = this.getSite();
strategy.appendField(locator, this, "site", buffer, theSite, (this.site!= null));
}
{
String theEmail;
theEmail = this.getEmail();
strategy.appendField(locator, this, "email", buffer, theEmail, (this.email!= null));
}
{
String thePhone;
thePhone = this.getPhone();
strategy.appendField(locator, this, "phone", buffer, thePhone, (this.phone!= 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 Publisher) {
final Publisher copy = ((Publisher) draftCopy);
{
Boolean nameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.name!= null));
if (nameShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceName;
sourceName = this.getName();
String copyName = ((String) strategy.copy(LocatorUtils.property(locator, "name", sourceName), sourceName, (this.name!= null)));
copy.setName(copyName);
} else {
if (nameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.name = null;
}
}
}
{
Boolean siteShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.site!= null));
if (siteShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceSite;
sourceSite = this.getSite();
String copySite = ((String) strategy.copy(LocatorUtils.property(locator, "site", sourceSite), sourceSite, (this.site!= null)));
copy.setSite(copySite);
} else {
if (siteShouldBeCopiedAndSet == Boolean.FALSE) {
copy.site = null;
}
}
}
{
Boolean emailShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.email!= null));
if (emailShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceEmail;
sourceEmail = this.getEmail();
String copyEmail = ((String) strategy.copy(LocatorUtils.property(locator, "email", sourceEmail), sourceEmail, (this.email!= null)));
copy.setEmail(copyEmail);
} else {
if (emailShouldBeCopiedAndSet == Boolean.FALSE) {
copy.email = null;
}
}
}
{
Boolean phoneShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.phone!= null));
if (phoneShouldBeCopiedAndSet == Boolean.TRUE) {
String sourcePhone;
sourcePhone = this.getPhone();
String copyPhone = ((String) strategy.copy(LocatorUtils.property(locator, "phone", sourcePhone), sourcePhone, (this.phone!= null)));
copy.setPhone(copyPhone);
} else {
if (phoneShouldBeCopiedAndSet == Boolean.FALSE) {
copy.phone = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new Publisher();
}
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 Publisher that = ((Publisher) object);
{
String lhsName;
lhsName = this.getName();
String rhsName;
rhsName = that.getName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, (this.name!= null), (that.name!= null))) {
return false;
}
}
{
String lhsSite;
lhsSite = this.getSite();
String rhsSite;
rhsSite = that.getSite();
if (!strategy.equals(LocatorUtils.property(thisLocator, "site", lhsSite), LocatorUtils.property(thatLocator, "site", rhsSite), lhsSite, rhsSite, (this.site!= null), (that.site!= null))) {
return false;
}
}
{
String lhsEmail;
lhsEmail = this.getEmail();
String rhsEmail;
rhsEmail = that.getEmail();
if (!strategy.equals(LocatorUtils.property(thisLocator, "email", lhsEmail), LocatorUtils.property(thatLocator, "email", rhsEmail), lhsEmail, rhsEmail, (this.email!= null), (that.email!= null))) {
return false;
}
}
{
String lhsPhone;
lhsPhone = this.getPhone();
String rhsPhone;
rhsPhone = that.getPhone();
if (!strategy.equals(LocatorUtils.property(thisLocator, "phone", lhsPhone), LocatorUtils.property(thatLocator, "phone", rhsPhone), lhsPhone, rhsPhone, (this.phone!= null), (that.phone!= 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