package org.openestate.io.casa_it.xml;

import javax.xml.bind.annotation.XmlRegistry;

/**
 * This object contains factory methods for each
 * Java content interface and Java element interface
 * generated in the org.openestate.io.casa_it.xml package.
 * <p>An ObjectFactory allows you to programatically
 * construct new instances of the Java representation
 * for XML content. The Java representation of XML
 * content can consist of schema derived interfaces
 * and classes representing the binding of schema
 * type definitions, element declarations and model
 * groups.  Factory methods for each of these are
 * provided in this class.
 *
 */
@XmlRegistry
public class ObjectFactory {

    /**
     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openestate.io.casa_it.xml
     *
     */
    public ObjectFactory() {
    }

    /**
     * Create an instance of {@link Container }
     *
     */
    public Container createContainer() {
        return new Container();
    }

    /**
     * Create an instance of {@link Container.Realestateitems }
     *
     */
    public Container.Realestateitems createContainerRealestateitems() {
        return new Container.Realestateitems();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate }
     *
     */
    public Container.Realestateitems.Realestate createContainerRealestateitemsRealestate() {
        return new Container.Realestateitems.Realestate();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Images }
     *
     */
    public Container.Realestateitems.Realestate.Images createContainerRealestateitemsRealestateImages() {
        return new Container.Realestateitems.Realestate.Images();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Address }
     *
     */
    public Container.Realestateitems.Realestate.Address createContainerRealestateitemsRealestateAddress() {
        return new Container.Realestateitems.Realestate.Address();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Description }
     *
     */
    public Container.Realestateitems.Realestate.Description createContainerRealestateitemsRealestateDescription() {
        return new Container.Realestateitems.Realestate.Description();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Building }
     *
     */
    public Container.Realestateitems.Realestate.Building createContainerRealestateitemsRealestateBuilding() {
        return new Container.Realestateitems.Realestate.Building();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Price }
     *
     */
    public Container.Realestateitems.Realestate.Price createContainerRealestateitemsRealestatePrice() {
        return new Container.Realestateitems.Realestate.Price();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Box }
     *
     */
    public Container.Realestateitems.Realestate.Box createContainerRealestateitemsRealestateBox() {
        return new Container.Realestateitems.Realestate.Box();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Garden }
     *
     */
    public Container.Realestateitems.Realestate.Garden createContainerRealestateitemsRealestateGarden() {
        return new Container.Realestateitems.Realestate.Garden();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Configuration }
     *
     */
    public Container.Realestateitems.Realestate.Configuration createContainerRealestateitemsRealestateConfiguration() {
        return new Container.Realestateitems.Realestate.Configuration();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Googlemapcoordinate }
     *
     */
    public Container.Realestateitems.Realestate.Googlemapcoordinate createContainerRealestateitemsRealestateGooglemapcoordinate() {
        return new Container.Realestateitems.Realestate.Googlemapcoordinate();
    }

    /**
     * Create an instance of {@link Container.Realestateitems.Realestate.Images.Advertismentimage }
     *
     */
    public Container.Realestateitems.Realestate.Images.Advertismentimage createContainerRealestateitemsRealestateImagesAdvertismentimage() {
        return new Container.Realestateitems.Realestate.Images.Advertismentimage();
    }

}


package org.openestate.io.is24_xml.xml;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.annotation.Generated;
import javax.xml.bind.JAXBElement;
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.XmlElementRef;
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;

