@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setKeineAngabe(JAXBElement<Object> value) {
        this.keineAngabe = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setKeineAngabe
(
JAXBElement
<
Object
>
value
)
{
this
.
keineAngabe
=
value
;
}

Sets the value of the keineAngabe property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link Object }{@code >}

Sets the value of the keineAngabe property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setErdwaerme(JAXBElement<Object> value) {
        this.erdwaerme = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setErdwaerme
(
JAXBElement
<
Object
>
value
)
{
this
.
erdwaerme
=
value
;
}

Sets the value of the erdwaerme property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link Object }{@code >}

Sets the value of the erdwaerme property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setSolarheizung(JAXBElement<Object> value) {
        this.solarheizung = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setSolarheizung
(
JAXBElement
<
Object
>
value
)
{
this
.
solarheizung
=
value
;
}

Sets the value of the solarheizung property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link Object }{@code >}

Sets the value of the solarheizung property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setPelletheizung(JAXBElement<Object> value) {
        this.pelletheizung = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setPelletheizung
(
JAXBElement
<
Object
>
value
)
{
this
.
pelletheizung
=
value
;
}

Sets the value of the pelletheizung property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link Object }{@code >}

Sets the value of the pelletheizung property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setGas(JAXBElement<Object> value) {
        this.gas = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setGas
(
JAXBElement
<
Object
>
value
)
{
this
.
gas
=
value
;
}

Sets the value of the gas property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link Object }{@code >}


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setOel(JAXBElement<Object> value) {
        this.oel = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setOel
(
JAXBElement
<
Object
>
value
)
{
this
.
oel
=
value
;
}

Sets the value of the oel property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link Object }{@code >}


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setFernwaerme(JAXBElement<Object> value) {
        this.fernwaerme = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setFernwaerme
(
JAXBElement
<
Object
>
value
)
{
this
.
fernwaerme
=
value
;
}

Sets the value of the fernwaerme property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link Object }{@code >}

Sets the value of the fernwaerme property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setStrom(JAXBElement<Object> value) {
        this.strom = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setStrom
(
JAXBElement
<
Object
>
value
)
{
this
.
strom
=
value
;
}

Sets the value of the strom property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link Object }{@code >}


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setKohle(JAXBElement<Object> value) {
        this.kohle = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setKohle
(
JAXBElement
<
Object
>
value
)
{
this
.
kohle
=
value
;
}

Sets the value of the kohle property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link Object }{@code >}


public static String random(int length) {
        return new RandomStringGenerator.Builder()
                .filteredBy(NUMBERS, LETTERS)
                .build().generate(length);
    }

public static String random ( int length ) { return new RandomStringGenerator . Builder ( ) . filteredBy ( NUMBERS , LETTERS ) . build ( ) . generate ( length ) ; }

Generate a random string with ASCII letters and digits.

@param length length of the generated string
@return generated string

Generate a random string with ASCII letters and digits .


public static String randomLetters(int length) {
        return new RandomStringGenerator.Builder()
                .filteredBy(LETTERS)
                .build().generate(length);
    }

public static String randomLetters ( int length ) { return new RandomStringGenerator . Builder ( ) . filteredBy ( LETTERS ) . build ( ) . generate ( length ) ; }

Generate a random string with ASCII letters.

@param length length of the generated string
@return generated string

Generate a random string with ASCII letters .


public static String randomNumeric(int length) {
        return new RandomStringGenerator.Builder()
                .filteredBy(NUMBERS)
                .build().generate(length);
    }

public static String randomNumeric ( int length ) { return new RandomStringGenerator . Builder ( ) . filteredBy ( NUMBERS ) . build ( ) . generate ( length ) ; }

Generate a random string with ASCII digits.

@param length length of the generated string
@return generated string