/**
 *
Java class for EinzelhandelTyp complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="EinzelhandelTyp">
 *   <complexContent>
 *     <extension base="{http://www.immobilienscout24.de/immobilientransfer}GewerbeImmoBaseTyp">
 *       <sequence>
 *         <element name="Vermarktung" type="{http://www.immobilienscout24.de/immobilientransfer}VermarktungGewerbeTyp"/>
 *         <element name="Lastenaufzug" type="{http://www.immobilienscout24.de/immobilientransfer}HebeanlageTyp" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="Objektkategorie2" type="{http://www.immobilienscout24.de/immobilientransfer}EinzelhandelKategorienTyp" default="keineAngabe" />
 *       <attribute name="Verkaufsflaeche" use="required" type="{http://www.immobilienscout24.de/immobilientransfer}Zahl102Typ" />
 *       <attribute name="Bodenbelag" type="{http://www.immobilienscout24.de/immobilientransfer}BodenbelagTyp" />
 *       <attribute name="Schaufensterfront" type="{http://www.immobilienscout24.de/immobilientransfer}Zahl52Typ" />
 *       <attribute name="Deckenlast" type="{http://www.immobilienscout24.de/immobilientransfer}Zahl72Typ" />
 *       <attribute name="Lageart" type="{http://www.immobilienscout24.de/immobilientransfer}LageartTyp" />
 *       <attribute name="Rampe" type="{http://www.w3.org/2001/XMLSchema}boolean" />
 *       <attribute name="Zulieferung" type="{http://www.immobilienscout24.de/immobilientransfer}ZulieferungTyp" />
 *       <attribute name="Denkmalschutzobjekt" type="{http://www.w3.org/2001/XMLSchema}boolean" />
 *       <attribute name="Keller" type="{http://www.w3.org/2001/XMLSchema}boolean" />
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EinzelhandelTyp", propOrder = {
    "vermarktung",
    "lastenaufzug"
})
@XmlSeeAlso({
    org.openestate.io.is24_xml.xml.Einzelhandel.Type.class
})
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
public class EinzelhandelTyp
    extends GewerbeImmoBaseTyp
    implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{

    @XmlElement(name = "Vermarktung", required = true)
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected VermarktungGewerbeTyp vermarktung;
    @XmlElementRef(name = "Lastenaufzug", namespace = "http://www.immobilienscout24.de/immobilientransfer", type = JAXBElement.class, required = false)
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected JAXBElement<HebeanlageTyp> lastenaufzug;
    @XmlAttribute(name = "Objektkategorie2")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected EinzelhandelKategorienTyp objektkategorie2;
    @XmlAttribute(name = "Verkaufsflaeche", required = true)
    @XmlJavaTypeAdapter(Adapter34 .class)
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected BigDecimal verkaufsflaeche;
    @XmlAttribute(name = "Bodenbelag")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected BodenbelagTyp bodenbelag;
    @XmlAttribute(name = "Schaufensterfront")
    @XmlJavaTypeAdapter(Adapter30 .class)
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected BigDecimal schaufensterfront;
    @XmlAttribute(name = "Deckenlast")
    @XmlJavaTypeAdapter(Adapter33 .class)
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected BigDecimal deckenlast;
    @XmlAttribute(name = "Lageart")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected LageartTyp lageart;
    @XmlAttribute(name = "Rampe")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected Boolean rampe;
    @XmlAttribute(name = "Zulieferung")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected ZulieferungTyp zulieferung;
    @XmlAttribute(name = "Denkmalschutzobjekt")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected Boolean denkmalschutzobjekt;
    @XmlAttribute(name = "Keller")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    protected Boolean keller;

    /**
     * Gets the value of the vermarktung property.
     *
     * @return
     *     possible object is
     *     {@link VermarktungGewerbeTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public VermarktungGewerbeTyp getVermarktung() {
        return vermarktung;
    }

    /**
     * Sets the value of the vermarktung property.
     *
     * @param value
     *     allowed object is
     *     {@link VermarktungGewerbeTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setVermarktung(VermarktungGewerbeTyp value) {
        this.vermarktung = value;
    }

    /**
     * Gets the value of the lastenaufzug property.
     *
     * @return
     *     possible object is
     *     {@link JAXBElement }{@code <}{@link HebeanlageTyp }{@code >}
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public JAXBElement<HebeanlageTyp> getLastenaufzug() {
        return lastenaufzug;
    }

    /**
     * Sets the value of the lastenaufzug property.
     *
     * @param value
     *     allowed object is
     *     {@link JAXBElement }{@code <}{@link HebeanlageTyp }{@code >}
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setLastenaufzug(JAXBElement<HebeanlageTyp> value) {
        this.lastenaufzug = value;
    }

    /**
     * Gets the value of the objektkategorie2 property.
     *
     * @return
     *     possible object is
     *     {@link EinzelhandelKategorienTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public EinzelhandelKategorienTyp getObjektkategorie2() {
        if (objektkategorie2 == null) {
            return EinzelhandelKategorienTyp.KEINE_ANGABE;
        } else {
            return objektkategorie2;
        }
    }

    /**
     * Sets the value of the objektkategorie2 property.
     *
     * @param value
     *     allowed object is
     *     {@link EinzelhandelKategorienTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setObjektkategorie2(EinzelhandelKategorienTyp value) {
        this.objektkategorie2 = value;
    }

    /**
     * Gets the value of the verkaufsflaeche property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public BigDecimal getVerkaufsflaeche() {
        return verkaufsflaeche;
    }

    /**
     * Sets the value of the verkaufsflaeche property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setVerkaufsflaeche(BigDecimal value) {
        this.verkaufsflaeche = value;
    }

    /**
     * Gets the value of the bodenbelag property.
     *
     * @return
     *     possible object is
     *     {@link BodenbelagTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public BodenbelagTyp getBodenbelag() {
        return bodenbelag;
    }

    /**
     * Sets the value of the bodenbelag property.
     *
     * @param value
     *     allowed object is
     *     {@link BodenbelagTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setBodenbelag(BodenbelagTyp value) {
        this.bodenbelag = value;
    }

    /**
     * Gets the value of the schaufensterfront property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public BigDecimal getSchaufensterfront() {
        return schaufensterfront;
    }

    /**
     * Sets the value of the schaufensterfront property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setSchaufensterfront(BigDecimal value) {
        this.schaufensterfront = value;
    }

    /**
     * Gets the value of the deckenlast property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public BigDecimal getDeckenlast() {
        return deckenlast;
    }

    /**
     * Sets the value of the deckenlast property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setDeckenlast(BigDecimal value) {
        this.deckenlast = value;
    }

    /**
     * Gets the value of the lageart property.
     *
     * @return
     *     possible object is
     *     {@link LageartTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public LageartTyp getLageart() {
        return lageart;
    }

    /**
     * Sets the value of the lageart property.
     *
     * @param value
     *     allowed object is
     *     {@link LageartTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setLageart(LageartTyp value) {
        this.lageart = value;
    }

    /**
     * Gets the value of the rampe property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public Boolean getRampe() {
        return rampe;
    }

    /**
     * Sets the value of the rampe property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setRampe(Boolean value) {
        this.rampe = value;
    }

    /**
     * Gets the value of the zulieferung property.
     *
     * @return
     *     possible object is
     *     {@link ZulieferungTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public ZulieferungTyp getZulieferung() {
        return zulieferung;
    }

    /**
     * Sets the value of the zulieferung property.
     *
     * @param value
     *     allowed object is
     *     {@link ZulieferungTyp }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setZulieferung(ZulieferungTyp value) {
        this.zulieferung = value;
    }

    /**
     * Gets the value of the denkmalschutzobjekt property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public Boolean getDenkmalschutzobjekt() {
        return denkmalschutzobjekt;
    }

    /**
     * Sets the value of the denkmalschutzobjekt property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setDenkmalschutzobjekt(Boolean value) {
        this.denkmalschutzobjekt = value;
    }

    /**
     * Gets the value of the keller property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public Boolean getKeller() {
        return keller;
    }

    /**
     * Sets the value of the keller property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setKeller(Boolean value) {
        this.keller = value;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public String toString() {
        final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    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;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        super.appendFields(locator, buffer, strategy);
        {
            VermarktungGewerbeTyp theVermarktung;
            theVermarktung = this.getVermarktung();
            strategy.appendField(locator, this, "vermarktung", buffer, theVermarktung, (this.vermarktung!= null));
        }
        {
            JAXBElement<HebeanlageTyp> theLastenaufzug;
            theLastenaufzug = this.getLastenaufzug();
            strategy.appendField(locator, this, "lastenaufzug", buffer, theLastenaufzug, (this.lastenaufzug!= null));
        }
        {
            EinzelhandelKategorienTyp theObjektkategorie2;
            theObjektkategorie2 = this.getObjektkategorie2();
            strategy.appendField(locator, this, "objektkategorie2", buffer, theObjektkategorie2, (this.objektkategorie2 != null));
        }
        {
            BigDecimal theVerkaufsflaeche;
            theVerkaufsflaeche = this.getVerkaufsflaeche();
            strategy.appendField(locator, this, "verkaufsflaeche", buffer, theVerkaufsflaeche, (this.verkaufsflaeche!= null));
        }
        {
            BodenbelagTyp theBodenbelag;
            theBodenbelag = this.getBodenbelag();
            strategy.appendField(locator, this, "bodenbelag", buffer, theBodenbelag, (this.bodenbelag!= null));
        }
        {
            BigDecimal theSchaufensterfront;
            theSchaufensterfront = this.getSchaufensterfront();
            strategy.appendField(locator, this, "schaufensterfront", buffer, theSchaufensterfront, (this.schaufensterfront!= null));
        }
        {
            BigDecimal theDeckenlast;
            theDeckenlast = this.getDeckenlast();
            strategy.appendField(locator, this, "deckenlast", buffer, theDeckenlast, (this.deckenlast!= null));
        }
        {
            LageartTyp theLageart;
            theLageart = this.getLageart();
            strategy.appendField(locator, this, "lageart", buffer, theLageart, (this.lageart!= null));
        }
        {
            Boolean theRampe;
            theRampe = this.getRampe();
            strategy.appendField(locator, this, "rampe", buffer, theRampe, (this.rampe!= null));
        }
        {
            ZulieferungTyp theZulieferung;
            theZulieferung = this.getZulieferung();
            strategy.appendField(locator, this, "zulieferung", buffer, theZulieferung, (this.zulieferung!= null));
        }
        {
            Boolean theDenkmalschutzobjekt;
            theDenkmalschutzobjekt = this.getDenkmalschutzobjekt();
            strategy.appendField(locator, this, "denkmalschutzobjekt", buffer, theDenkmalschutzobjekt, (this.denkmalschutzobjekt!= null));
        }
        {
            Boolean theKeller;
            theKeller = this.getKeller();
            strategy.appendField(locator, this, "keller", buffer, theKeller, (this.keller!= null));
        }
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public Object clone() {
        return copyTo(createNewInstance());
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public Object copyTo(Object target) {
        final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
        return copyTo(null, target, strategy);
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
        final Object draftCopy = ((target == null)?createNewInstance():target);
        super.copyTo(locator, draftCopy, strategy);
        if (draftCopy instanceof EinzelhandelTyp) {
            final EinzelhandelTyp copy = ((EinzelhandelTyp) draftCopy);
            {
                Boolean vermarktungShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.vermarktung!= null));
                if (vermarktungShouldBeCopiedAndSet == Boolean.TRUE) {
                    VermarktungGewerbeTyp sourceVermarktung;
                    sourceVermarktung = this.getVermarktung();
                    VermarktungGewerbeTyp copyVermarktung = ((VermarktungGewerbeTyp) strategy.copy(LocatorUtils.property(locator, "vermarktung", sourceVermarktung), sourceVermarktung, (this.vermarktung!= null)));
                    copy.setVermarktung(copyVermarktung);
                } else {
                    if (vermarktungShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.vermarktung = null;
                    }
                }
            }
            {
                Boolean lastenaufzugShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.lastenaufzug!= null));
                if (lastenaufzugShouldBeCopiedAndSet == Boolean.TRUE) {
                    JAXBElement<HebeanlageTyp> sourceLastenaufzug;
                    sourceLastenaufzug = this.getLastenaufzug();
                    @SuppressWarnings("unchecked")
                    JAXBElement<HebeanlageTyp> copyLastenaufzug = ((JAXBElement<HebeanlageTyp> ) strategy.copy(LocatorUtils.property(locator, "lastenaufzug", sourceLastenaufzug), sourceLastenaufzug, (this.lastenaufzug!= null)));
                    copy.setLastenaufzug(copyLastenaufzug);
                } else {
                    if (lastenaufzugShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.lastenaufzug = null;
                    }
                }
            }
            {
                Boolean objektkategorie2ShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.objektkategorie2 != null));
                if (objektkategorie2ShouldBeCopiedAndSet == Boolean.TRUE) {
                    EinzelhandelKategorienTyp sourceObjektkategorie2;
                    sourceObjektkategorie2 = this.getObjektkategorie2();
                    EinzelhandelKategorienTyp copyObjektkategorie2 = ((EinzelhandelKategorienTyp) strategy.copy(LocatorUtils.property(locator, "objektkategorie2", sourceObjektkategorie2), sourceObjektkategorie2, (this.objektkategorie2 != null)));
                    copy.setObjektkategorie2(copyObjektkategorie2);
                } else {
                    if (objektkategorie2ShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.objektkategorie2 = null;
                    }
                }
            }
            {
                Boolean verkaufsflaecheShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.verkaufsflaeche!= null));
                if (verkaufsflaecheShouldBeCopiedAndSet == Boolean.TRUE) {
                    BigDecimal sourceVerkaufsflaeche;
                    sourceVerkaufsflaeche = this.getVerkaufsflaeche();
                    BigDecimal copyVerkaufsflaeche = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "verkaufsflaeche", sourceVerkaufsflaeche), sourceVerkaufsflaeche, (this.verkaufsflaeche!= null)));
                    copy.setVerkaufsflaeche(copyVerkaufsflaeche);
                } else {
                    if (verkaufsflaecheShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.verkaufsflaeche = null;
                    }
                }
            }
            {
                Boolean bodenbelagShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.bodenbelag!= null));
                if (bodenbelagShouldBeCopiedAndSet == Boolean.TRUE) {
                    BodenbelagTyp sourceBodenbelag;
                    sourceBodenbelag = this.getBodenbelag();
                    BodenbelagTyp copyBodenbelag = ((BodenbelagTyp) strategy.copy(LocatorUtils.property(locator, "bodenbelag", sourceBodenbelag), sourceBodenbelag, (this.bodenbelag!= null)));
                    copy.setBodenbelag(copyBodenbelag);
                } else {
                    if (bodenbelagShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.bodenbelag = null;
                    }
                }
            }
            {
                Boolean schaufensterfrontShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.schaufensterfront!= null));
                if (schaufensterfrontShouldBeCopiedAndSet == Boolean.TRUE) {
                    BigDecimal sourceSchaufensterfront;
                    sourceSchaufensterfront = this.getSchaufensterfront();
                    BigDecimal copySchaufensterfront = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "schaufensterfront", sourceSchaufensterfront), sourceSchaufensterfront, (this.schaufensterfront!= null)));
                    copy.setSchaufensterfront(copySchaufensterfront);
                } else {
                    if (schaufensterfrontShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.schaufensterfront = null;
                    }
                }
            }
            {
                Boolean deckenlastShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.deckenlast!= null));
                if (deckenlastShouldBeCopiedAndSet == Boolean.TRUE) {
                    BigDecimal sourceDeckenlast;
                    sourceDeckenlast = this.getDeckenlast();
                    BigDecimal copyDeckenlast = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "deckenlast", sourceDeckenlast), sourceDeckenlast, (this.deckenlast!= null)));
                    copy.setDeckenlast(copyDeckenlast);
                } else {
                    if (deckenlastShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.deckenlast = null;
                    }
                }
            }
            {
                Boolean lageartShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.lageart!= null));
                if (lageartShouldBeCopiedAndSet == Boolean.TRUE) {
                    LageartTyp sourceLageart;
                    sourceLageart = this.getLageart();
                    LageartTyp copyLageart = ((LageartTyp) strategy.copy(LocatorUtils.property(locator, "lageart", sourceLageart), sourceLageart, (this.lageart!= null)));
                    copy.setLageart(copyLageart);
                } else {
                    if (lageartShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.lageart = null;
                    }
                }
            }
            {
                Boolean rampeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.rampe!= null));
                if (rampeShouldBeCopiedAndSet == Boolean.TRUE) {
                    Boolean sourceRampe;
                    sourceRampe = this.getRampe();
                    Boolean copyRampe = ((Boolean) strategy.copy(LocatorUtils.property(locator, "rampe", sourceRampe), sourceRampe, (this.rampe!= null)));
                    copy.setRampe(copyRampe);
                } else {
                    if (rampeShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.rampe = null;
                    }
                }
            }
            {
                Boolean zulieferungShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.zulieferung!= null));
                if (zulieferungShouldBeCopiedAndSet == Boolean.TRUE) {
                    ZulieferungTyp sourceZulieferung;
                    sourceZulieferung = this.getZulieferung();
                    ZulieferungTyp copyZulieferung = ((ZulieferungTyp) strategy.copy(LocatorUtils.property(locator, "zulieferung", sourceZulieferung), sourceZulieferung, (this.zulieferung!= null)));
                    copy.setZulieferung(copyZulieferung);
                } else {
                    if (zulieferungShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.zulieferung = null;
                    }
                }
            }
            {
                Boolean denkmalschutzobjektShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.denkmalschutzobjekt!= null));
                if (denkmalschutzobjektShouldBeCopiedAndSet == Boolean.TRUE) {
                    Boolean sourceDenkmalschutzobjekt;
                    sourceDenkmalschutzobjekt = this.getDenkmalschutzobjekt();
                    Boolean copyDenkmalschutzobjekt = ((Boolean) strategy.copy(LocatorUtils.property(locator, "denkmalschutzobjekt", sourceDenkmalschutzobjekt), sourceDenkmalschutzobjekt, (this.denkmalschutzobjekt!= null)));
                    copy.setDenkmalschutzobjekt(copyDenkmalschutzobjekt);
                } else {
                    if (denkmalschutzobjektShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.denkmalschutzobjekt = null;
                    }
                }
            }
            {
                Boolean kellerShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.keller!= null));
                if (kellerShouldBeCopiedAndSet == Boolean.TRUE) {
                    Boolean sourceKeller;
                    sourceKeller = this.getKeller();
                    Boolean copyKeller = ((Boolean) strategy.copy(LocatorUtils.property(locator, "keller", sourceKeller), sourceKeller, (this.keller!= null)));
                    copy.setKeller(copyKeller);
                } else {
                    if (kellerShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.keller = null;
                    }
                }
            }
        }
        return draftCopy;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public Object createNewInstance() {
        return new EinzelhandelTyp();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    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;
        }
        if (!super.equals(thisLocator, thatLocator, object, strategy)) {
            return false;
        }
        final EinzelhandelTyp that = ((EinzelhandelTyp) object);
        {
            VermarktungGewerbeTyp lhsVermarktung;
            lhsVermarktung = this.getVermarktung();
            VermarktungGewerbeTyp rhsVermarktung;
            rhsVermarktung = that.getVermarktung();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "vermarktung", lhsVermarktung), LocatorUtils.property(thatLocator, "vermarktung", rhsVermarktung), lhsVermarktung, rhsVermarktung, (this.vermarktung!= null), (that.vermarktung!= null))) {
                return false;
            }
        }
        {
            JAXBElement<HebeanlageTyp> lhsLastenaufzug;
            lhsLastenaufzug = this.getLastenaufzug();
            JAXBElement<HebeanlageTyp> rhsLastenaufzug;
            rhsLastenaufzug = that.getLastenaufzug();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "lastenaufzug", lhsLastenaufzug), LocatorUtils.property(thatLocator, "lastenaufzug", rhsLastenaufzug), lhsLastenaufzug, rhsLastenaufzug, (this.lastenaufzug!= null), (that.lastenaufzug!= null))) {
                return false;
            }
        }
        {
            EinzelhandelKategorienTyp lhsObjektkategorie2;
            lhsObjektkategorie2 = this.getObjektkategorie2();
            EinzelhandelKategorienTyp rhsObjektkategorie2;
            rhsObjektkategorie2 = that.getObjektkategorie2();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "objektkategorie2", lhsObjektkategorie2), LocatorUtils.property(thatLocator, "objektkategorie2", rhsObjektkategorie2), lhsObjektkategorie2, rhsObjektkategorie2, (this.objektkategorie2 != null), (that.objektkategorie2 != null))) {
                return false;
            }
        }
        {
            BigDecimal lhsVerkaufsflaeche;
            lhsVerkaufsflaeche = this.getVerkaufsflaeche();
            BigDecimal rhsVerkaufsflaeche;
            rhsVerkaufsflaeche = that.getVerkaufsflaeche();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "verkaufsflaeche", lhsVerkaufsflaeche), LocatorUtils.property(thatLocator, "verkaufsflaeche", rhsVerkaufsflaeche), lhsVerkaufsflaeche, rhsVerkaufsflaeche, (this.verkaufsflaeche!= null), (that.verkaufsflaeche!= null))) {
                return false;
            }
        }
        {
            BodenbelagTyp lhsBodenbelag;
            lhsBodenbelag = this.getBodenbelag();
            BodenbelagTyp rhsBodenbelag;
            rhsBodenbelag = that.getBodenbelag();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "bodenbelag", lhsBodenbelag), LocatorUtils.property(thatLocator, "bodenbelag", rhsBodenbelag), lhsBodenbelag, rhsBodenbelag, (this.bodenbelag!= null), (that.bodenbelag!= null))) {
                return false;
            }
        }
        {
            BigDecimal lhsSchaufensterfront;
            lhsSchaufensterfront = this.getSchaufensterfront();
            BigDecimal rhsSchaufensterfront;
            rhsSchaufensterfront = that.getSchaufensterfront();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "schaufensterfront", lhsSchaufensterfront), LocatorUtils.property(thatLocator, "schaufensterfront", rhsSchaufensterfront), lhsSchaufensterfront, rhsSchaufensterfront, (this.schaufensterfront!= null), (that.schaufensterfront!= null))) {
                return false;
            }
        }
        {
            BigDecimal lhsDeckenlast;
            lhsDeckenlast = this.getDeckenlast();
            BigDecimal rhsDeckenlast;
            rhsDeckenlast = that.getDeckenlast();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "deckenlast", lhsDeckenlast), LocatorUtils.property(thatLocator, "deckenlast", rhsDeckenlast), lhsDeckenlast, rhsDeckenlast, (this.deckenlast!= null), (that.deckenlast!= null))) {
                return false;
            }
        }
        {
            LageartTyp lhsLageart;
            lhsLageart = this.getLageart();
            LageartTyp rhsLageart;
            rhsLageart = that.getLageart();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "lageart", lhsLageart), LocatorUtils.property(thatLocator, "lageart", rhsLageart), lhsLageart, rhsLageart, (this.lageart!= null), (that.lageart!= null))) {
                return false;
            }
        }
        {
            Boolean lhsRampe;
            lhsRampe = this.getRampe();
            Boolean rhsRampe;
            rhsRampe = that.getRampe();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "rampe", lhsRampe), LocatorUtils.property(thatLocator, "rampe", rhsRampe), lhsRampe, rhsRampe, (this.rampe!= null), (that.rampe!= null))) {
                return false;
            }
        }
        {
            ZulieferungTyp lhsZulieferung;
            lhsZulieferung = this.getZulieferung();
            ZulieferungTyp rhsZulieferung;
            rhsZulieferung = that.getZulieferung();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "zulieferung", lhsZulieferung), LocatorUtils.property(thatLocator, "zulieferung", rhsZulieferung), lhsZulieferung, rhsZulieferung, (this.zulieferung!= null), (that.zulieferung!= null))) {
                return false;
            }
        }
        {
            Boolean lhsDenkmalschutzobjekt;
            lhsDenkmalschutzobjekt = this.getDenkmalschutzobjekt();
            Boolean rhsDenkmalschutzobjekt;
            rhsDenkmalschutzobjekt = that.getDenkmalschutzobjekt();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "denkmalschutzobjekt", lhsDenkmalschutzobjekt), LocatorUtils.property(thatLocator, "denkmalschutzobjekt", rhsDenkmalschutzobjekt), lhsDenkmalschutzobjekt, rhsDenkmalschutzobjekt, (this.denkmalschutzobjekt!= null), (that.denkmalschutzobjekt!= null))) {
                return false;
            }
        }
        {
            Boolean lhsKeller;
            lhsKeller = this.getKeller();
            Boolean rhsKeller;
            rhsKeller = that.getKeller();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "keller", lhsKeller), LocatorUtils.property(thatLocator, "keller", rhsKeller), lhsKeller, rhsKeller, (this.keller!= null), (that.keller!= null))) {
                return false;
            }
        }
        return true;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public boolean equals(Object object) {
        final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
        return equals(null, null, object, strategy);
    }

}


package org.openestate.io.immoxml.xml;

import java.io.Serializable;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
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 <zustand> element.
 *
 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "zustand")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
public class Zustand implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{

    @XmlAttribute(name = "zustand_art")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    protected Zustand.ZustandArt zustandArt;

    /**
     * Gets the value of the zustandArt property.
     *
     * @return
     *     possible object is
     *     {@link Zustand.ZustandArt }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public Zustand.ZustandArt getZustandArt() {
        return zustandArt;
    }

    /**
     * Sets the value of the zustandArt property.
     *
     * @param value
     *     allowed object is
     *     {@link Zustand.ZustandArt }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public void setZustandArt(Zustand.ZustandArt value) {
        this.zustandArt = value;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public String toString() {
        final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    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;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        {
            Zustand.ZustandArt theZustandArt;
            theZustandArt = this.getZustandArt();
            strategy.appendField(locator, this, "zustandArt", buffer, theZustandArt, (this.zustandArt!= null));
        }
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public Object clone() {
        return copyTo(createNewInstance());
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public Object copyTo(Object target) {
        final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
        return copyTo(null, target, strategy);
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
        final Object draftCopy = ((target == null)?createNewInstance():target);
        if (draftCopy instanceof Zustand) {
            final Zustand copy = ((Zustand) draftCopy);
            {
                Boolean zustandArtShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.zustandArt!= null));
                if (zustandArtShouldBeCopiedAndSet == Boolean.TRUE) {
                    Zustand.ZustandArt sourceZustandArt;
                    sourceZustandArt = this.getZustandArt();
                    Zustand.ZustandArt copyZustandArt = ((Zustand.ZustandArt) strategy.copy(LocatorUtils.property(locator, "zustandArt", sourceZustandArt), sourceZustandArt, (this.zustandArt!= null)));
                    copy.setZustandArt(copyZustandArt);
                } else {
                    if (zustandArtShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.zustandArt = null;
                    }
                }
            }
        }
        return draftCopy;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public Object createNewInstance() {
        return new Zustand();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    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 Zustand that = ((Zustand) object);
        {
            Zustand.ZustandArt lhsZustandArt;
            lhsZustandArt = this.getZustandArt();
            Zustand.ZustandArt rhsZustandArt;
            rhsZustandArt = that.getZustandArt();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "zustandArt", lhsZustandArt), LocatorUtils.property(thatLocator, "zustandArt", rhsZustandArt), lhsZustandArt, rhsZustandArt, (this.zustandArt!= null), (that.zustandArt!= null))) {
                return false;
            }
        }
        return true;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public boolean equals(Object object) {
        final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
        return equals(null, null, object, strategy);
    }

    /**
     *
     *                     Java enum for zustand attribute in <zustand_art> elements.
     *
     *
Java class for null.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *

     *

     * <simpleType>
     *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *     <enumeration value="ERSTBEZUG"/>
     *     <enumeration value="TEIL_VOLLRENOVIERUNGSBED"/>
     *     <enumeration value="NEUWERTIG"/>
     *     <enumeration value="TEIL_VOLLSANIERT"/>
     *     <enumeration value="TEIL_VOLLRENOVIERT"/>
     *     <enumeration value="BAUFAELLIG"/>
     *     <enumeration value="NACH_VEREINBARUNG"/>
     *     <enumeration value="MODERNISIERT"/>
     *     <enumeration value="GEPFLEGT"/>
     *     <enumeration value="ROHBAU"/>
     *     <enumeration value="ENTKERNT"/>
     *     <enumeration value="ABRISSOBJEKT"/>
     *     <enumeration value="PROJEKTIERT"/>
     *   </restriction>
     * </simpleType>
     *

     *
     */
    @XmlType(name = "")
    @XmlEnum
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public enum ZustandArt {

        ERSTBEZUG,
        TEIL_VOLLRENOVIERUNGSBED,
        NEUWERTIG,
        TEIL_VOLLSANIERT,
        TEIL_VOLLRENOVIERT,
        BAUFAELLIG,
        NACH_VEREINBARUNG,
        MODERNISIERT,
        GEPFLEGT,
        ROHBAU,
        ENTKERNT,
        ABRISSOBJEKT,
        PROJEKTIERT;

        public String value() {
            return name();
        }

        public static Zustand.ZustandArt fromValue(String v) {
            return valueOf(v);
        }

    }

}


/*
 * Copyright 2015-2018 OpenEstate.org.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.openestate.io.examples;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import javax.xml.bind.JAXBException;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.PropertyConfigurator;
import org.openestate.io.immobiliare_it.ImmobiliareItDocument;
import org.openestate.io.immobiliare_it.ImmobiliareItUtils;
import org.openestate.io.immobiliare_it.xml.Feed;
import org.openestate.io.immobiliare_it.xml.Feed.Properties.Property;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException;

/**
 * Example for reading XML files for
 * immobiliare.it.
 *

 * This example illustrates how to read XML files for
 * immobiliare.it.
 *
 * @author Andreas Rudolph
 * @since 1.0
 */
public class ImmobiliareItReadingExample {
    @SuppressWarnings("unused")
    private final static Logger LOGGER = LoggerFactory.getLogger(ImmobiliareItReadingExample.class);
    private final static String PACKAGE = "/org/openestate/io/examples";

    /**
     * Start the example application.
     *
     * @param args command line arguments
     */
    @SuppressWarnings("Duplicates")
    public static void main(String[] args) {
        // init logging
        PropertyConfigurator.configure(
                ImmobiliareItReadingExample.class.getResource(PACKAGE + "/log4j.properties"));

        // read example files, if no files were specified as command line arguments
        if (args.length < 1) {
            try {
                read(ImmobiliareItReadingExample.class.getResourceAsStream(PACKAGE + "/immobiliare_it.xml"));
            } catch (Exception ex) {
                LOGGER.error("Can't read example file!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
                System.exit(2);
            }
        }

        // read files, that were specified as command line arguments
        else {
            for (String arg : args) {
                try {
                    read(new File(arg));
                } catch (Exception ex) {
                    LOGGER.error("Can't read file '" + arg + "'!");
                    LOGGER.error("> " + ex.getLocalizedMessage(), ex);
                    System.exit(2);
                }
            }
        }
    }

    /**
     * Read a {@link File} into an {@link ImmobiliareItDocument} and print some
     * of its content to console.
     *
     * @param xmlFile the file to read
     * @throws SAXException                 if the file is not readable by the XML parser
     * @throws IOException                  if the file is not readable
     * @throws ParserConfigurationException if the XML parser is improperly configured
     * @throws JAXBException                if XML conversion into Java objects failed
     */
    protected static void read(File xmlFile) throws SAXException, IOException, ParserConfigurationException, JAXBException {
        LOGGER.info("process file: " + xmlFile.getAbsolutePath());
        if (!xmlFile.isFile()) {
            LOGGER.warn("> provided file is invalid");
            return;
        }
        ImmobiliareItDocument doc = ImmobiliareItUtils.createDocument(xmlFile);
        if (doc == null) {
            LOGGER.warn("> provided XML is not supported");
        } else {
            printToConsole(doc);
        }
    }

    /**
     * Read a {@link InputStream} into an {@link ImmobiliareItDocument} and print
     * some of its content to console.
     *
     * @param xmlInputStream the input stream to read
     * @throws SAXException                 if the file is not readable by the XML parser
     * @throws IOException                  if the file is not readable
     * @throws ParserConfigurationException if the XML parser is improperly configured
     * @throws JAXBException                if XML conversion into Java objects failed
     */
    protected static void read(InputStream xmlInputStream) throws SAXException, IOException, ParserConfigurationException, JAXBException {
        LOGGER.info("process example file");
        ImmobiliareItDocument doc = ImmobiliareItUtils.createDocument(xmlInputStream);
        if (doc == null) {
            LOGGER.warn("> provided XML is not supported");
        } else {
            printToConsole(doc);
        }
    }

    /**
     * Print some content of an {@link ImmobiliareItDocument} to console.
     *
     * @param doc the document to process
     * @throws JAXBException if XML conversion into Java objects failed
     */
    protected static void printToConsole(ImmobiliareItDocument doc) throws JAXBException {
        LOGGER.info("> process document in version "
                + doc.getDocumentVersion());

        Feed feed = doc.toObject();

        // process properties
        if (feed.getProperties() != null) {
            for (Property object : feed.getProperties().getProperty()) {
                // get object nr
                String objectNr = StringUtils.trimToNull(object.getUniqueId());
                if (objectNr == null) objectNr = "???";

                // get object description
                String objectInfo = (object.getFeatures() != null && !object.getFeatures().getDescription().isEmpty()) ?
                        StringUtils.trimToNull(object.getFeatures().getDescription().get(0).getValue()) : null;
                if (objectInfo == null) objectInfo = "???";

                // print object information to console
                LOGGER.info("> found object "
                        + "'" + objectNr + "': " + objectInfo);
            }
        }
    }
}


package org.openestate.io.openimmo.xml;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
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 <bewertung> element.
 *
 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "feld"
})
@XmlRootElement(name = "bewertung")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
public class Bewertung implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    protected List<Bewertung.Feld> feld;

    /**
     * Gets the value of the feld 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 feld property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getFeld().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Bewertung.Feld }
     *
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public List<Bewertung.Feld> getFeld() {
        if (feld == null) {
            feld = new ArrayList<Bewertung.Feld>();
        }
        return this.feld;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public String toString() {
        final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    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;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        {
            List<Bewertung.Feld> theFeld;
            theFeld = (((this.feld!= null)&&(!this.feld.isEmpty()))?this.getFeld():null);
            strategy.appendField(locator, this, "feld", buffer, theFeld, ((this.feld!= null)&&(!this.feld.isEmpty())));
        }
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Object clone() {
        return copyTo(createNewInstance());
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Object copyTo(Object target) {
        final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
        return copyTo(null, target, strategy);
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
        final Object draftCopy = ((target == null)?createNewInstance():target);
        if (draftCopy instanceof Bewertung) {
            final Bewertung copy = ((Bewertung) draftCopy);
            {
                Boolean feldShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.feld!= null)&&(!this.feld.isEmpty())));
                if (feldShouldBeCopiedAndSet == Boolean.TRUE) {
                    List<Bewertung.Feld> sourceFeld;
                    sourceFeld = (((this.feld!= null)&&(!this.feld.isEmpty()))?this.getFeld():null);
                    @SuppressWarnings("unchecked")
                    List<Bewertung.Feld> copyFeld = ((List<Bewertung.Feld> ) strategy.copy(LocatorUtils.property(locator, "feld", sourceFeld), sourceFeld, ((this.feld!= null)&&(!this.feld.isEmpty()))));
                    copy.feld = null;
                    if (copyFeld!= null) {
                        List<Bewertung.Feld> uniqueFeldl = copy.getFeld();
                        uniqueFeldl.addAll(copyFeld);
                    }
                } else {
                    if (feldShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.feld = null;
                    }
                }
            }
        }
        return draftCopy;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Object createNewInstance() {
        return new Bewertung();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    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 Bewertung that = ((Bewertung) object);
        {
            List<Bewertung.Feld> lhsFeld;
            lhsFeld = (((this.feld!= null)&&(!this.feld.isEmpty()))?this.getFeld():null);
            List<Bewertung.Feld> rhsFeld;
            rhsFeld = (((that.feld!= null)&&(!that.feld.isEmpty()))?that.getFeld():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "feld", lhsFeld), LocatorUtils.property(thatLocator, "feld", rhsFeld), lhsFeld, rhsFeld, ((this.feld!= null)&&(!this.feld.isEmpty())), ((that.feld!= null)&&(!that.feld.isEmpty())))) {
                return false;
            }
        }
        return true;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public boolean equals(Object object) {
        final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
        return equals(null, null, object, strategy);
    }

    /**
     * Java class for <feld> in <bewertung> elements.
     *
     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "name",
        "wert",
        "typ",
        "modus"
    })
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public static class Feld implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
    {

        @XmlElement(required = true)
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        protected String name;
        @XmlElement(required = true)
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        protected String wert;
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        protected List<String> typ;
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        protected List<String> modus;

        /**
         * Gets the value of the name property.
         *
         * @return
         *     possible object is
         *     {@link String }
         *
         */
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public String getName() {
            return name;
        }

        /**
         * Sets the value of the name property.
         *
         * @param value
         *     allowed object is
         *     {@link String }
         *
         */
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public void setName(String value) {
            this.name = value;
        }

        /**
         * Gets the value of the wert property.
         *
         * @return
         *     possible object is
         *     {@link String }
         *
         */
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public String getWert() {
            return wert;
        }

        /**
         * Sets the value of the wert property.
         *
         * @param value
         *     allowed object is
         *     {@link String }
         *
         */
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public void setWert(String value) {
            this.wert = value;
        }

        /**
         * Gets the value of the typ 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 typ property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getTyp().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link String }
         *
         *
         */
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public List<String> getTyp() {
            if (typ == null) {
                typ = new ArrayList<String>();
            }
            return this.typ;
        }

        /**
         * Gets the value of the modus 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 modus property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getModus().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link String }
         *
         *
         */
        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public List<String> getModus() {
            if (modus == null) {
                modus = new ArrayList<String>();
            }
            return this.modus;
        }

        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public String toString() {
            final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
            final StringBuilder buffer = new StringBuilder();
            append(null, buffer, strategy);
            return buffer.toString();
        }

        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        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;
        }

        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        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 theWert;
                theWert = this.getWert();
                strategy.appendField(locator, this, "wert", buffer, theWert, (this.wert!= null));
            }
            {
                List<String> theTyp;
                theTyp = (((this.typ!= null)&&(!this.typ.isEmpty()))?this.getTyp():null);
                strategy.appendField(locator, this, "typ", buffer, theTyp, ((this.typ!= null)&&(!this.typ.isEmpty())));
            }
            {
                List<String> theModus;
                theModus = (((this.modus!= null)&&(!this.modus.isEmpty()))?this.getModus():null);
                strategy.appendField(locator, this, "modus", buffer, theModus, ((this.modus!= null)&&(!this.modus.isEmpty())));
            }
            return buffer;
        }

        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public Object clone() {
            return copyTo(createNewInstance());
        }

        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public Object copyTo(Object target) {
            final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
            return copyTo(null, target, strategy);
        }

        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
            final Object draftCopy = ((target == null)?createNewInstance():target);
            if (draftCopy instanceof Bewertung.Feld) {
                final Bewertung.Feld copy = ((Bewertung.Feld) 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 wertShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.wert!= null));
                    if (wertShouldBeCopiedAndSet == Boolean.TRUE) {
                        String sourceWert;
                        sourceWert = this.getWert();
                        String copyWert = ((String) strategy.copy(LocatorUtils.property(locator, "wert", sourceWert), sourceWert, (this.wert!= null)));
                        copy.setWert(copyWert);
                    } else {
                        if (wertShouldBeCopiedAndSet == Boolean.FALSE) {
                            copy.wert = null;
                        }
                    }
                }
                {
                    Boolean typShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.typ!= null)&&(!this.typ.isEmpty())));
                    if (typShouldBeCopiedAndSet == Boolean.TRUE) {
                        List<String> sourceTyp;
                        sourceTyp = (((this.typ!= null)&&(!this.typ.isEmpty()))?this.getTyp():null);
                        @SuppressWarnings("unchecked")
                        List<String> copyTyp = ((List<String> ) strategy.copy(LocatorUtils.property(locator, "typ", sourceTyp), sourceTyp, ((this.typ!= null)&&(!this.typ.isEmpty()))));
                        copy.typ = null;
                        if (copyTyp!= null) {
                            List<String> uniqueTypl = copy.getTyp();
                            uniqueTypl.addAll(copyTyp);
                        }
                    } else {
                        if (typShouldBeCopiedAndSet == Boolean.FALSE) {
                            copy.typ = null;
                        }
                    }
                }
                {
                    Boolean modusShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.modus!= null)&&(!this.modus.isEmpty())));
                    if (modusShouldBeCopiedAndSet == Boolean.TRUE) {
                        List<String> sourceModus;
                        sourceModus = (((this.modus!= null)&&(!this.modus.isEmpty()))?this.getModus():null);
                        @SuppressWarnings("unchecked")
                        List<String> copyModus = ((List<String> ) strategy.copy(LocatorUtils.property(locator, "modus", sourceModus), sourceModus, ((this.modus!= null)&&(!this.modus.isEmpty()))));
                        copy.modus = null;
                        if (copyModus!= null) {
                            List<String> uniqueModusl = copy.getModus();
                            uniqueModusl.addAll(copyModus);
                        }
                    } else {
                        if (modusShouldBeCopiedAndSet == Boolean.FALSE) {
                            copy.modus = null;
                        }
                    }
                }
            }
            return draftCopy;
        }

        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public Object createNewInstance() {
            return new Bewertung.Feld();
        }

        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        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 Bewertung.Feld that = ((Bewertung.Feld) 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 lhsWert;
                lhsWert = this.getWert();
                String rhsWert;
                rhsWert = that.getWert();
                if (!strategy.equals(LocatorUtils.property(thisLocator, "wert", lhsWert), LocatorUtils.property(thatLocator, "wert", rhsWert), lhsWert, rhsWert, (this.wert!= null), (that.wert!= null))) {
                    return false;
                }
            }
            {
                List<String> lhsTyp;
                lhsTyp = (((this.typ!= null)&&(!this.typ.isEmpty()))?this.getTyp():null);
                List<String> rhsTyp;
                rhsTyp = (((that.typ!= null)&&(!that.typ.isEmpty()))?that.getTyp():null);
                if (!strategy.equals(LocatorUtils.property(thisLocator, "typ", lhsTyp), LocatorUtils.property(thatLocator, "typ", rhsTyp), lhsTyp, rhsTyp, ((this.typ!= null)&&(!this.typ.isEmpty())), ((that.typ!= null)&&(!that.typ.isEmpty())))) {
                    return false;
                }
            }
            {
                List<String> lhsModus;
                lhsModus = (((this.modus!= null)&&(!this.modus.isEmpty()))?this.getModus():null);
                List<String> rhsModus;
                rhsModus = (((that.modus!= null)&&(!that.modus.isEmpty()))?that.getModus():null);
                if (!strategy.equals(LocatorUtils.property(thisLocator, "modus", lhsModus), LocatorUtils.property(thatLocator, "modus", rhsModus), lhsModus, rhsModus, ((this.modus!= null)&&(!this.modus.isEmpty())), ((that.modus!= null)&&(!that.modus.isEmpty())))) {
                    return false;
                }
            }
            return true;
        }

        @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
        public boolean equals(Object object) {
            final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
            return equals(null, null, object, strategy);
        }

    }

}