Generate a random string with ASCII digits .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public WohnungKategorienTyp getWohnungKategorie() {
        if (wohnungKategorie == null) {
            return WohnungKategorienTyp.KEINE_ANGABE;
        } else {
            return wohnungKategorie;
        }
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
WohnungKategorienTyp
getWohnungKategorie
(
)
{
if
(
wohnungKategorie
==
)
{
return
WohnungKategorienTyp
.
KEINE_ANGABE
;
}
else
{
return
wohnungKategorie
;
}
}

Gets the value of the wohnungKategorie property.

@return
possible object is
{@link WohnungKategorienTyp }

Gets the value of the wohnungKategorie property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:55:50+02:00", comments = "JAXB RI v2.2.11")
    public void setBENUTZER(WIS.BENUTZER value) {
        this.benutzer = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:55:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setBENUTZER
(
WIS
.
BENUTZER
value
)
{
this
.
benutzer
=
value
;
}

Sets the value of the benutzer property.

@param value
allowed object is
{@link WIS.BENUTZER }

Sets the value of the benutzer property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:55:50+02:00", comments = "JAXB RI v2.2.11")
    public void setOBJEKTE(WIS.OBJEKTE value) {
        this.objekte = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:55:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setOBJEKTE
(
WIS
.
OBJEKTE
value
)
{
this
.
objekte
=
value
;
}

Sets the value of the objekte property.

@param value
allowed object is
{@link WIS.OBJEKTE }

Sets the value of the objekte property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public List<Feedindex.Feed> getFeed() {
        if (feed == null) {
            feed = new ArrayList<Feedindex.Feed>();
        }
        return this.feed;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
Feedindex
.
Feed
>
getFeed
(
)
{
if
(
feed
==
)
{
feed
=
new
ArrayList
<
Feedindex
.
Feed
>
(
)
;
}
return
this
.
feed
;
}

Gets the value of the feed 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 feed property.

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

getFeed().add(newItem);

Objects of the following type(s) are allowed in the list
{@link Feedindex.Feed }


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setMoeb(Moebliert.Moeb value) {
        this.moeb = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setMoeb
(
Moebliert
.
Moeb
value
)
{
this
.
moeb
=
value
;
}

Sets the value of the moeb property.

@param value
allowed object is
{@link Moebliert.Moeb }


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public List<Serviceleistungen> getServiceleistungen() {
        if (serviceleistungen == null) {
            serviceleistungen = new ArrayList<Serviceleistungen>();
        }
        return this.serviceleistungen;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:50:55+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
Serviceleistungen
>
getServiceleistungen
(
)
{
if
(
serviceleistungen
==
)
{
serviceleistungen
=
new
ArrayList
<
Serviceleistungen
>
(
)
;
}
return
this
.
serviceleistungen
;
}

Gets the value of the serviceleistungen 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 serviceleistungen property.

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

getServiceleistungen().add(newItem);

Objects of the following type(s) are allowed in the list
{@link Serviceleistungen }

Gets the value of the serviceleistungen property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:48:12+02:00", comments = "JAXB RI v2.2.11")
    public void setSubAdministrativeArea(LocationStructure.SubAdministrativeArea value) {
        this.subAdministrativeArea = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:48:12+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setSubAdministrativeArea
(
LocationStructure
.
SubAdministrativeArea
value
)
{
this
.
subAdministrativeArea
=
value
;
}

Sets the value of the subAdministrativeArea property.

@param value
allowed object is
{@link LocationStructure.SubAdministrativeArea }

Sets the value of the subAdministrativeArea property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:48:12+02:00", comments = "JAXB RI v2.2.11")
    public void setCity(LocationStructure.City value) {
        this.city = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:48:12+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setCity
(
LocationStructure
.
City
value
)
{
this
.
city
=
value
;
}

Sets the value of the city property.

@param value
allowed object is
{@link LocationStructure.City }


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:48:12+02:00", comments = "JAXB RI v2.2.11")
    public void setLocality(LocationStructure.Locality value) {
        this.locality = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:48:12+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setLocality
(
LocationStructure
.
Locality
value
)
{
this
.
locality
=
value
;
}

Sets the value of the locality property.

@param value
allowed object is
{@link LocationStructure.Locality }

Sets the value of the locality property .


@Override
    public void downgradeToPreviousVersion(OpenImmoDocument doc) {
        doc.setDocumentVersion(OpenImmoVersion.V1_2_0);

        if (doc instanceof OpenImmoTransferDocument) {
            try {
                this.removeObjektartZusatzElements(doc.getDocument());
            } catch (Exception ex) {
                LOGGER.error("Can't remove <objektart_zusatz> elements!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            }

            try {
                this.downgradeEnergiepassElements(doc.getDocument());
            } catch (Exception ex) {
                LOGGER.error("Can't downgrade <energiepass> elements!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            }

            try {
                this.downgradeHausElements(doc.getDocument());
            } catch (Exception ex) {
                LOGGER.error("Can't downgrade <haus> elements!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            }
        }

        try {
            this.downgradeXmlNamespace(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't downgrade the XML namespace!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }
    }

Downgrade an OpenImmo document from version 1.2.1 to 1.2.0.

@param doc OpenImmo document in version 1.2.1

Downgrade an OpenImmo document from version 1 . 2 . 1 to 1 . 2 . 0 .


@Override
    @SuppressWarnings("Duplicates")
    public void upgradeFromPreviousVersion(OpenImmoDocument doc) {
        doc.setDocumentVersion(OpenImmoVersion.V1_2_1);

        if (doc instanceof OpenImmoTransferDocument) {
            try {
                this.upgradeEnergiepassElements(doc.getDocument());
            } catch (Exception ex) {
                LOGGER.error("Can't upgrade <energiepass> elements!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            }
        }

        try {
            this.upgradeXmlNamespace(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't upgrade the XML namespace!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }
    }

@
Override
@
SuppressWarnings
(
"Duplicates"
)
public
void
upgradeFromPreviousVersion
(
OpenImmoDocument
doc
)
{
doc
.
setDocumentVersion
(
OpenImmoVersion
.
V1_2_1
)
;
if
(
doc
instanceof
OpenImmoTransferDocument
)
{
try
{
this
.
upgradeEnergiepassElements
(
doc
.
getDocument
(
)
)
;
}
catch
(
Exception
ex
)
{
LOGGER
.
error
(
"Can't upgrade <energiepass> elements!"
)
;
LOGGER
.
error
(
"> "
+
ex
.
getLocalizedMessage
(
)
,
ex
)
;
}
}
try
{
this
.
upgradeXmlNamespace
(
doc
.
getDocument
(
)
)
;
}
catch
(
Exception
ex
)
{
LOGGER
.
error
(
"Can't upgrade the XML namespace!"
)
;
LOGGER
.
error
(
"> "
+
ex
.
getLocalizedMessage
(
)
,
ex
)
;
}
}

Upgrade an OpenImmo document from version 1.2.0 to 1.2.1.

@param doc OpenImmo document in version 1.2.0

Upgrade an OpenImmo document from version 1 . 2 . 0 to 1 . 2 . 1 .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setLandTyp(LandUndForstwirtschaft.LandTyp value) {
        this.landTyp = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setLandTyp
(
LandUndForstwirtschaft
.
LandTyp
value
)
{
this
.
landTyp
=
value
;
}

Sets the value of the landTyp property.

@param value
allowed object is
{@link LandUndForstwirtschaft.LandTyp }

Sets the value of the landTyp property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:42:33+02:00", comments = "JAXB RI v2.2.11")
    public List<MetaDataType.FIELD> getFIELD() {
        if (field == null) {
            field = new ArrayList<MetaDataType.FIELD>();
        }
        return this.field;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:42:33+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
MetaDataType
.
FIELD
>
getFIELD
(
)
{
if
(
field
==
)
{
field
=
new
ArrayList
<
MetaDataType
.
FIELD
>
(
)
;
}
return
this
.
field
;
}

Gets the value of the field 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 field property.

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

getFIELD().add(newItem);

Objects of the following type(s) are allowed in the list
{@link MetaDataType.FIELD }


@Override
    public void upgradeFromPreviousVersion(OpenImmoDocument doc) {
        doc.setDocumentVersion(OpenImmoVersion.V1_2_0);

        if (doc instanceof OpenImmoTransferDocument) {
            try {
                this.upgradeMieteinnahmenElements(doc.getDocument());
            } catch (Exception ex) {
                LOGGER.error("Can't upgrade <mieteinnahmen_ist> and <mieteinnahmen_soll> elements!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            }
        }
    }

Upgrade an OpenImmo document from version 1.1 to 1.2.0.

@param doc OpenImmo document in version 1.1

Upgrade an OpenImmo document from version 1 . 1 to 1 . 2 . 0 .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:55:25+02:00", comments = "JAXB RI v2.2.11")
    public List<AdType> getAd() {
        if (ad == null) {
            ad = new ArrayList<AdType>();
        }
        return this.ad;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:55:25+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
AdType
>
getAd
(
)
{
if
(
ad
==
)
{
ad
=
new
ArrayList
<
AdType
>
(
)
;
}
return
this
.
ad
;
}

Gets the value of the ad 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 ad property.

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

getAd().add(newItem);

Objects of the following type(s) are allowed in the list
{@link AdType }


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setGastgewTyp(Gastgewerbe.GastgewTyp value) {
        this.gastgewTyp = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setGastgewTyp
(
Gastgewerbe
.
GastgewTyp
value
)
{
this
.
gastgewTyp
=
value
;
}

Sets the value of the gastgewTyp property.

@param value
allowed object is
{@link Gastgewerbe.GastgewTyp }

Sets the value of the gastgewTyp property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public void setPlatzart(StpSonstige.Platzart value) {
        this.platzart = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:50:55+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setPlatzart
(
StpSonstige
.
Platzart
value
)
{
this
.
platzart
=
value
;
}

Sets the value of the platzart property.

@param value
allowed object is
{@link StpSonstige.Platzart }

Sets the value of the platzart property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public DatenVerkabelungsTyp getDatenVerkabelung() {
        if (datenVerkabelung == null) {
            return DatenVerkabelungsTyp.KEINE_ANGABE;
        } else {
            return datenVerkabelung;
        }
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
DatenVerkabelungsTyp
getDatenVerkabelung
(
)
{
if
(
datenVerkabelung
==
)
{
return
DatenVerkabelungsTyp
.
KEINE_ANGABE
;
}
else
{
return
datenVerkabelung
;
}
}

Gets the value of the datenVerkabelung property.

@return
possible object is
{@link DatenVerkabelungsTyp }

Gets the value of the datenVerkabelung property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public JaNeinVereinbarungTyp getKlimaanlage() {
        if (klimaanlage == null) {
            return JaNeinVereinbarungTyp.KEINE_ANGABE;
        } else {
            return klimaanlage;
        }
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
JaNeinVereinbarungTyp
getKlimaanlage
(
)
{
if
(
klimaanlage
==
)
{
return
JaNeinVereinbarungTyp
.
KEINE_ANGABE
;
}
else
{
return
klimaanlage
;
}
}

Gets the value of the klimaanlage property.

@return
possible object is
{@link JaNeinVereinbarungTyp }

Gets the value of the klimaanlage property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T01:43:04+02:00", comments = "JAXB RI v2.2.11")
    public List<ImagesType.Image> getImage() {
        if (image == null) {
            image = new ArrayList<ImagesType.Image>();
        }
        return this.image;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T01:43:04+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
ImagesType
.
Image
>
getImage
(
)
{
if
(
image
==
)
{
image
=
new
ArrayList
<
ImagesType
.
Image
>
(
)
;
}
return
this
.
image
;
}

Gets the value of the image 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 image property.

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

getImage().add(newItem);

Objects of the following type(s) are allowed in the list
{@link ImagesType.Image }


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public void setPriceType(OverseasSaleAdType.PriceType value) {
        this.priceType = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setPriceType
(
OverseasSaleAdType
.
PriceType
value
)
{
this
.
priceType
=
value
;
}

Sets the value of the priceType property.

@param value
allowed object is
{@link OverseasSaleAdType.PriceType }

Sets the value of the priceType property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public void setNewDevelopmentAvailability(java.lang.String value) {
        this.newDevelopmentAvailability = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setNewDevelopmentAvailability
(
java
.
lang
.
String
value
)
{
this
.
newDevelopmentAvailability
=
value
;
}

Sets the value of the newDevelopmentAvailability property.

@param value
allowed object is
{@link java.lang.String }

Sets the value of the newDevelopmentAvailability property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public void setDirections(java.lang.String value) {
        this.directions = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setDirections
(
java
.
lang
.
String
value
)
{
this
.
directions
=
value
;
}

Sets the value of the directions property.

@param value
allowed object is
{@link java.lang.String }

Sets the value of the directions property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public void setCo2Rating(java.lang.String value) {
        this.co2Rating = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setCo2Rating
(
java
.
lang
.
String
value
)
{
this
.
co2Rating
=
value
;
}

Sets the value of the co2Rating property.

@param value
allowed object is
{@link java.lang.String }

Sets the value of the co2Rating property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public void setEnergyRating(java.lang.String value) {
        this.energyRating = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setEnergyRating
(
java
.
lang
.
String
value
)
{
this
.
energyRating
=
value
;
}

Sets the value of the energyRating property.

@param value
allowed object is
{@link java.lang.String }

Sets the value of the energyRating property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public void setViewingDetails(java.lang.String value) {
        this.viewingDetails = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setViewingDetails
(
java
.
lang
.
String
value
)
{
this
.
viewingDetails
=
value
;
}

Sets the value of the viewingDetails property.

@param value
allowed object is
{@link java.lang.String }

Sets the value of the viewingDetails property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public void setPropertyStatus(OverseasSaleAdType.PropertyStatus value) {
        this.propertyStatus = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setPropertyStatus
(
OverseasSaleAdType
.
PropertyStatus
value
)
{
this
.
propertyStatus
=
value
;
}

Sets the value of the propertyStatus property.

@param value
allowed object is
{@link OverseasSaleAdType.PropertyStatus }

Sets the value of the propertyStatus property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:55:25+02:00", comments = "JAXB RI v2.2.11")
    public void setPictures(AdType.Pictures value) {
        this.pictures = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:55:25+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setPictures
(
AdType
.
Pictures
value
)
{
this
.
pictures
=
value
;
}

Sets the value of the pictures property.

@param value
allowed object is
{@link AdType.Pictures }

Sets the value of the pictures property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public void setBebaubarAttr(BebaubarNach.BebaubarAttr value) {
        this.bebaubarAttr = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:50:55+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setBebaubarAttr
(
BebaubarNach
.
BebaubarAttr
value
)
{
this
.
bebaubarAttr
=
value
;
}

Sets the value of the bebaubarAttr property.

@param value
allowed object is
{@link BebaubarNach.BebaubarAttr }

Sets the value of the bebaubarAttr property .


@Override
    public void upgradeFromPreviousVersion(OpenImmoDocument doc) {
        doc.setDocumentVersion(OpenImmoVersion.V1_2_4);

        if (doc instanceof OpenImmoTransferDocument) {
            try {
                this.upgradeAnzahlBalkonTerrassenElements(doc.getDocument());
            } catch (Exception ex) {
                LOGGER.error("Can't upgrade <anzahl_balkon_terrassen> elements!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            }

            try {
                this.upgradeAnhangElements(doc.getDocument());
            } catch (Exception ex) {
                LOGGER.error("Can't upgrade <anhang> elements!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            }

            try {
                this.upgradeSonstigeElements(doc.getDocument());
            } catch (Exception ex) {
                LOGGER.error("Can't upgrade <sonstige> elements!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            }
        }
    }

Upgrade an OpenImmo document from version 1.2.3 to 1.2.4.

@param doc OpenImmo document in version 1.2.3

Upgrade an OpenImmo document from version 1 . 2 . 3 to 1 . 2 . 4 .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setParkenTyp(Parken.ParkenTyp value) {
        this.parkenTyp = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setParkenTyp
(
Parken
.
ParkenTyp
value
)
{
this
.
parkenTyp
=
value
;
}

Sets the value of the parkenTyp property.

@param value
allowed object is
{@link Parken.ParkenTyp }

Sets the value of the parkenTyp property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setAlterAttr(Alter.AlterAttr value) {
        this.alterAttr = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setAlterAttr
(
Alter
.
AlterAttr
value
)
{
this
.
alterAttr
=
value
;
}

Sets the value of the alterAttr property.

@param value
allowed object is
{@link Alter.AlterAttr }

Sets the value of the alterAttr property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public void setFreizeitTyp(FreizeitimmobilieGewerblich.FreizeitTyp value) {
        this.freizeitTyp = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:50:55+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setFreizeitTyp
(
FreizeitimmobilieGewerblich
.
FreizeitTyp
value
)
{
this
.
freizeitTyp
=
value
;
}

Sets the value of the freizeitTyp property.

@param value
allowed object is
{@link FreizeitimmobilieGewerblich.FreizeitTyp }

Sets the value of the freizeitTyp property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setTelefonart(TelSonstige.Telefonart value) {
        this.telefonart = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setTelefonart
(
TelSonstige
.
Telefonart
value
)
{
this
.
telefonart
=
value
;
}

Sets the value of the telefonart property.

@param value
allowed object is
{@link TelSonstige.Telefonart }

Sets the value of the telefonart property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setEmailart(EmailSonstige.Emailart value) {
        this.emailart = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setEmailart
(
EmailSonstige
.
Emailart
value
)
{
this
.
emailart
=
value
;
}

Sets the value of the emailart property.

@param value
allowed object is
{@link EmailSonstige.Emailart }

Sets the value of the emailart property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public void setOverseasSales(Daft.OverseasSales value) {
        this.overseasSales = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setOverseasSales
(
Daft
.
OverseasSales
value
)
{
this
.
overseasSales
=
value
;
}

Sets the value of the overseasSales property.

@param value
allowed object is
{@link Daft.OverseasSales }

Sets the value of the overseasSales property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public void setOverseasRental(Daft.OverseasRental value) {
        this.overseasRental = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setOverseasRental
(
Daft
.
OverseasRental
value
)
{
this
.
overseasRental
=
value
;
}

Sets the value of the overseasRental property.

@param value
allowed object is
{@link Daft.OverseasRental }

Sets the value of the overseasRental property .


@SuppressWarnings("Duplicates")
    public static Element createUserDefinedSimplefield(Document doc, String name, String value) {
        Element root = XmlUtils.getRootElement(doc);
        Element node = doc.createElementNS(root.getNamespaceURI(), "user_defined_simplefield");
        node.setAttribute("feldname", name);
        node.setTextContent(value);
        return node;
    }

@ SuppressWarnings ( "Duplicates" ) public static Element createUserDefinedSimplefield ( Document doc , String name , String value ) { Element root = XmlUtils . getRootElement ( doc ) ; Element node = doc . createElementNS ( root . getNamespaceURI ( ) , "user_defined_simplefield" ) ; node . setAttribute ( "feldname" , name ) ; node . setTextContent ( value ) ; return node ; }

Helper method to create a <user_defined_simplefield> element with a
"feldname" attribute and a string value.

@param doc   document, for which the element is created
@param name  value of the "feldname" attribute in the created element
@param value text value of the created element
@return created element

Helper method to create a &lt ; user_defined_simplefield&gt ; element with a feldname attribute and a string value .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public List<Fehlerliste.Fehler> getFehler() {
        if (fehler == null) {
            fehler = new ArrayList<Fehlerliste.Fehler>();
        }
        return this.fehler;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
Fehlerliste
.
Fehler
>
getFehler
(
)
{
if
(
fehler
==
)
{
fehler
=
new
ArrayList
<
Fehlerliste
.
Fehler
>
(
)
;
}
return
this
.
fehler
;
}

Gets the value of the fehler 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 fehler property.

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

getFehler().add(newItem);

Objects of the following type(s) are allowed in the list
{@link Fehlerliste.Fehler }


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
    public void setErbpacht(JAXBElement<VermarktungGrundstueckGewerbeTyp.Erbpacht> value) {
        this.erbpacht = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:52:47+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setErbpacht
(
JAXBElement
<
VermarktungGrundstueckGewerbeTyp
.
Erbpacht
>
value
)
{
this
.
erbpacht
=
value
;
}

Sets the value of the erbpacht property.

@param value
allowed object is
{@link JAXBElement }{@code <}{@link VermarktungGrundstueckGewerbeTyp.Erbpacht }{@code >}

Sets the value of the erbpacht property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public List<StpSonstige> getStpSonstige() {
        if (stpSonstige == null) {
            stpSonstige = new ArrayList<StpSonstige>();
        }
        return this.stpSonstige;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
StpSonstige
>
getStpSonstige
(
)
{
if
(
stpSonstige
==
)
{
stpSonstige
=
new
ArrayList
<
StpSonstige
>
(
)
;
}
return
this
.
stpSonstige
;
}

Gets the value of the stpSonstige 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 stpSonstige property.

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

getStpSonstige().add(newItem);

Objects of the following type(s) are allowed in the list
{@link StpSonstige }

Gets the value of the stpSonstige property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:42:33+02:00", comments = "JAXB RI v2.2.11")
    public List<ValueListsType.VALUELIST> getVALUELIST() {
        if (valuelist == null) {
            valuelist = new ArrayList<ValueListsType.VALUELIST>();
        }
        return this.valuelist;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:42:33+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
ValueListsType
.
VALUELIST
>
getVALUELIST
(
)
{
if
(
valuelist
==
)
{
valuelist
=
new
ArrayList
<
ValueListsType
.
VALUELIST
>
(
)
;
}
return
this
.
valuelist
;
}

Gets the value of the valuelist 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 valuelist property.

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

getVALUELIST().add(newItem);

Objects of the following type(s) are allowed in the list
{@link ValueListsType.VALUELIST }

Gets the value of the valuelist property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setMinDauer(MinMietdauer.MinDauer value) {
        this.minDauer = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setMinDauer
(
MinMietdauer
.
MinDauer
value
)
{
this
.
minDauer
=
value
;
}

Sets the value of the minDauer property.

@param value
allowed object is
{@link MinMietdauer.MinDauer }

Sets the value of the minDauer property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public void setZinsTyp(ZinshausRenditeobjekt.ZinsTyp value) {
        this.zinsTyp = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:50:55+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setZinsTyp
(
ZinshausRenditeobjekt
.
ZinsTyp
value
)
{
this
.
zinsTyp
=
value
;
}

Sets the value of the zinsTyp property.

@param value
allowed object is
{@link ZinshausRenditeobjekt.ZinsTyp }

Sets the value of the zinsTyp property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:41:42+02:00", comments = "JAXB RI v2.2.11")
    public List<URI> getPhoto() {
        if (photo == null) {
            photo = new ArrayList<URI>();
        }
        return this.photo;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:41:42+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
URI
>
getPhoto
(
)
{
if
(
photo
==
)
{
photo
=
new
ArrayList
<
URI
>
(
)
;
}
return
this
.
photo
;
}

Gets the value of the photo 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 photo property.

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

getPhoto().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:48:12+02:00", comments = "JAXB RI v2.2.11")
    public void setMetadata(Feed.Metadata value) {
        this.metadata = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:48:12+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setMetadata
(
Feed
.
Metadata
value
)
{
this
.
metadata
=
value
;
}

Sets the value of the metadata property.

@param value
allowed object is
{@link Feed.Metadata }

Sets the value of the metadata property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:48:12+02:00", comments = "JAXB RI v2.2.11")
    public void setProjects(Feed.Projects value) {
        this.projects = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:48:12+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setProjects
(
Feed
.
Projects
value
)
{
this
.
projects
=
value
;
}

Sets the value of the projects property.

@param value
allowed object is
{@link Feed.Projects }

Sets the value of the projects property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:48:12+02:00", comments = "JAXB RI v2.2.11")
    public void setProperties(Feed.Properties value) {
        this.properties = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:48:12+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setProperties
(
Feed
.
Properties
value
)
{
this
.
properties
=
value
;
}

Sets the value of the properties property.

@param value
allowed object is
{@link Feed.Properties }

Sets the value of the properties property .


@Override
    public void downgradeToPreviousVersion(KyeroDocument doc) {
        doc.setDocumentVersion(KyeroVersion.V2_1);

        try {
            this.downgradeNewBuildElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't downgrade <new_build> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.downgradeTypeElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't downgrade <type> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.downgradeUrlElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't downgrade <url> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.removeLocationElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't remove <location> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.removeEnergyRatingElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't remove <energy_rating> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.removeNotesElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't remove <notes> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.removeUnsupportedLanguageElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't remove unsupported translation elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }
    }

Downgrade a Kyero document from version 3.

@param doc Kyero document in version 3

Downgrade a Kyero document from version 3 .


@Override
    public void upgradeFromPreviousVersion(KyeroDocument doc) {
        doc.setDocumentVersion(KyeroVersion.V3);

        try {
            this.removeCustomElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't remove <custom> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.upgradeNewBuildElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't upgrade <new_build> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.upgradeTypeElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't upgrade <type> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.upgradeCurrencyElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't upgrade <currency> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }

        try {
            this.upgradeUrlElements(doc.getDocument());
        } catch (Exception ex) {
            LOGGER.error("Can't upgrade <url> elements!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
        }
    }

@
Override
public
void
upgradeFromPreviousVersion
(
KyeroDocument
doc
)
{
doc
.
setDocumentVersion
(
KyeroVersion
.
V3
)
;
try
{
this
.
removeCustomElements
(
doc
.
getDocument
(
)
)
;
}
catch
(
Exception
ex
)
{
LOGGER
.
error
(
"Can't remove <custom> elements!"
)
;
LOGGER
.
error
(
"> "
+
ex
.
getLocalizedMessage
(
)
,
ex
)
;
}
try
{
this
.
upgradeNewBuildElements
(
doc
.
getDocument
(
)
)
;
}
catch
(
Exception
ex
)
{
LOGGER
.
error
(
"Can't upgrade <new_build> elements!"
)
;
LOGGER
.
error
(
"> "
+
ex
.
getLocalizedMessage
(
)
,
ex
)
;
}
try
{
this
.
upgradeTypeElements
(
doc
.
getDocument
(
)
)
;
}
catch
(
Exception
ex
)
{
LOGGER
.
error
(
"Can't upgrade <type> elements!"
)
;
LOGGER
.
error
(
"> "
+
ex
.
getLocalizedMessage
(
)
,
ex
)
;
}
try
{
this
.
upgradeCurrencyElements
(
doc
.
getDocument
(
)
)
;
}
catch
(
Exception
ex
)
{
LOGGER
.
error
(
"Can't upgrade <currency> elements!"
)
;
LOGGER
.
error
(
"> "
+
ex
.
getLocalizedMessage
(
)
,
ex
)
;
}
try
{
this
.
upgradeUrlElements
(
doc
.
getDocument
(
)
)
;
}
catch
(
Exception
ex
)
{
LOGGER
.
error
(
"Can't upgrade <url> elements!"
)
;
LOGGER
.
error
(
"> "
+
ex
.
getLocalizedMessage
(
)
,
ex
)
;
}
}

Upgrade a Kyero document to version 3.

@param doc Kyero document in version 2.1


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public List<Immobilie> getImmobilie() {
        if (immobilie == null) {
            immobilie = new ArrayList<Immobilie>();
        }
        return this.immobilie;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:50:55+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
Immobilie
>
getImmobilie
(
)
{
if
(
immobilie
==
)
{
immobilie
=
new
ArrayList
<
Immobilie
>
(
)
;
}
return
this
.
immobilie
;
}

Gets the value of the immobilie 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 immobilie property.

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

getImmobilie().add(newItem);

Objects of the following type(s) are allowed in the list
{@link Immobilie }

Gets the value of the immobilie property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public List<Objekt> getObjekt() {
        if (objekt == null) {
            objekt = new ArrayList<Objekt>();
        }
        return this.objekt;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
Objekt
>
getObjekt
(
)
{
if
(
objekt
==
)
{
objekt
=
new
ArrayList
<
Objekt
>
(
)
;
}
return
this
.
objekt
;
}

Gets the value of the objekt 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 objekt property.

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

getObjekt().add(newItem);

Objects of the following type(s) are allowed in the list
{@link Objekt }


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public List<Fehlerliste> getFehlerliste() {
        if (fehlerliste == null) {
            fehlerliste = new ArrayList<Fehlerliste>();
        }
        return this.fehlerliste;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
Fehlerliste
>
getFehlerliste
(
)
{
if
(
fehlerliste
==
)
{
fehlerliste
=
new
ArrayList
<
Fehlerliste
>
(
)
;
}
return
this
.
fehlerliste
;
}

Gets the value of the fehlerliste 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 fehlerliste property.

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

getFehlerliste().add(newItem);

Objects of the following type(s) are allowed in the list
{@link Fehlerliste }

Gets the value of the fehlerliste property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public List<Status> getStatus() {
        if (status == null) {
            status = new ArrayList<Status>();
        }
        return this.status;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
Status
>
getStatus
(
)
{
if
(
status
==
)
{
status
=
new
ArrayList
<
Status
>
(
)
;
}
return
this
.
status
;
}

Gets the value of the status 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 status property.

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

getStatus().add(newItem);

Objects of the following type(s) are allowed in the list
{@link Status }


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
    public void setSonstigeTyp(Sonstige.SonstigeTyp value) {
        this.sonstigeTyp = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:50:55+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setSonstigeTyp
(
Sonstige
.
SonstigeTyp
value
)
{
this
.
sonstigeTyp
=
value
;
}

Sets the value of the sonstigeTyp property.

@param value
allowed object is
{@link Sonstige.SonstigeTyp }

Sets the value of the sonstigeTyp property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public void setDistanzZu(Distanzen.DistanzZu value) {
        this.distanzZu = value;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
void
setDistanzZu
(
Distanzen
.
DistanzZu
value
)
{
this
.
distanzZu
=
value
;
}

Sets the value of the distanzZu property.

@param value
allowed object is
{@link Distanzen.DistanzZu }

Sets the value of the distanzZu property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public List<Distanzen> getDistanzen() {
        if (distanzen == null) {
            distanzen = new ArrayList<Distanzen>();
        }
        return this.distanzen;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
Distanzen
>
getDistanzen
(
)
{
if
(
distanzen
==
)
{
distanzen
=
new
ArrayList
<
Distanzen
>
(
)
;
}
return
this
.
distanzen
;
}

Gets the value of the distanzen 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 distanzen property.

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

getDistanzen().add(newItem);

Objects of the following type(s) are allowed in the list
{@link Distanzen }

Gets the value of the distanzen property .


@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
    public List<DistanzenSport> getDistanzenSport() {
        if (distanzenSport == null) {
            distanzenSport = new ArrayList<DistanzenSport>();
        }
        return this.distanzenSport;
    }

@
Generated
(
value
=
"com.sun.tools.xjc.Driver"
,
date
=
"2018-10-12T02:54:50+02:00"
,
comments
=
"JAXB RI v2.2.11"
)
public
List
<
DistanzenSport
>
getDistanzenSport
(
)
{
if
(
distanzenSport
==
)
{
distanzenSport
=
new
ArrayList
<
DistanzenSport
>
(
)
;
}
return
this
.
distanzenSport
;
}

Gets the value of the distanzenSport 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 distanzenSport property.

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

getDistanzenSport().add(newItem);

Objects of the following type(s) are allowed in the list
{@link DistanzenSport }

Gets the value of the distanzenSport property .


public static boolean isCompatibleWithThrowsClause(Throwable ex, Class<?>[] declaredExceptions) {
        if (!isCheckedException(ex)) {
            return true;
        }
        if (declaredExceptions != null) {
            int i = 0;
            while (i < declaredExceptions.length) {
                if (declaredExceptions[i].isAssignableFrom(ex.getClass())) {
                    return true;
                }
                i++;
            }
        }
        return false;
    }

public static boolean isCompatibleWithThrowsClause ( Throwable ex , Class < ? > [ ] declaredExceptions ) { if ( ! isCheckedException ( ex ) ) { return true ; } if ( declaredExceptions != null ) { int i = 0 ; while ( i < declaredExceptions . length ) { if ( declaredExceptions [ i ] . isAssignableFrom ( ex . getClass ( ) ) ) { return true ; } i ++ ; } } return false ; }

Check whether the given exception is compatible with the exceptions
declared in a throws clause.

@param ex                 the exception to checked
@param declaredExceptions the exceptions declared in the throws clause
@return whether the given exception is compatible

Check whether the given exception is compatible with the exceptions declared in a throws clause .


public void setBindings(Map<String, String> bindings) {
        for (Map.Entry<String, String> entry : bindings.entrySet()) {
            bindNamespaceUri(entry.getKey(), entry.getValue());
        }
    }

public void setBindings ( Map < String , String > bindings ) { for ( Map . Entry < String , String > entry : bindings . entrySet ( ) ) { bindNamespaceUri ( entry . getKey ( ) , entry . getValue ( ) ) ; } }

Sets the bindings for this namespace context. The supplied map must consist of string key value pairs.

@param bindings the bindings

Sets the bindings for this namespace context . The supplied map must consist of string key value pairs .


public void bindNamespaceUri(String prefix, String namespaceUri) {
        Assert.notNull(prefix, "No prefix given");
        Assert.notNull(namespaceUri, "No namespaceUri given");
        if (XMLConstants.DEFAULT_NS_PREFIX.equals(prefix)) {
            defaultNamespaceUri = namespaceUri;
        } else {
            prefixToNamespaceUri.put(prefix, namespaceUri);
            getPrefixesInternal(namespaceUri).add(prefix);
        }
    }

public
void
bindNamespaceUri
(
String
prefix
,
String
namespaceUri
)
{
Assert
.
notNull
(
prefix
,
"No prefix given"
)
;
Assert
.
notNull
(
namespaceUri
,
"No namespaceUri given"
)
;
if
(
XMLConstants
.
DEFAULT_NS_PREFIX
.
equals
(
prefix
)
)
{
defaultNamespaceUri
=
namespaceUri
;
}
else
{
prefixToNamespaceUri
.
put
(
prefix
,
namespaceUri
)
;
getPrefixesInternal
(
namespaceUri
)
.
add
(
prefix
)
;
}
}

Binds the given prefix to the given namespace.

@param prefix       the namespace prefix
@param namespaceUri the namespace uri

Binds the given prefix to the given namespace .


public void removeBinding(String prefix) {
        if (XMLConstants.DEFAULT_NS_PREFIX.equals(prefix)) {
            defaultNamespaceUri = "";
        } else {
            String namespaceUri = prefixToNamespaceUri.remove(prefix);
            List<String> prefixes = getPrefixesInternal(namespaceUri);
            prefixes.remove(prefix);
        }
    }

public void removeBinding ( String prefix ) { if ( XMLConstants . DEFAULT_NS_PREFIX . equals ( prefix ) ) { defaultNamespaceUri = "" ; } else { String namespaceUri = prefixToNamespaceUri . remove ( prefix ) ; List < String > prefixes = getPrefixesInternal ( namespaceUri ) ; prefixes . remove ( prefix ) ; } }

Removes the given prefix from this context.

@param prefix the prefix to be removed

Removes the given prefix from this context .


private boolean hasOpeningTag(String content) {
        if (this.inComment) {
            return false;
        }
        int openTagIndex = content.indexOf('<');
        return (openTagIndex > -1 && content.length() > openTagIndex && Character.isLetter(content.charAt(openTagIndex + 1)));
    }

private boolean hasOpeningTag ( String content ) { if ( this . inComment ) { return false ; } int openTagIndex = content . indexOf ( ' ' ) ; return ( openTagIndex > - 1 && content . length ( ) > openTagIndex && Character . isLetter ( content . charAt ( openTagIndex + 1 ) ) ) ; }

Does the supplied content contain an XML opening tag. If the parse state is currently
in an XML comment then this method always returns false. It is expected that all comment
tokens will have consumed for the supplied content before passing the remainder to this method.

Does the supplied content contain an XML opening tag . If the parse state is currently in an XML comment then this method always returns false . It is expected that all comment tokens will have consumed for the supplied content before passing the remainder to this method .


private String consumeCommentTokens(String line) {
        if (line.indexOf(START_COMMENT) == -1 && line.indexOf(END_COMMENT) == -1) {
            return line;
        }
        while ((line = consume(line)) != null) {
            if (!this.inComment && !line.trim().startsWith(START_COMMENT)) {
                return line;
            }
        }
        return line;
    }

private String consumeCommentTokens ( String line ) { if ( line . indexOf ( START_COMMENT ) == - 1 && line . indexOf ( END_COMMENT ) == - 1 ) { return line ; } while ( ( line = consume ( line ) ) != null ) { if ( ! this . inComment && ! line . trim ( ) . startsWith ( START_COMMENT ) ) { return line ; } } return line ; }

Consumes all the leading comment data in the given String and returns the remaining content, which
may be empty since the supplied content might be all comment data. For our purposes it is only important
to strip leading comment content on a line since the first piece of non comment content will be either
the DOCTYPE declaration or the root element of the document.

Consumes all the leading comment data in the given String and returns the remaining content which may be empty since the supplied content might be all comment data . For our purposes it is only important to strip leading comment content on a line since the first piece of non comment content will be either the DOCTYPE declaration or the root element of the document .


private String consume(String line) {
        int index = (this.inComment ? endComment(line) : startComment(line));
        return (index == -1 ? null : line.substring(index));
    }

private String consume ( String line ) { int index = ( this . inComment ? endComment ( line ) : startComment ( line ) ) ; return ( index == - 1 ? null : line . substring ( index ) ) ; }

Consume the next comment token, update the "inComment" flag
and return the remaining content.

Consume the next comment token update the inComment flag and return the remaining content .


private int commentToken(String line, String token, boolean inCommentIfPresent) {
        int index = line.indexOf(token);
        if (index > -1) {
            this.inComment = inCommentIfPresent;
        }
        return (index == -1 ? index : index + token.length());
    }

private int commentToken ( String line , String token , boolean inCommentIfPresent ) { int index = line . indexOf ( token ) ; if ( index > - 1 ) { this . inComment = inCommentIfPresent ; } return ( index == - 1 ? index : index + token . length ( ) ) ; }

Try to consume the supplied token against the supplied content and update the
in comment parse state to the supplied value. Returns the index into the content
which is after the token or -1 if the token is not found.

Try to consume the supplied token against the supplied content and update the in comment parse state to the supplied value . Returns the index into the content which is after the token or - 1 if the token is not found .


public static void initLogging(String location) throws FileNotFoundException {
        String resolvedLocation = SystemPropertyUtils.resolvePlaceholders(location);
        URL url = ResourceUtils.getURL(resolvedLocation);
        if (resolvedLocation.toLowerCase().endsWith(XML_FILE_EXTENSION)) {
            DOMConfigurator.configure(url);
        } else {
            PropertyConfigurator.configure(url);
        }
    }

public static void initLogging ( String location ) throws FileNotFoundException { String resolvedLocation = SystemPropertyUtils . resolvePlaceholders ( location ) ; URL url = ResourceUtils . getURL ( resolvedLocation ) ; if ( resolvedLocation . toLowerCase ( ) . endsWith ( XML_FILE_EXTENSION ) ) { DOMConfigurator . configure ( url ) ; } else { PropertyConfigurator . configure ( url ) ; } }

Initialize log4j from the given file location, with no config file refreshing.
Assumes an XML file in case of a ".xml" file extension, and a properties file
otherwise.

@param location the location of the config file: either a "classpath:" location
(e.g. "classpath:myLog4j.properties"), an absolute file URL
(e.g. "file:C:/log4j.properties), or a plain absolute path in the file system
(e.g. "C:/log4j.properties")
@throws java.io.FileNotFoundException if the location specifies an invalid file path

Initialize log4j from the given file location with no config file refreshing . Assumes an XML file in case of a . xml file extension and a properties file otherwise .


@Override
    public final void startPrefixMapping(String prefix, String uri) {
        namespaceContext.bindNamespaceUri(prefix, uri);
        namespaceContextChanged = true;
    }

@ Override public final void startPrefixMapping ( String prefix , String uri ) { namespaceContext . bindNamespaceUri ( prefix , uri ) ; namespaceContextChanged = true ; }

Binds the given prefix to the given namespaces.

@see SimpleNamespaceContext#bindNamespaceUri(String, String)

Binds the given prefix to the given namespaces .


public void add(Iterator<E> iterator) {
        Assert.state(!inUse, "You can no longer add iterator to a composite iterator that's already in use");
        if (iterators.contains(iterator)) {
            throw new IllegalArgumentException("You cannot add the same iterator twice");
        }
        iterators.add(iterator);
    }


public final Option addOption( Option opt ) {
        if ( opt.shortForm() != null )
            this.options.put("-" + opt.shortForm(), opt);
        this.options.put("--" + opt.longForm(), opt);
        return opt;
    }

public final Option addOption ( Option opt ) { if ( opt . shortForm ( ) != null ) this . options . put ( "-" + opt . shortForm ( ) , opt ) ; this . options . put ( "--" + opt . longForm ( ) , opt ) ; return opt ; }

Add the specified Option to the list of accepted options


public final Option addStringOption( char shortForm, String longForm ) {
        return addOption(new Option.StringOption(shortForm, longForm));
    }

public final Option addStringOption ( char shortForm , String longForm ) { return addOption ( new Option . StringOption ( shortForm , longForm ) ) ; }

Convenience method for adding a string option.
@return the new Option

Convenience method for adding a string option .


public final Option addIntegerOption( char shortForm, String longForm ) {
        return addOption(new Option.IntegerOption(shortForm, longForm));
    }

public final Option addIntegerOption ( char shortForm , String longForm ) { return addOption ( new Option . IntegerOption ( shortForm , longForm ) ) ; }

Convenience method for adding an integer option.
@return the new Option

Convenience method for adding an integer option .


public final Option addLongOption( char shortForm, String longForm ) {
        return addOption(new Option.LongOption(shortForm, longForm));
    }

public final Option addLongOption ( char shortForm , String longForm ) { return addOption ( new Option . LongOption ( shortForm , longForm ) ) ; }

Convenience method for adding a long integer option.
@return the new Option

Convenience method for adding a long integer option .


public final Option addDoubleOption( char shortForm, String longForm ) {
        return addOption(new Option.DoubleOption(shortForm, longForm));
    }

public final Option addDoubleOption ( char shortForm , String longForm ) { return addOption ( new Option . DoubleOption ( shortForm , longForm ) ) ; }

Convenience method for adding a double option.
@return the new Option

Convenience method for adding a double option .


public final Option addBooleanOption( char shortForm, String longForm ) {
        return addOption(new Option.BooleanOption(shortForm, longForm));
    }

public final Option addBooleanOption ( char shortForm , String longForm ) { return addOption ( new Option . BooleanOption ( shortForm , longForm ) ) ; }

Convenience method for adding a boolean option.
@return the new Option

Convenience method for adding a boolean option .


public final void parse( String[] argv, Locale locale )
        throws IllegalOptionValueException, UnknownOptionException {

        // It would be best if this method only threw OptionException, but for
        // backwards compatibility with old user code we throw the two
        // exceptions above instead.

        Vector otherArgs = new Vector();
        int position = 0;
        this.values = new Hashtable(10);
        while ( position < argv.length ) {
            String curArg = argv[position];
            if ( curArg.startsWith("-") ) {
                if ( curArg.equals("--") ) { // end of options
                    position += 1;
                    break;
                }
                String valueArg = null;
                if ( curArg.startsWith("--") ) { // handle --arg=value
                    int equalsPos = curArg.indexOf("=");
                    if ( equalsPos != -1 ) {
                        valueArg = curArg.substring(equalsPos+1);
                        curArg = curArg.substring(0,equalsPos);
                    }
                } else if(curArg.length() > 2) {  // handle -abcd
                    for(int i=1; i<curArg.length(); i++) {
                        Option opt=(Option)this.options.get
                            ("-"+curArg.charAt(i));
                        if(opt==null) throw new
                            UnknownSuboptionException(curArg,curArg.charAt(i));
                        if(opt.wantsValue()) throw new
                            NotFlagException(curArg,curArg.charAt(i));
                        addValue(opt, opt.getValue(null,locale));

                    }
                    position++;
                    continue;
                }

                Option opt = (Option)this.options.get(curArg);
                if ( opt == null ) {
                    throw new UnknownOptionException(curArg);
                }
                Object value = null;
                if ( opt.wantsValue() ) {
                    if ( valueArg == null ) {
                        position += 1;
                        if ( position < argv.length ) {
                            valueArg = argv[position];
                        }
                    }
                    value = opt.getValue(valueArg, locale);
                }
                else {
                    value = opt.getValue(null, locale);
                }

                addValue(opt, value);

                position += 1;
            }
            else {
                otherArgs.addElement(curArg);
                position += 1;
            }
        }
        for ( ; position < argv.length; ++position ) {
            otherArgs.addElement(argv[position]);
        }

        this.remainingArgs = new String[otherArgs.size()];
        otherArgs.copyInto(remainingArgs);
    }

Extract the options and non-option arguments from the given
list of command-line arguments. The specified locale is used for
parsing options whose values might be locale-specific.

Extract the options and non - option arguments from the given list of command - line arguments . The specified locale is used for parsing options whose values might be locale - specific .


public Object newInstance(Class c) throws InstantiationException, IllegalAccessException {
        Object ret = null;
        Method[] methods = c.getDeclaredMethods();
        Method m;
        int modifiers;
        // searching for static methods:
        for (int i = 0; i < methods.length; i++) {
            m = methods[i];
            modifiers = m.getModifiers();
            if ((modifiers & Modifier.STATIC) != 0) {
                // searching for public access:
                if ((modifiers & Modifier.PUBLIC) != 0) {
                    // searching for no parameters:
                    if (m.getParameterTypes().length == 0) {
                        // searching for return type:
                        if (m.getReturnType() == c) {
                            // searching for substring "instance" in method name:
                            if (m.getName().toLowerCase().indexOf("instance") != -1) {
                                try {
                                    // Finally we found a singleton method:
                                    // we are static and don't need an instance.
                                    ret = m.invoke(null, dummyParameters);
                                } catch (IllegalArgumentException e) {
                                    // This will not happen:
                                    // we ensured that no arguments are needed.
                                    e.printStackTrace();
                                } catch (IllegalAccessException e) {
                                    // This will not happen (only in applet context perhaps or with some
                                    // SecurityManager):
                                    // we ensured public access.
                                    e.printStackTrace();
                                } catch (InvocationTargetException e) {
                                    e.printStackTrace();
                                }
                            }
                        }
                    }
                }
            }
        }
        // check, if we found a singleton:
        if (ret == null) {
            // try to invoke the default constructor:
            Constructor[] constructors = c.getConstructors();
            Constructor con = null;
            // search for a parameterless constructor:
            for (int i = 0; i < constructors.length; i++) {
                con = constructors[i];
                if (con.getParameterTypes().length == 0) {
                    // see, if public:
                    modifiers = con.getModifiers();
                    try {
                        if ((modifiers & Modifier.PUBLIC) == 0) {
                            // try to set accessible:
                            con.setAccessible(true);
                        }
                        // invokes the default constructor
                        ret = c.newInstance();
                    } catch (SecurityException se) {
                        // damn
                    }
                }
            }
        }
        if (ret == null) {
            System.err.println("Unable to instantiate: " + c.getName()
                    + ": no singleton method, no public default constructor.");
        }
        return ret;
    }

Dynamic instantiation of the given type with singleton retrieval support as described in this class description.

Dynamic instantiation of the given type with singleton retrieval support as described in this class description .


protected void afterAccess() {
        if (this.concurrencyLimit >= 0) {
            synchronized (this.monitor) {
                this.concurrencyCount--;
                if (logger.isDebugEnabled()) {
                    logger.debug("Returning from throttle at concurrency count " + this.concurrencyCount);
                }
                this.monitor.notify();
            }
        }
    }

To be invoked after the main execution logic of concrete subclasses.

@see #beforeAccess()

To be invoked after the main execution logic of concrete subclasses .


public void setTargetObject(Object targetObject) {
        this.targetObject = targetObject;
        if (targetObject != null) {
            this.targetClass = targetObject.getClass();
        }
    }

public void setTargetObject ( Object targetObject ) { this . targetObject = targetObject ; if ( targetObject != null ) { this . targetClass = targetObject . getClass ( ) ; } }

Set the target object on which to call the target method.
Only necessary when the target method is not static;
else, a target class is sufficient.

@see #setTargetClass
@see #setTargetMethod

Set the target object on which to call the target method . Only necessary when the target method is not static ; else a target class is sufficient .


public void prepare() throws ClassNotFoundException, NoSuchMethodException {
        if (this.staticMethod != null) {
            int lastDotIndex = this.staticMethod.lastIndexOf('.');
            if (lastDotIndex == -1 || lastDotIndex == this.staticMethod.length()) {
                throw new IllegalArgumentException(
                        "staticMethod must be a fully qualified class plus method name: " +
                                "e.g. 'example.MyExampleClass.myExampleMethod'"
                );
            }
            String className = this.staticMethod.substring(0, lastDotIndex);
            String methodName = this.staticMethod.substring(lastDotIndex + 1);
            this.targetClass = resolveClassName(className);
            this.targetMethod = methodName;
        }

        Class<?> targetClass = getTargetClass();
        String targetMethod = getTargetMethod();
        if (targetClass == null) {
            throw new IllegalArgumentException("Either 'targetClass' or 'targetObject' is required");
        }
        if (targetMethod == null) {
            throw new IllegalArgumentException("Property 'targetMethod' is required");
        }

        Object[] arguments = getArguments();
        Class<?>[] argTypes = new Class<?>[arguments.length];
        for (int i = 0; i < arguments.length; ++i) {
            argTypes[i] = (arguments[i] != null ? arguments[i].getClass() : Object.class);
        }

        // Try to get the exact method first.
        try {
            this.methodObject = targetClass.getMethod(targetMethod, argTypes);
        } catch (NoSuchMethodException ex) {
            // Just rethrow exception if we can't get any match.
            this.methodObject = findMatchingMethod();
            if (this.methodObject == null) {
                throw ex;
            }
        }
    }

Prepare the specified method.
The method can be invoked any number of times afterwards.

@see #getPreparedMethod
@see #invoke

Prepare the specified method . The method can be invoked any number of times afterwards .


protected Method findMatchingMethod() {
        String targetMethod = getTargetMethod();
        Object[] arguments = getArguments();
        int argCount = arguments.length;

        Method[] candidates = ReflectionUtils.getAllDeclaredMethods(getTargetClass());
        int minTypeDiffWeight = Integer.MAX_VALUE;
        Method matchingMethod = null;

        for (Method candidate : candidates) {
            if (candidate.getName().equals(targetMethod)) {
                Class<?>[] paramTypes = candidate.getParameterTypes();
                if (paramTypes.length == argCount) {
                    int typeDiffWeight = getTypeDifferenceWeight(paramTypes, arguments);
                    if (typeDiffWeight < minTypeDiffWeight) {
                        minTypeDiffWeight = typeDiffWeight;
                        matchingMethod = candidate;
                    }
                }
            }
        }

        return matchingMethod;
    }

protected Method findMatchingMethod ( ) { String targetMethod = getTargetMethod ( ) ; Object [ ] arguments = getArguments ( ) ; int argCount = arguments . length ; Method [ ] candidates = ReflectionUtils . getAllDeclaredMethods ( getTargetClass ( ) ) ; int minTypeDiffWeight = Integer . MAX_VALUE ; Method matchingMethod = null ; for ( Method candidate : candidates ) { if ( candidate . getName ( ) . equals ( targetMethod ) ) { Class < ? > [ ] paramTypes = candidate . getParameterTypes ( ) ; if ( paramTypes . length == argCount ) { int typeDiffWeight = getTypeDifferenceWeight ( paramTypes , arguments ) ; if ( typeDiffWeight < minTypeDiffWeight ) { minTypeDiffWeight = typeDiffWeight ; matchingMethod = candidate ; } } } } return matchingMethod ; }

Find a matching method with the specified name for the specified arguments.

@return a matching method, or {@code null} if none
@see #getTargetClass()
@see #getTargetMethod()
@see #getArguments()

Find a matching method with the specified name for the specified arguments .


private static String toUnsignedString(int i, int shift) {
        char[] buf = new char[32];
        int charPos = 32;
        int radix = 1 << shift;
        int mask = radix - 1;
        do {
            buf[--charPos] = digits[i & mask];
            i >>>= shift;
        } while (i != 0);

        return new String(buf, charPos, (32 - charPos));
    }

private static String toUnsignedString ( int i , int shift ) { char [ ] buf = new char [ 32 ] ; int charPos = 32 ; int radix = 1 << shift ; int mask = radix - 1 ; do { buf [ -- charPos ] = digits [ i & mask ] ; i >>>= shift ; } while ( i != 0 ) ; return new String ( buf , charPos , ( 32 - charPos ) ) ; }

Convert the integer to an unsigned number.

Convert the integer to an unsigned number .


public static byte[] serialize(Object object) {
        if (object == null) {
            return null;
        }
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(object);
            oos.flush();
        } catch (IOException ex) {
            throw new IllegalArgumentException("Failed to serialize object of type: " + object.getClass(), ex);
        }
        return baos.toByteArray();
    }

public
static
byte
[
]
serialize
(
Object
object
)
{
if
(
object
==
)
{
return
;
}
ByteArrayOutputStream
baos
=
new
ByteArrayOutputStream
(
)
;
try
{
ObjectOutputStream
oos
=
new
ObjectOutputStream
(
baos
)
;
oos
.
writeObject
(
object
)
;
oos
.
flush
(
)
;
}
catch
(
IOException
ex
)
{
throw
new
IllegalArgumentException
(
"Failed to serialize object of type: "
+
object
.
getClass
(
)
,
ex
)
;
}
return
baos
.
toByteArray
(
)
;
}

Serialize the given object to a byte array.

@param object the object to serialize
@return an array of bytes representing the object in a portable fashion

Serialize the given object to a byte array .


public static Object deserialize(byte[] bytes) {
        if (bytes == null) {
            return null;
        }
        try {
            ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
            return ois.readObject();
        } catch (IOException ex) {
            throw new IllegalArgumentException("Failed to deserialize object", ex);
        } catch (ClassNotFoundException ex) {
            throw new IllegalStateException("Failed to deserialize object type", ex);
        }
    }

public
static
Object
deserialize
(
byte
[
]
bytes
)
{
if
(
bytes
==
)
{
return
;
}
try
{
ObjectInputStream
ois
=
new
ObjectInputStream
(
new
ByteArrayInputStream
(
bytes
)
)
;
return
ois
.
readObject
(
)
;
}
catch
(
IOException
ex
)
{
throw
new
IllegalArgumentException
(
"Failed to deserialize object"
,
ex
)
;
}
catch
(
ClassNotFoundException
ex
)
{
throw
new
IllegalStateException
(
"Failed to deserialize object type"
,
ex
)
;
}
}

Deserialize the byte array into an object.

@param bytes a serialized object
@return the result of deserializing the bytes

Deserialize the byte array into an object .


public static Element getChildElementByTagName(Element ele, String childEleName) {
        Assert.notNull(ele, "Element must not be null");
        Assert.notNull(childEleName, "Element name must not be null");
        NodeList nl = ele.getChildNodes();
        for (int i = 0; i < nl.getLength(); i++) {
            Node node = nl.item(i);
            if (node instanceof Element && nodeNameMatch(node, childEleName)) {
                return (Element) node;
            }
        }
        return null;
    }

public
static
Element
getChildElementByTagName
(
Element
ele
,
String
childEleName
)
{
Assert
.
notNull
(
ele
,
"Element must not be null"
)
;
Assert
.
notNull
(
childEleName
,
"Element name must not be null"
)
;
NodeList
nl
=
ele
.
getChildNodes
(
)
;
for
(
int
i
=
0
;
i
<
nl
.
getLength
(
)
;
i
++
)
{
Node
node
=
nl
.
item
(
i
)
;
if
(
node
instanceof
Element
&&
nodeNameMatch
(
node
,
childEleName
)
)
{
return
(
Element
)
node
;
}
}
return
;
}

Utility method that returns the first child element identified by its name.

@param ele          the DOM element to analyze
@param childEleName the child element name to look for
@return the {@code org.w3c.dom.Element} instance, or {@code null} if none found

Utility method that returns the first child element identified by its name .


public static String getChildElementValueByTagName(Element ele, String childEleName) {
        Element child = getChildElementByTagName(ele, childEleName);
        return (child != null ? getTextValue(child) : null);
    }

public static String getChildElementValueByTagName ( Element ele , String childEleName ) { Element child = getChildElementByTagName ( ele , childEleName ) ; return ( child != null ? getTextValue ( child ) : null ) ; }

Utility method that returns the first child element value identified by its name.

@param ele          the DOM element to analyze
@param childEleName the child element name to look for
@return the extracted text value, or {@code null} if no child element found

Utility method that returns the first child element value identified by its name .


public static List<Element> getChildElements(Element ele) {
        Assert.notNull(ele, "Element must not be null");
        NodeList nl = ele.getChildNodes();
        List<Element> childEles = new ArrayList<Element>();
        for (int i = 0; i < nl.getLength(); i++) {
            Node node = nl.item(i);
            if (node instanceof Element) {
                childEles.add((Element) node);
            }
        }
        return childEles;
    }

public
static
List
<
Element
>
getChildElements
(
Element
ele
)
{
Assert
.
notNull
(
ele
,
"Element must not be null"
)
;
NodeList
nl
=
ele
.
getChildNodes
(
)
;
List
<
Element
>
childEles
=
new
ArrayList
<
Element
>
(
)
;
for
(
int
i
=
0
;
i
<
nl
.
getLength
(
)
;
i
++
)
{
Node
node
=
nl
.
item
(
i
)
;
if
(
node
instanceof
Element
)
{
childEles
.
add
(
(
Element
)
node
)
;
}
}
return
childEles
;
}

Retrieves all child elements of the given DOM element

@param ele the DOM element to analyze
@return a List of child {@code org.w3c.dom.Element} instances


private static boolean nodeNameMatch(Node node, String desiredName) {
        return (desiredName.equals(node.getNodeName()) || desiredName.equals(node.getLocalName()));
    }

private static boolean nodeNameMatch ( Node node , String desiredName ) { return ( desiredName . equals ( node . getNodeName ( ) ) || desiredName . equals ( node . getLocalName ( ) ) ) ; }

Matches the given node's name and local name against the given desired name.

Matches the given node s name and local name against the given desired name .


private static boolean nodeNameMatch(Node node, Collection<?> desiredNames) {
        return (desiredNames.contains(node.getNodeName()) || desiredNames.contains(node.getLocalName()));
    }

private static boolean nodeNameMatch ( Node node , Collection < ? > desiredNames ) { return ( desiredNames . contains ( node . getNodeName ( ) ) || desiredNames . contains ( node . getLocalName ( ) ) ) ; }

Matches the given node's name and local name against the given desired names.

Matches the given node s name and local name against the given desired names .


public static final String setSize(final String s, final int length) {
    String result = s;
    int oldlen = s.length();
    if (oldlen > length) {
      System.err.println("greenpeace.util.setSize(String s,int length): length (" + length
          + ") is smaller than s.length(" + oldlen + ") : " + s);
    } else {
      int tofill = length - oldlen;
      result = StringUtil.appendSpaces(s, tofill);
    }
    return result;
  }

Appends the necessary amount of spaces to the string until it has the givn
length. No Exception is thrown, if the length of the String is shorter than
the given length, but nothing will happen and a message will be printed to
the System.out.

@param s
the String to expand.
@param length
the desired length of the String to be returned.
@return A String that represents the content of the old String including
extra whitespaces.

Appends the necessary amount of spaces to the string until it has the givn length . No Exception is thrown if the length of the String is shorter than the given length but nothing will happen and a message will be printed to the System . out .


public static void monitor(Object handle, ReleaseListener listener) {
        if (logger.isDebugEnabled()) {
            logger.debug("Monitoring handle [" + handle + "] with release listener [" + listener + "]");
        }

        // Make weak reference to this handle, so we can say when
        // handle is not used any more by polling on handleQueue.
        WeakReference<Object> weakRef = new WeakReference<Object>(handle, handleQueue);

        // Add monitored entry to internal map of all monitored entries.
        addEntry(weakRef, listener);
    }

Start to monitor given handle object for becoming weakly reachable.
When the handle isn't used anymore, the given listener will be called.

@param handle   the object that will be monitored
@param listener the listener that will be called upon release of the handle

Start to monitor given handle object for becoming weakly reachable . When the handle isn t used anymore the given listener will be called .


private static void addEntry(Reference<?> ref, ReleaseListener entry) {
        synchronized (WeakReferenceMonitor.class) {
            // Add entry, the key is given reference.
            trackedEntries.put(ref, entry);

            // Start monitoring thread lazily.
            if (monitoringThread == null) {
                monitoringThread = new Thread(new MonitoringProcess(), WeakReferenceMonitor.class.getName());
                monitoringThread.setDaemon(true);
                monitoringThread.start();
            }
        }
    }

Add entry to internal map of tracked entries.
Internal monitoring thread is started if not already running.

@param ref   reference to tracked handle
@param entry the associated entry

Add entry to internal map of tracked entries . Internal monitoring thread is started if not already running .


private static boolean keepMonitoringThreadAlive() {
        synchronized (WeakReferenceMonitor.class) {
            if (!trackedEntries.isEmpty()) {
                return true;
            } else {
                logger.debug("No entries left to track - stopping reference monitor thread");
                monitoringThread = null;
                return false;
            }
        }
    }

Check whether to keep the monitoring thread alive,
i.e. whether there are still entries being tracked.

Check whether to keep the monitoring thread alive i . e . whether there are still entries being tracked .


public static String calcMobileCity(String mobileNumber) throws MalformedURLException {
        ObjectMapper objectMapper = new ObjectMapper();

        String jsonString = null;
        String urlString = "http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=" + mobileNumber;
        StringBuffer sb = new StringBuffer();
        BufferedReader buffer;
        URL url = new URL(urlString);
        try {
            InputStream in = url.openStream();

//solve the garbage problem
            buffer = new BufferedReader(new InputStreamReader(in, "gb2312"));
            String line = null;
            while ((line = buffer.readLine()) != null) {
                sb.append(line);
            }
            in.close();
            buffer.close();
            // System.out.println(sb.toString());
            jsonString = sb.toString();
            EntityHelper.print(jsonString);
//replace \
            jsonString = jsonString.replaceAll("^[__]\\w{14}+[_ = ]+", "[");
            // System.out.println(jsonString+"]");
            String jsonString2 = jsonString + "]";
//json object into the STRING
//            array = JSONArray.fromObject(jsonString2);

//Get JSONArray of JSONObject object , easy to read array of key-value pairs in
//            jsonObject = array.getJSONObject(0);

        } catch (Exception e) {
            e.printStackTrace();
        }
//        return jsonObject.getString("province");
        return null;
    }

//            jsonObject = array.getJSONObject(0);

Test the phone number from which the city is using Taobao API

@return
@param mobileNumber phone number


protected void startPrefixMapping(String prefix, String namespace) throws SAXException {
        if (getContentHandler() != null) {
            if (prefix == null) {
                prefix = "";
            }
            if (!StringUtils.hasLength(namespace)) {
                return;
            }
            if (!namespace.equals(namespaces.get(prefix))) {
                getContentHandler().startPrefixMapping(prefix, namespace);
                namespaces.put(prefix, namespace);
            }
        }
    }

protected void startPrefixMapping ( String prefix , String namespace ) throws SAXException { if ( getContentHandler ( ) != null ) { if ( prefix == null ) { prefix = "" ; } if ( ! StringUtils . hasLength ( namespace ) ) { return ; } if ( ! namespace . equals ( namespaces . get ( prefix ) ) ) { getContentHandler ( ) . startPrefixMapping ( prefix , namespace ) ; namespaces . put ( prefix , namespace ) ; } } }

Starts the prefix mapping for the given prefix.

@see org.xml.sax.ContentHandler#startPrefixMapping(String, String)

Starts the prefix mapping for the given prefix .


protected void endPrefixMapping(String prefix) throws SAXException {
        if (getContentHandler() != null) {
            if (namespaces.containsKey(prefix)) {
                getContentHandler().endPrefixMapping(prefix);
                namespaces.remove(prefix);
            }
        }
    }

protected void endPrefixMapping ( String prefix ) throws SAXException { if ( getContentHandler ( ) != null ) { if ( namespaces . containsKey ( prefix ) ) { getContentHandler ( ) . endPrefixMapping ( prefix ) ; namespaces . remove ( prefix ) ; } } }

Ends the prefix mapping for the given prefix.

@see org.xml.sax.ContentHandler#endPrefixMapping(String)

Ends the prefix mapping for the given prefix .


@SuppressWarnings("unchecked")
    public void addCallback(ListenableFutureCallback<? super T> callback) {
        Assert.notNull(callback, "'callback' must not be null");

        synchronized (mutex) {
            switch (state) {
                case NEW:
                    callbacks.add(callback);
                    break;
                case SUCCESS:
                    callback.onSuccess((T) result);
                    break;
                case FAILURE:
                    callback.onFailure((Throwable) result);
                    break;
            }
        }
    }

@
SuppressWarnings
(
"unchecked"
)
public
void
addCallback
(
ListenableFutureCallback
<
super
T
>
callback
)
{
Assert
.
notNull
(
callback
,
"'callback' must not be null"
)
;
synchronized
(
mutex
)
{
switch
(
state
)
{
case
NEW
:
callbacks
.
add
(
callback
)
;
break
;
case
SUCCESS
:
callback
.
onSuccess
(
(
T
)
result
)
;
break
;
case
FAILURE
:
callback
.
onFailure
(
(
Throwable
)
result
)
;
break
;
}
}
}

Adds the given callback to this registry.

@param callback the callback to add

Adds the given callback to this registry .


private ITreeNode parseTree() {

        ITreeNode root = new TreeNodeUniqueChildren();
        ITreeNode newnode, oldnode;
        Enumeration entries = this.jar.entries();
        String entry;
        while (entries.hasMoreElements()) {
            newnode = root;
            oldnode = root;
            entry = ((JarEntry)entries.nextElement()).getName();
            System.out.println("Entry: " + entry);
            StringTokenizer tokenizer = new StringTokenizer(entry, "/");
            while (tokenizer.hasMoreElements()) {
                String path = tokenizer.nextToken();
                newnode = new TreeNodeUniqueChildren(path);
                oldnode.addChildNode(newnode);
                oldnode = newnode;
            }
        }
        return root;
    }

private
ITreeNode
parseTree
(
)
{
ITreeNode
root
=
new
TreeNodeUniqueChildren
(
)
;
ITreeNode
newnode
,
oldnode
;
Enumeration
entries
=
this
.
jar
.
entries
(
)
;
String
entry
;
while
(
entries
.
hasMoreElements
(
)
)
{
newnode
=
root
;
oldnode
=
root
;
entry
=
(
(
JarEntry
)
entries
.
nextElement
(
)
)
.
getName
(
)
;
System
.
out
.
println
(
"Entry: "
+
entry
)
;
StringTokenizer
tokenizer
=
new
StringTokenizer
(
entry
,
"/"
)
;
while
(
tokenizer
.
hasMoreElements
(
)
)
{
String
path
=
tokenizer
.
nextToken
(
)
;
newnode
=
new
TreeNodeUniqueChildren
(
path
)
;
oldnode
.
addChildNode
(
newnode
)
;
oldnode
=
newnode
;
}
}
return
root
;
}


private int getTextColor(int item) {

        int scrollX = getScrollX();

        // set color of text
        int color = textColor.getDefaultColor();
        int itemWithPadding = (int) (itemWidth + dividerSize);
        if (scrollX > itemWithPadding * item - itemWithPadding / 2 &&
                scrollX < itemWithPadding * (item + 1) - itemWithPadding / 2) {
            int position = scrollX - itemWithPadding / 2;
            color = getColor(position, item);
        } else if(item == pressedItem) {
            color = textColor.getColorForState(new int[] { android.R.attr.state_pressed }, color);
        }

        return color;

    }

private
int
getTextColor
(
int
item
)
{
int
scrollX
=
getScrollX
(
)
;
// set color of text
int
color
=
textColor
.
getDefaultColor
(
)
;
int
itemWithPadding
=
(
int
)
(
itemWidth
+
dividerSize
)
;
if
(
scrollX
>
itemWithPadding
*
item
itemWithPadding
/
2
&&
scrollX
<
itemWithPadding
*
(
item
+
1
)
itemWithPadding
/
2
)
{
int
position
=
scrollX
itemWithPadding
/
2
;
color
=
getColor
(
position
,
item
)
;
}
else
if
(
item
==
pressedItem
)
{
color
=
textColor
.
getColorForState
(
new
int
[
]
{
android
.
R
.
attr
.
state_pressed
}
,
color
)
;
}
return
color
;
}

Calculates text color for specified item based on its position and state.

@param item Index of item to get text color for
@return Item text color

Calculates text color for specified item based on its position and state .


public void setValues(CharSequence[] values) {

        if (this.values != values) {
            this.values = values;

            if (this.values != null) {
                layouts = new BoringLayout[this.values.length];
                for (int i = 0; i < layouts.length; i++) {
                    layouts[i] = new BoringLayout(this.values[i], textPaint, itemWidth, Layout.Alignment.ALIGN_CENTER,
                            1f, 1f, boringMetrics, false, ellipsize, itemWidth);
                }
            } else {
                layouts = new BoringLayout[0];
            }

            // start marque only if has already been measured
            if (getWidth() > 0) {
                startMarqueeIfNeeded();
            }

            requestLayout();
            invalidate();
        }

    }

Sets values to choose from
@param values New values to choose from