/*
 * Copyright 2015-2018 OpenEstate.org.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.openestate.io.core;

import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * A {@link ValidationEventHandler} that handles validation events during XML
 * processing.
 *
 * @author Andreas Rudolph
 * @since 1.0
 */
public class XmlValidationHandler implements ValidationEventHandler {
    private final static Logger LOGGER = LoggerFactory.getLogger(XmlValidationHandler.class);

    /**
     * Receive notification of a validation warning or error.
     *
     *

     *

     * The ValidationEvent will have a
     * {@link javax.xml.bind.ValidationEventLocator} embedded in it that
     * indicates where the error or warning occurred.
     *
     *

     *

     * If an unchecked runtime exception is thrown from this method, the JAXB
     * provider will treat it as if the method returned false and interrupt
     * the current unmarshal, validate, or marshal operation.
     *
     * @param event the encapsulated validation event information. It is a provider error if
     *              this parameter is null.
     * @return true if the JAXB Provider should attempt to continue the current unmarshal,
     * validate, or marshal operation after handling this warning/error, false if
     * the provider should terminate the current operation with the appropriate
     * <tt>UnmarshalException</tt>, <tt>ValidationException</tt>, or
     * <tt>MarshalException</tt>.
     * @throws IllegalArgumentException if the event object is null.
     */
    @Override
    public boolean handleEvent(ValidationEvent event) {
        if (event == null)
            throw new IllegalArgumentException("No validation event was provided!");

        int line = -1;
        int col = -1;
        if (event.getLocator() != null) {
            line = event.getLocator().getLineNumber();
            col = event.getLocator().getColumnNumber();
        }

        if (ValidationEvent.FATAL_ERROR == event.getSeverity()) {
            LOGGER.warn("fatal validation error");
            if (line > -1 && col > -1) LOGGER.warn("> at line " + line + " / column " + col);
            LOGGER.warn("> " + event.getMessage());
            return false;
        }

        if (ValidationEvent.WARNING == event.getSeverity()) {
            LOGGER.warn("validation warning");
            if (line > -1 && col > -1) LOGGER.warn("> at line " + line + " / column " + col);
            LOGGER.warn("> " + event.getMessage());
        } else {
            LOGGER.warn("validation error");
            if (line > -1 && col > -1) LOGGER.warn("> at line " + line + " / column " + col);
            LOGGER.warn("> " + event.getMessage());
        }

        return true;
    }
}


/*
 * Copyright 2015-2018 OpenEstate.org.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.openestate.io.core;

import java.io.IOException;
import java.io.StringReader;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.csv.CSVRecord;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * A general CSV record, that is read by a {@link CsvParser} and written by a
 * {@link CsvPrinter}.
 *
 * @author Andreas Rudolph
 * @since 1.0
 */
public abstract class CsvRecord {
    private final static Logger LOGGER = LoggerFactory.getLogger(CsvRecord.class);
    private final Map<Integer, String> values;

    /**
     * Create an empty record.
     */
    protected CsvRecord() {
        this.values = new HashMap<>();
    }

    /**
     * Write content of the record in a human readable form.
     *
     * @param writer where the data is written to
     * @throws IOException if the record can't be written
     */
    public void dump(Writer writer) throws IOException {
        this.dump(writer, "
");
    }

    /**
     * Write content of the record in a human readable form.
     *
     * @param writer        where the data is written to
     * @param lineSeparator line separator for multi line values
     * @throws IOException if the record can't be written
     */
    public void dump(Writer writer, String lineSeparator) throws IOException {
        for (int i = 0; i < this.getRecordLenth(); i++) {
            StringBuilder txt = new StringBuilder();
            try (StringReader reader = new StringReader(StringUtils.trimToEmpty(this.get(i)))) {
                for (String line : IOUtils.readLines(reader)) {
                    if (txt.length() > 0) txt.append(lineSeparator);
                    txt.append(line);
                }
            }
            writer.write(i + ":" + txt.toString());
            writer.write(System.lineSeparator());
        }
    }

    /**
     * Returns the value of the record at a certain index position.
     *
     * @param pos index position
     * @return value at index position or null, if not available
     */
    protected final String get(int pos) {
        return this.get(pos, null);
    }

    /**
     * Returns the value of the record at a certain index position.
     *
     * @param pos          index position
     * @param defaultValue returned default value, if no value is available at the index position
     * @return value at index position or the provided defaultValue, if not available
     */
    protected final String get(int pos, String defaultValue) {
        String value = StringUtils.trimToNull(this.values.get(pos));
        return (value != null) ? value : defaultValue;
    }

    /**
     * Returns the number of values, that are hold by this record.
     *
     * @return number of values
     */
    protected abstract int getRecordLength();

    @Deprecated
    protected int getRecordLenth() {
        return this.getRecordLength();
    }

    /**
     * Loads data from {@link CsvParser} into the record.
     *
     * @param record the CSV record from
     *               commons-csv
     */
    protected void parse(CSVRecord record) {
        this.values.clear();
        for (int i = 0; i < record.size(); i++) {
            this.values.put(i, this.parse(record.get(i)));
        }
    }

    /**
     * Converts a single value before it is assigned to this record.
     *
     * @param value value to convert
     * @return converted value
     */
    protected String parse(String value) {
        return value;
    }

    /**
     * Returns a list of values for this record as they are written into CSV.
     *
     * @return CSV values to write
     */
    protected Iterable<String> print() {
        final int length = this.getRecordLenth();
        List<String> row = new ArrayList<>();
        for (int i = 0; i < length; i++) {
            row.add(this.get(i));
        }
        return row;
    }

    /**
     * Sets the value of this record at a certain index position.
     *
     * @param pos   index position
     * @param value the value to set
     */
    protected final void set(int pos, String value) {
        value = StringUtils.trimToNull(value);
        if (value != null)
            this.values.put(pos, value);
        else if (this.values.containsKey(pos))
            this.values.remove(pos);
    }
}


package org.openestate.io.openimmo.xml;

import java.io.Serializable;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
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 <check> element.
 *
 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "value"
})
@XmlRootElement(name = "check")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
public class Check implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{

    @XmlValue
    @XmlJavaTypeAdapter(Adapter3 .class)
    @XmlSchemaType(name = "dateTime")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    protected Calendar value;
    @XmlAttribute(name = "ctype", required = true)
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    protected Check.Ctype ctype;

    /**
     * Gets the value of the value property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Calendar getValue() {
        return value;
    }

    /**
     * Sets the value of the value property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setValue(Calendar value) {
        this.value = value;
    }

    /**
     * Gets the value of the ctype property.
     *
     * @return
     *     possible object is
     *     {@link Check.Ctype }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Check.Ctype getCtype() {
        return ctype;
    }

    /**
     * Sets the value of the ctype property.
     *
     * @param value
     *     allowed object is
     *     {@link Check.Ctype }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setCtype(Check.Ctype value) {
        this.ctype = value;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public String toString() {
        final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    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;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        {
            Calendar theValue;
            theValue = this.getValue();
            strategy.appendField(locator, this, "value", buffer, theValue, (this.value!= null));
        }
        {
            Check.Ctype theCtype;
            theCtype = this.getCtype();
            strategy.appendField(locator, this, "ctype", buffer, theCtype, (this.ctype!= null));
        }
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Object clone() {
        return copyTo(createNewInstance());
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Object copyTo(Object target) {
        final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
        return copyTo(null, target, strategy);
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
        final Object draftCopy = ((target == null)?createNewInstance():target);
        if (draftCopy instanceof Check) {
            final Check copy = ((Check) draftCopy);
            {
                Boolean valueShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.value!= null));
                if (valueShouldBeCopiedAndSet == Boolean.TRUE) {
                    Calendar sourceValue;
                    sourceValue = this.getValue();
                    Calendar copyValue = ((Calendar) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue, (this.value!= null)));
                    copy.setValue(copyValue);
                } else {
                    if (valueShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.value = null;
                    }
                }
            }
            {
                Boolean ctypeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.ctype!= null));
                if (ctypeShouldBeCopiedAndSet == Boolean.TRUE) {
                    Check.Ctype sourceCtype;
                    sourceCtype = this.getCtype();
                    Check.Ctype copyCtype = ((Check.Ctype) strategy.copy(LocatorUtils.property(locator, "ctype", sourceCtype), sourceCtype, (this.ctype!= null)));
                    copy.setCtype(copyCtype);
                } else {
                    if (ctypeShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.ctype = null;
                    }
                }
            }
        }
        return draftCopy;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public Object createNewInstance() {
        return new Check();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    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 Check that = ((Check) object);
        {
            Calendar lhsValue;
            lhsValue = this.getValue();
            Calendar rhsValue;
            rhsValue = that.getValue();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue, (this.value!= null), (that.value!= null))) {
                return false;
            }
        }
        {
            Check.Ctype lhsCtype;
            lhsCtype = this.getCtype();
            Check.Ctype rhsCtype;
            rhsCtype = that.getCtype();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "ctype", lhsCtype), LocatorUtils.property(thatLocator, "ctype", rhsCtype), lhsCtype, rhsCtype, (this.ctype!= null), (that.ctype!= null))) {
                return false;
            }
        }
        return true;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public boolean equals(Object object) {
        final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
        return equals(null, null, object, strategy);
    }

    /**
     *
     *                     Java enum for ctype attribute in <check> elements.
     *
     *
Java class for null.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *

     *

     * <simpleType>
     *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *     <enumeration value="MD5"/>
     *     <enumeration value="DATETIME"/>
     *     <enumeration value="ETAG"/>
     *   </restriction>
     * </simpleType>
     *

     *
     */
    @XmlType(name = "")
    @XmlEnum
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public enum Ctype {

        @XmlEnumValue("MD5")
        MD_5("MD5"),
        DATETIME("DATETIME"),
        ETAG("ETAG");
        private final String value;

        Ctype(String v) {
            value = v;
        }

        public String value() {
            return value;
        }

        public static Check.Ctype fromValue(String v) {
            for (Check.Ctype c: Check.Ctype.values()) {
                if (c.value.equals(v)) {
                    return c;
                }
            }
            throw new IllegalArgumentException(v);
        }

    }

}