Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "klimatisiert" ) public JAXBElement < Boolean > createKlimatisiert ( Boolean value ) { return new JAXBElement < Boolean > ( _Klimatisiert_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "gartennutzung" ) public JAXBElement < Boolean > createGartennutzung ( Boolean value ) { return new JAXBElement < Boolean > ( _Gartennutzung_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "rollstuhlgerecht" ) public JAXBElement < Boolean > createRollstuhlgerecht ( Boolean value ) { return new JAXBElement < Boolean > ( _Rollstuhlgerecht_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "dvbt" ) public JAXBElement < Boolean > createDvbt ( Boolean value ) { return new JAXBElement < Boolean > ( _Dvbt_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "sauna" ) public JAXBElement < Boolean > createSauna ( Boolean value ) { return new JAXBElement < Boolean > ( _Sauna_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "swimmingpool" ) public JAXBElement < Boolean > createSwimmingpool ( Boolean value ) { return new JAXBElement < Boolean > ( _Swimmingpool_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "wasch_trockenraum" ) public JAXBElement < Boolean > createWaschTrockenraum ( Boolean value ) { return new JAXBElement < Boolean > ( _WaschTrockenraum_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "wintergarten" ) public JAXBElement < Boolean > createWintergarten ( Boolean value ) { return new JAXBElement < Boolean > ( _Wintergarten_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "dv_verkabelung" ) public JAXBElement < Boolean > createDvVerkabelung ( Boolean value ) { return new JAXBElement < Boolean > ( _DvVerkabelung_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "rampe" ) public JAXBElement < Boolean > createRampe ( Boolean value ) { return new JAXBElement < Boolean > ( _Rampe_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "hebebuehne" ) public JAXBElement < Boolean > createHebebuehne ( Boolean value ) { return new JAXBElement < Boolean > ( _Hebebuehne_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "gastterrasse" ) public JAXBElement < Boolean > createGastterrasse ( Boolean value ) { return new JAXBElement < Boolean > ( _Gastterrasse_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "stromanschlusswert" ) public JAXBElement < String > createStromanschlusswert ( String value ) { return new JAXBElement < String > ( _Stromanschlusswert_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "kantine_cafeteria" ) public JAXBElement < Boolean > createKantineCafeteria ( Boolean value ) { return new JAXBElement < Boolean > ( _KantineCafeteria_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "teekueche" ) public JAXBElement < Boolean > createTeekueche ( Boolean value ) { return new JAXBElement < Boolean > ( _Teekueche_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link BigDecimal } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "hallenhoehe" ) @ XmlJavaTypeAdapter ( Adapter2 . class ) public JAXBElement < BigDecimal > createHallenhoehe ( BigDecimal value ) { return new JAXBElement < BigDecimal > ( _Hallenhoehe_QNAME , BigDecimal . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "brauereibindung" ) public JAXBElement < Boolean > createBrauereibindung ( Boolean value ) { return new JAXBElement < Boolean > ( _Brauereibindung_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "sporteinrichtungen" ) public JAXBElement < Boolean > createSporteinrichtungen ( Boolean value ) { return new JAXBElement < Boolean > ( _Sporteinrichtungen_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "telefon_ferienimmobilie" ) public JAXBElement < Boolean > createTelefonFerienimmobilie ( Boolean value ) { return new JAXBElement < Boolean > ( _TelefonFerienimmobilie_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "umts_empfang" ) public JAXBElement < Boolean > createUmtsEmpfang ( Boolean value ) { return new JAXBElement < Boolean > ( _UmtsEmpfang_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "abstellraum" ) public JAXBElement < Boolean > createAbstellraum ( Boolean value ) { return new JAXBElement < Boolean > ( _Abstellraum_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "fahrradraum" ) public JAXBElement < Boolean > createFahrradraum ( Boolean value ) { return new JAXBElement < Boolean > ( _Fahrradraum_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "rolladen" ) public JAXBElement < Boolean > createRolladen ( Boolean value ) { return new JAXBElement < Boolean > ( _Rolladen_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "bibliothek" ) public JAXBElement < Boolean > createBibliothek ( Boolean value ) { return new JAXBElement < Boolean > ( _Bibliothek_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "dachboden" ) public JAXBElement < Boolean > createDachboden ( Boolean value ) { return new JAXBElement < Boolean > ( _Dachboden_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "gaestewc" ) public JAXBElement < Boolean > createGaestewc ( Boolean value ) { return new JAXBElement < Boolean > ( _Gaestewc_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "kabelkanaele" ) public JAXBElement < Boolean > createKabelkanaele ( Boolean value ) { return new JAXBElement < Boolean > ( _Kabelkanaele_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "seniorengerecht" ) public JAXBElement < Boolean > createSeniorengerecht ( Boolean value ) { return new JAXBElement < Boolean > ( _Seniorengerecht_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "letztemodernisierung" ) public JAXBElement < String > createLetztemodernisierung ( String value ) { return new JAXBElement < String > ( _Letztemodernisierung_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "bauzone" ) public JAXBElement < String > createBauzone ( String value ) { return new JAXBElement < String > ( _Bauzone_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "dreizeiler" ) public JAXBElement < String > createDreizeiler ( String value ) { return new JAXBElement < String > ( _Dreizeiler_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "lage" ) public JAXBElement < String > createLage ( String value ) { return new JAXBElement < String > ( _Lage_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "pfad" ) public JAXBElement < String > createPfad ( String value ) { return new JAXBElement < String > ( _Pfad_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "objektadresse_freigeben" ) public JAXBElement < Boolean > createObjektadresseFreigeben ( Boolean value ) { return new JAXBElement < Boolean > ( _ObjektadresseFreigeben_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "anbieternr" ) public JAXBElement < String > createAnbieternr ( String value ) { return new JAXBElement < String > ( _Anbieternr_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "objektnr_intern" ) public JAXBElement < String > createObjektnrIntern ( String value ) { return new JAXBElement < String > ( _ObjektnrIntern_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link BigInteger } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "max_personen" ) @ XmlJavaTypeAdapter ( Adapter6 . class ) public JAXBElement < BigInteger > createMaxPersonen ( BigInteger value ) { return new JAXBElement < BigInteger > ( _MaxPersonen_QNAME , BigInteger . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Boolean } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "nichtraucher" ) public JAXBElement < Boolean > createNichtraucher ( Boolean value ) { return new JAXBElement < Boolean > ( _Nichtraucher_QNAME , Boolean . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "openimmo_obid" ) public JAXBElement < String > createOpenimmoObid ( String value ) { return new JAXBElement < String > ( _OpenimmoObid_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "weitergabe_negativ" ) public JAXBElement < String > createWeitergabeNegativ ( String value ) { return new JAXBElement < String > ( _WeitergabeNegativ_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "weitergabe_positiv" ) public JAXBElement < String > createWeitergabePositiv ( String value ) { return new JAXBElement < String > ( _WeitergabePositiv_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "gruppen_kennung" ) public JAXBElement < String > createGruppenKennung ( String value ) { return new JAXBElement < String > ( _GruppenKennung_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "sprache" ) public JAXBElement < String > createSprache ( String value ) { return new JAXBElement < String > ( _Sprache_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "objektart_zusatz" ) public JAXBElement < String > createObjektartZusatz ( String value ) { return new JAXBElement < String > ( _ObjektartZusatz_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "impressum" ) public JAXBElement < String > createImpressum ( String value ) { return new JAXBElement < String > ( _Impressum_QNAME , String . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link String } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "" , name = "version" ) public JAXBElement < String > createVersion ( String value ) { return new JAXBElement < String > ( _Version_QNAME , String . class , null , value ) ; }


Input: Gets the value of the bodenbelag property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public BodenbelagTyp getBodenbelag ( ) { if ( bodenbelag == null ) { return BodenbelagTyp . KEINE_ANGABE ; } else { return bodenbelag ; } }


Input: Sets the value of the region property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setRegion ( java . lang . String value ) { this . region = value ; }


Input: Sets the value of the area property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setArea ( java . lang . String value ) { this . area = value ; }


Input: Sets the value of the address property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setAddress ( java . lang . String value ) { this . address = value ; }


Input: Sets the value of the description property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setDescription ( java . lang . String value ) { this . description = value ; }


Input: Sets the value of the rentCollectionPeriod property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setRentCollectionPeriod ( OverseasRentalAdType . RentPeriod value ) { this . rentCollectionPeriod = value ; }


Input: Sets the value of the furnished property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setFurnished ( OverseasRentalAdType . Furnished value ) { this . furnished = value ; }


Input: Sets the value of the phone1 property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setPhone1 ( java . lang . String value ) { this . phone1 = value ; }


Input: Sets the value of the phone2 property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setPhone2 ( java . lang . String value ) { this . phone2 = value ; }


Input: Sets the value of the contactName property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setContactName ( java . lang . String value ) { this . contactName = value ; }


Input: Sets the value of the phoneInfo property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setPhoneInfo ( java . lang . String value ) { this . phoneInfo = value ; }


Input: Sets the value of the mainEmail property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setMainEmail ( java . lang . String value ) { this . mainEmail = value ; }


Input: Sets the value of the ccEmail property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setCcEmail ( java . lang . String value ) { this . ccEmail = value ; }


Input: Sets the value of the externalId property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setExternalId ( java . lang . String value ) { this . externalId = value ; }


Input: Sets the value of the agentId property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public void setAgentId ( java . lang . String value ) { this . agentId = value ; }


Input: Start the example application . [CODESPLIT] @ SuppressWarnings ( "Duplicates" ) public static void main ( String [ ] args ) { // init logging PropertyConfigurator . configure ( Is24CsvWritingExample . class . getResource ( PACKAGE + "/log4j.properties" ) ) ; // create some CSV records List < Is24CsvRecord > records = new ArrayList <> ( ) ; records . add ( createHausKaufRecord ( ) ) ; records . add ( createHausKaufRecord ( ) ) ; records . add ( createWohnungMieteRecord ( ) ) ; records . add ( createWohnungMieteRecord ( ) ) ; // write CSV records into a java.io.File try { write ( records , File . createTempFile ( "output-" , ".csv" ) ) ; } catch ( IOException ex ) { LOGGER . error ( "Can't create temporary file!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } // write CSV records into a java.io.OutputStream write ( records , new NullOutputStream ( ) ) ; // write CSV records into a java.io.Writer write ( records , new NullWriter ( ) ) ; // write CSV records into a string and send it to the console writeToConsole ( records ) ; }


Input: Create an { @link HausKauf } with some example data . [CODESPLIT] protected static Is24CsvRecord createHausKaufRecord ( ) { // create an example real estate HausKauf obj = new HausKauf ( ) ; init ( obj ) ; obj . setAnzahlBadezimmer ( RandomUtils . nextInt ( 1 , 5 ) ) ; obj . setAnzahlGarageStellplatz ( RandomUtils . nextInt ( 1 , 5 ) ) ; obj . setAnzahlSchlafzimmer ( RandomUtils . nextInt ( 1 , 5 ) ) ; obj . setAusstattung ( Ausstattung . GEHOBEN ) ; obj . setBarrierefrei ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setBaujahr ( RandomUtils . nextInt ( 1900 , 1990 ) ) ; obj . setBauphase ( Bauphase . FERTIG_GESTELLT ) ; obj . setBefeuerungsart ( Befeuerungsart . KOHLE ) ; obj . setDenkmalschutz ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setEinliegerwohnung ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setEnergieausweisInklWarmwasser ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setEnergieausweisKennwert ( RandomUtils . nextDouble ( 50 , 500 ) ) ; obj . setEnergieausweisTyp ( EnergieausweisTyp . ENERGIEVERBRAUCHSKENNWERT ) ; obj . setFerienhaus ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setGaesteWc ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setGrundstuecksflaeche ( RandomUtils . nextDouble ( 200 , 2000 ) ) ; obj . setHeizungsart ( Heizungsart . ZENTRALHEIZUNG ) ; obj . setKaufpreis ( RandomUtils . nextDouble ( 100000 , 1000000 ) ) ; obj . setKeller ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setMieteinnahmenProMonat ( RandomUtils . nextDouble ( 5000 , 50000 ) ) ; obj . setNutzflaeche ( RandomUtils . nextDouble ( 200 , 1000 ) ) ; obj . setObjektkategorie ( ObjektkategorieHaus . MEHRFAMILIENHAUS ) ; obj . setObjektzustand ( Objektzustand . GEPFLEGT ) ; obj . setSanierungsjahr ( RandomUtils . nextInt ( 1990 , 2010 ) ) ; obj . setStellplatz ( Stellplatz . CARPORT ) ; obj . setStellplatzpreis ( RandomUtils . nextDouble ( 1000 , 5000 ) ) ; obj . setVerfuegbarAb ( "notes about availability" ) ; obj . setVermietet ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setWohnflaeche ( RandomUtils . nextDouble ( 100 , 500 ) ) ; obj . setZimmer ( RandomUtils . nextInt ( 1 , 10 ) ) ; return obj ; }


Input: Create an { @link WohnungMiete } with some example data . [CODESPLIT] protected static Is24CsvRecord createWohnungMieteRecord ( ) { // create an example real estate WohnungMiete obj = new WohnungMiete ( ) ; init ( obj ) ; obj . setAnzahlBadezimmer ( RandomUtils . nextInt ( 1 , 5 ) ) ; obj . setAnzahlGarageStellplatz ( RandomUtils . nextInt ( 1 , 5 ) ) ; obj . setAnzahlSchlafzimmer ( RandomUtils . nextInt ( 1 , 5 ) ) ; obj . setAufzug ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setAusstattung ( Ausstattung . GEHOBEN ) ; obj . setBalkonTerrasse ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setBarrierefrei ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setBaujahr ( RandomUtils . nextInt ( 1900 , 1990 ) ) ; obj . setBefeuerungsart ( Befeuerungsart . OEL ) ; obj . setEinbaukueche ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setEnergieausweisInklWarmwasser ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setEnergieausweisKennwert ( RandomUtils . nextDouble ( 50 , 500 ) ) ; obj . setEnergieausweisTyp ( EnergieausweisTyp . ENERGIEVERBRAUCHSKENNWERT ) ; obj . setEtage ( RandomUtils . nextInt ( 0 , 10 ) ) ; obj . setEtagenzahl ( RandomUtils . nextInt ( 0 , 10 ) ) ; obj . setFoerderung ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setGaesteWc ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setGartennutzung ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setHaustiere ( Auswahl . NACH_VEREINBARUNG ) ; obj . setHeizkosten ( RandomUtils . nextDouble ( 100 , 500 ) ) ; obj . setHeizungsart ( Heizungsart . OFENHEIZUNG ) ; obj . setKaltmiete ( RandomUtils . nextDouble ( 500 , 3000 ) ) ; obj . setKaution ( "notes about deposit" ) ; obj . setKeller ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setNebenkosten ( RandomUtils . nextDouble ( 100 , 500 ) ) ; obj . setNebenkostenInklHeizkosten ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setNutzflaeche ( RandomUtils . nextDouble ( 50 , 500 ) ) ; obj . setObjektkategorie ( ObjektkategorieWohnung . PENTHOUSE ) ; obj . setObjektzustand ( Objektzustand . MODERNISIERT ) ; obj . setSanierungsjahr ( RandomUtils . nextInt ( 1990 , 2010 ) ) ; obj . setSeniorengerecht ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setStellplatz ( Stellplatz . TIEFGARAGE ) ; obj . setStellplatzmiete ( RandomUtils . nextDouble ( 50 , 500 ) ) ; obj . setVerfuegbarAb ( "notes about availability" ) ; obj . setWarmmiete ( RandomUtils . nextDouble ( 500 , 2000 ) ) ; obj . setWohnflaeche ( RandomUtils . nextDouble ( 50 , 250 ) ) ; obj . setZimmer ( RandomUtils . nextInt ( 1 , 10 ) ) ; return obj ; }


Input: Init common values of an { @link Is24CsvRecord } . [CODESPLIT] protected static void init ( Is24CsvRecord obj ) { obj . setAdressdruck ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setAktiv ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setAnbieterObjektId ( RandomStringUtils . random ( 5 ) ) ; obj . setBeschreibungAusstattung ( "description about features" ) ; obj . setBeschreibungLage ( "description about location" ) ; obj . setBeschreibungObjekt ( "description about object" ) ; obj . setBeschreibungSonstiges ( "further descriptions" ) ; obj . setGruppierungId ( RandomUtils . nextInt ( 0 , 1000 ) ) ; obj . setImportmodus ( Importmodus . IMPORTIEREN ) ; obj . setInternationaleRegion ( "name of international region" ) ; obj . setKontaktAnrede ( "Mr" ) ; obj . setKontaktEmail ( "tester@test.org" ) ; obj . setKontaktHausNr ( "123" ) ; obj . setKontaktLand ( "DEU" ) ; obj . setKontaktMobiltelefon ( "030/123456" ) ; obj . setKontaktNachname ( "Mustermann" ) ; obj . setKontaktOrt ( "Berlin" ) ; obj . setKontaktPlz ( "12345" ) ; obj . setKontaktStrasse ( "example street" ) ; obj . setKontaktTelefax ( "030/123457" ) ; obj . setKontaktTelefon ( "030/123458" ) ; obj . setKontaktVorname ( "Max" ) ; obj . setKontaktWebseite ( "http://www.test.org/" ) ; obj . setObjektHausNr ( "124" ) ; obj . setObjektLand ( "DEU" ) ; obj . setObjektOrt ( "Berlin" ) ; obj . setObjektPlz ( "12345" ) ; obj . setObjektStrasse ( "example street" ) ; obj . setProvision ( "commission" ) ; obj . setProvisionpflichtig ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setProvisionshinweis ( "notes about commission" ) ; obj . setScoutKundenId ( RandomStringUtils . random ( 5 ) ) ; obj . setScoutObjektId ( RandomStringUtils . random ( 5 ) ) ; obj . setUeberschrift ( "a nice title for the object" ) ; obj . setWaehrung ( Currency . getInstance ( "EUR" ) ) ; obj . setDatei1 ( new Datei ( "test1.jpg" , DateiTyp . BILD , DateiSuffix . JPG , "a nice image" ) ) ; obj . setDatei2 ( new Datei ( "test2.png" , DateiTyp . BILD , DateiSuffix . PNG , "another nice image" ) ) ; obj . setDatei3 ( new Datei ( "test3.pdf" , DateiTyp . GRUNDRISS_PDF , DateiSuffix . PDF , "a document with groundplan" ) ) ; obj . setDatei4 ( new Datei ( "http://www.test.org/" , DateiTyp . LINK , null , "agency website" ) ) ; }


Input: Write some { @link Is24CsvRecord } objects into an { @link OutputStream } . [CODESPLIT] protected static void write ( List < Is24CsvRecord > records , OutputStream output ) { LOGGER . info ( "writing document" ) ; try { Is24CsvPrinter printer = Is24CsvPrinter . create ( output ) ; printer . printRecords ( records ) ; LOGGER . info ( "> written to a java.io.OutputStream" ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't write document into an OutputStream!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } }


Input: Write some { @link Is24CsvRecord } objects into a { @link String } and print the results to the console . [CODESPLIT] protected static void writeToConsole ( List < Is24CsvRecord > records ) { LOGGER . info ( "writing document" ) ; StringBuilder csv = new StringBuilder ( ) ; try ( Is24CsvPrinter printer = Is24CsvPrinter . create ( csv ) ) { printer . printRecords ( records ) ; LOGGER . info ( StringUtils . repeat ( "-" , 50 ) + System . lineSeparator ( ) + csv . toString ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't write document into a string!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } }


Input: Sets the value of the epart property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setEpart ( Energiepass . Epart value ) { this . epart = value ; }


Input: Sets the value of the jahrgang property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setJahrgang ( Energiepass . Jahrgang value ) { this . jahrgang = value ; }


Input: Sets the value of the gebaeudeart property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setGebaeudeart ( Energiepass . Gebaeudeart value ) { this . gebaeudeart = value ; }


Input: Sets the value of the bueroTyp property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setBueroTyp ( BueroPraxen . BueroTyp value ) { this . bueroTyp = value ; }


Input: Test if a string contains a parsable number . [CODESPLIT] public static boolean isNumeric ( String value , Locale locale ) { if ( value == null ) return false ; int start = 0 ; final DecimalFormatSymbols symbols = ( locale != null ) ? DecimalFormatSymbols . getInstance ( locale ) : DecimalFormatSymbols . getInstance ( ) ; if ( value . startsWith ( "+" ) || value . startsWith ( "-" ) ) start ++ ; boolean fraction = false ; for ( int i = start ; i < value . length ( ) ; i ++ ) { final char c = value . charAt ( i ) ; if ( c == symbols . getDecimalSeparator ( ) && ! fraction ) { fraction = true ; continue ; } if ( c == symbols . getGroupingSeparator ( ) && ! fraction ) { continue ; } if ( ! Character . isDigit ( c ) ) { return false ; } } return true ; }


Input: Convert a string value into a number . [CODESPLIT] public static Number parseNumber ( String value , Locale ... locales ) throws NumberFormatException { return parseNumber ( value , false , locales ) ; }


Input: Convert a string value into a number . [CODESPLIT] public static Number parseNumber ( String value , boolean integerOnly , Locale ... locales ) throws NumberFormatException { value = StringUtils . trimToNull ( value ) ; if ( value == null ) return null ; // ignore leading plus sign if ( value . startsWith ( "+" ) ) value = StringUtils . trimToNull ( value . substring ( 1 ) ) ; // remove any spaces value = StringUtils . replace ( value , StringUtils . SPACE , StringUtils . EMPTY ) ; if ( ArrayUtils . isEmpty ( locales ) ) locales = new Locale [ ] { Locale . getDefault ( ) } ; for ( Locale locale : locales ) { // check, if the value is completely numeric for the locale if ( ! isNumeric ( value , locale ) ) continue ; NumberFormat format = NumberFormat . getNumberInstance ( locale ) ; try { format . setMinimumFractionDigits ( 0 ) ; format . setParseIntegerOnly ( integerOnly ) ; format . setGroupingUsed ( value . indexOf ( DecimalFormatSymbols . getInstance ( locale ) . getGroupingSeparator ( ) ) > - 1 ) ; return format . parse ( value ) ; } catch ( ParseException ex ) { } } throw new NumberFormatException ( "The provided value '" + value + "' is not numeric!" ) ; }


Input: Write a number into a string value . [CODESPLIT] public static String printNumber ( Number value , int integerDigits , int fractionDigits ) { return printNumber ( value , integerDigits , fractionDigits , null ) ; }


Input: Write a number into a string value . [CODESPLIT] public static String printNumber ( Number value , int integerDigits , int fractionDigits , Locale locale ) { if ( value == null ) return null ; NumberFormat format = NumberFormat . getNumberInstance ( ( locale != null ) ? locale : Locale . ENGLISH ) ; format . setMaximumIntegerDigits ( integerDigits ) ; format . setMaximumFractionDigits ( fractionDigits ) ; format . setMinimumFractionDigits ( 0 ) ; format . setGroupingUsed ( false ) ; return format . format ( value ) ; }


Input: Sets the value of the gebiete property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setGebiete ( LageGebiet . Gebiete value ) { this . gebiete = value ; }


Input: Creates a { @link FilemakerResultDocument } from a { @link FMPXMLRESULT } object . [CODESPLIT] public static FilemakerResultDocument newDocument ( FMPXMLRESULT xmlResult ) throws ParserConfigurationException , JAXBException { Document document = XmlUtils . newDocument ( ) ; FilemakerUtils . createMarshaller ( "UTF-8" , true ) . marshal ( xmlResult , document ) ; return new FilemakerResultDocument ( document ) ; }


Input: Creates a { @link Is24XmlDocument } from a { @link Document } . [CODESPLIT] public static Is24XmlDocument createDocument ( Document doc ) { if ( Is24XmlDocument . isReadable ( doc ) ) return new Is24XmlDocument ( doc ) ; else return null ; }


Input: Creates a { @link Marshaller } to write JAXB objects into XML . [CODESPLIT] @ SuppressWarnings ( "Duplicates" ) public static Marshaller createMarshaller ( String encoding , boolean formatted ) throws JAXBException { Marshaller m = getContext ( ) . createMarshaller ( ) ; m . setProperty ( Marshaller . JAXB_ENCODING , encoding ) ; m . setProperty ( Marshaller . JAXB_FORMATTED_OUTPUT , formatted ) ; m . setEventHandler ( new XmlValidationHandler ( ) ) ; return m ; }


Input: Creates a { @link Unmarshaller } to read JAXB objects from XML . [CODESPLIT] public static Unmarshaller createUnmarshaller ( ) throws JAXBException { Unmarshaller m = getContext ( ) . createUnmarshaller ( ) ; m . setEventHandler ( new XmlValidationHandler ( ) ) ; return m ; }


Input: Returns the { @link JAXBContext } for this format . [CODESPLIT] public synchronized static JAXBContext getContext ( ) throws JAXBException { if ( JAXB == null ) initContext ( Thread . currentThread ( ) . getContextClassLoader ( ) ) ; return JAXB ; }


Input: Sets the value of the location property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setLocation ( Anhang . Location value ) { this . location = value ; }


Input: Sets the value of the gruppe property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setGruppe ( Anhang . Gruppe value ) { this . gruppe = value ; }


Input: Sets the value of the type property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:48:12+02:00" , comments = "JAXB RI v2.2.11" ) public void setType ( Floor . FloorType value ) { this . type = value ; }


Input: Sets the value of the agent property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T01:43:04+02:00" , comments = "JAXB RI v2.2.11" ) public void setAgent ( Root . Agent value ) { this . agent = value ; }


Input: Gets the value of the property property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T01:43:04+02:00" , comments = "JAXB RI v2.2.11" ) public List < PropertyType > getProperty ( ) { if ( property == null ) { property = new ArrayList < PropertyType > ( ) ; } return this . property ; }


Input: Read a { @link File } into a { @link DaftIeDocument } and print some of its content to console . [CODESPLIT] protected static void read ( File xmlFile ) throws SAXException , IOException , ParserConfigurationException , JAXBException { LOGGER . info ( "process file: " + xmlFile . getAbsolutePath ( ) ) ; if ( ! xmlFile . isFile ( ) ) { LOGGER . warn ( "> provided file is invalid" ) ; return ; } DaftIeDocument doc = DaftIeUtils . createDocument ( xmlFile ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else { printToConsole ( doc ) ; } }


Input: Read a { @link InputStream } into an { @link DaftIeDocument } and print some of its content to console . [CODESPLIT] protected static void read ( InputStream xmlInputStream ) throws SAXException , IOException , ParserConfigurationException , JAXBException { LOGGER . info ( "process example file" ) ; DaftIeDocument doc = DaftIeUtils . createDocument ( xmlInputStream ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else { printToConsole ( doc ) ; } }


Input: Print some content of a { @link DaftIeDocument } to console . [CODESPLIT] protected static void printToConsole ( DaftIeDocument doc ) throws JAXBException { LOGGER . info ( "> process document in version " + doc . getDocumentVersion ( ) ) ; Daft daft = doc . toObject ( ) ; // process overseas rental if ( daft . getOverseasRental ( ) != null ) { for ( OverseasRentalAdType ad : daft . getOverseasRental ( ) . getOverseasRentalAd ( ) ) { // get object nr String objectNr = StringUtils . trimToNull ( ad . getExternalId ( ) ) ; if ( objectNr == null ) objectNr = "???" ; // get object description String objectInfo = StringUtils . trimToNull ( ad . getDescription ( ) ) ; if ( objectInfo == null ) objectInfo = "???" ; // print object information to console LOGGER . info ( "> found object " + "'" + objectNr + "' for rent: " + objectInfo ) ; } } // process overseas sales if ( daft . getOverseasSales ( ) != null ) { for ( OverseasSaleAdType ad : daft . getOverseasSales ( ) . getOverseasSaleAd ( ) ) { // get object nr String objectNr = StringUtils . trimToNull ( ad . getExternalId ( ) ) ; if ( objectNr == null ) objectNr = "???" ; // get object description String objectInfo = StringUtils . trimToNull ( ad . getDescription ( ) ) ; if ( objectInfo == null ) objectInfo = "???" ; // print object information to console LOGGER . info ( "> found object " + "'" + objectNr + "' for sale: " + objectInfo ) ; } } }


Input: Sets the value of the stand property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setStand ( Verkaufstatus . Stand value ) { this . stand = value ; }


Input: Gets the value of the userDefinedExtend property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < UserDefinedExtend > getUserDefinedExtend ( ) { if ( userDefinedExtend == null ) { userDefinedExtend = new ArrayList < UserDefinedExtend > ( ) ; } return this . userDefinedExtend ; }


Input: Checks if a { @link Document } is readable as a { @link OpenImmoTransferDocument } . [CODESPLIT] public static boolean isReadable ( Document doc ) { Element root = XmlUtils . getRootElement ( doc ) ; return "openimmo" . equals ( root . getLocalName ( ) ) ; }


Input: Creates a { @link OpenImmoTransferDocument } from a { @link Openimmo } object . [CODESPLIT] public static OpenImmoTransferDocument newDocument ( Openimmo openimmo ) throws ParserConfigurationException , JAXBException { if ( openimmo . getUebertragung ( ) == null ) openimmo . setUebertragung ( OpenImmoUtils . getFactory ( ) . createUebertragung ( ) ) ; if ( StringUtils . isBlank ( openimmo . getUebertragung ( ) . getVersion ( ) ) ) openimmo . getUebertragung ( ) . setVersion ( OpenImmoUtils . VERSION . toReadableVersion ( ) ) ; Document document = XmlUtils . newDocument ( ) ; OpenImmoUtils . createMarshaller ( "UTF-8" , true ) . marshal ( openimmo , document ) ; return new OpenImmoTransferDocument ( document ) ; }


Input: Creates a { @link Openimmo } object from the contained { @link Document } . [CODESPLIT] @ Override public Openimmo toObject ( ) throws JAXBException { this . upgradeToLatestVersion ( ) ; return ( Openimmo ) OpenImmoUtils . createUnmarshaller ( ) . unmarshal ( this . getDocument ( ) ) ; }


Input: Sets the value of the zeiteinheit property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setZeiteinheit ( PreisZeiteinheit . Zeiteinheit value ) { this . zeiteinheit = value ; }


Input: Gets the value of the zimmer property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < Zimmer > getZimmer ( ) { if ( zimmer == null ) { zimmer = new ArrayList < Zimmer > ( ) ; } return this . zimmer ; }


Input: Gets the value of the haus property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < Haus > getHaus ( ) { if ( haus == null ) { haus = new ArrayList < Haus > ( ) ; } return this . haus ; }


Input: Gets the value of the bueroPraxen property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < BueroPraxen > getBueroPraxen ( ) { if ( bueroPraxen == null ) { bueroPraxen = new ArrayList < BueroPraxen > ( ) ; } return this . bueroPraxen ; }


Input: Gets the value of the gastgewerbe property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < Gastgewerbe > getGastgewerbe ( ) { if ( gastgewerbe == null ) { gastgewerbe = new ArrayList < Gastgewerbe > ( ) ; } return this . gastgewerbe ; }


Input: Gets the value of the landUndForstwirtschaft property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < LandUndForstwirtschaft > getLandUndForstwirtschaft ( ) { if ( landUndForstwirtschaft == null ) { landUndForstwirtschaft = new ArrayList < LandUndForstwirtschaft > ( ) ; } return this . landUndForstwirtschaft ; }


Input: Gets the value of the sonstige property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < Sonstige > getSonstige ( ) { if ( sonstige == null ) { sonstige = new ArrayList < Sonstige > ( ) ; } return this . sonstige ; }


Input: Gets the value of the zinshausRenditeobjekt property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < ZinshausRenditeobjekt > getZinshausRenditeobjekt ( ) { if ( zinshausRenditeobjekt == null ) { zinshausRenditeobjekt = new ArrayList < ZinshausRenditeobjekt > ( ) ; } return this . zinshausRenditeobjekt ; }


Input: Gets the value of the terrain property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:48:12+02:00" , comments = "JAXB RI v2.2.11" ) public List < TerrainType > getTerrain ( ) { if ( terrain == null ) { terrain = new ArrayList < TerrainType > ( ) ; } return this . terrain ; }


Input: Sets the value of the periode property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setPeriode ( MieteinnahmenIst . Periode value ) { this . periode = value ; }


Input: Downgrade &lt ; jahrgang&gt ; elements in &lt ; energiepass&gt ; to OpenImmo 1 . 2 . 7 . <p > The value bei_besichtigung of &lt ; jahrgang&gt ; elements in &lt ; energiepass&gt ; is not available in OpenImmo 1 . 2 . 7 . [CODESPLIT] protected void downgradeEnergiepassJahrgangElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben/io:energiepass/io:jahrgang" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; String value = StringUtils . trimToNull ( node . getTextContent ( ) ) ; if ( value == null || value . equalsIgnoreCase ( "bei_besichtigung" ) ) { Element parentNode = ( Element ) node . getParentNode ( ) ; parentNode . removeChild ( node ) ; } } }


Input: Creates a { @link CasaItDocument } from a { @link Container } object . [CODESPLIT] public static CasaItDocument newDocument ( Container container ) throws ParserConfigurationException , JAXBException { Document document = XmlUtils . newDocument ( ) ; CasaItUtils . createMarshaller ( "UTF-8" , true ) . marshal ( container , document ) ; return new CasaItDocument ( document ) ; }


Input: Sets the value of the umfang property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setUmfang ( Uebertragung . Umfang value ) { this . umfang = value ; }


Input: Creates a { @link DaftIeDocument } from a { @link Daft } object . [CODESPLIT] public static DaftIeDocument newDocument ( Daft daft ) throws ParserConfigurationException , JAXBException { if ( StringUtils . isBlank ( daft . getVersion ( ) ) ) daft . setVersion ( DaftIeUtils . VERSION . toReadableVersion ( ) ) ; Document document = XmlUtils . newDocument ( ) ; DaftIeUtils . createMarshaller ( "UTF-8" , true ) . marshal ( daft , document ) ; return new DaftIeDocument ( document ) ; }


Input: Creates a { @link Daft } object from the contained { @link Document } . [CODESPLIT] @ Override public Daft toObject ( ) throws JAXBException { this . upgradeToLatestVersion ( ) ; return ( Daft ) DaftIeUtils . createUnmarshaller ( ) . unmarshal ( this . getDocument ( ) ) ; }


Input: Sets the value of the wohnungtyp property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setWohnungtyp ( Wohnung . Wohnungtyp value ) { this . wohnungtyp = value ; }


Input: Return an ISO - 2 country code from a country name . [CODESPLIT] public static String getCountryISO2 ( String country ) { country = StringUtils . trimToNull ( country ) ; if ( country == null ) return null ; if ( country . length ( ) == 2 ) return country ; String [ ] iso2Codes = Locale . getISOCountries ( ) ; if ( country . length ( ) == 3 ) { String iso2Code = LocaleUtils . getCountryISO2FromISO3 ( country ) ; if ( iso2Code != null ) return iso2Code ; } for ( String iso2Code : iso2Codes ) { Locale countryLocale = new Locale ( iso2Code , iso2Code ) ; for ( Locale translationLocale : LocaleUtils . availableLocaleList ( ) ) { String name = StringUtils . trimToNull ( countryLocale . getDisplayCountry ( translationLocale ) ) ; if ( name != null && name . equalsIgnoreCase ( country ) ) return iso2Code ; } } return null ; }


Input: Create an ISO - 2 country code from an ISO - 3 country code . [CODESPLIT] public static String getCountryISO2FromISO3 ( String iso3Code ) { iso3Code = StringUtils . trimToNull ( iso3Code ) ; if ( iso3Code == null ) return null ; if ( iso3Code . length ( ) == 3 ) { for ( String iso2Code : Locale . getISOCountries ( ) ) { Locale countryLocale = new Locale ( iso2Code , iso2Code ) ; String countryISO3 = StringUtils . trimToNull ( countryLocale . getISO3Country ( ) ) ; if ( countryISO3 != null && countryISO3 . equalsIgnoreCase ( iso3Code ) ) { return iso2Code ; } } } return null ; }


Input: Return an ISO - 3 country code from a country name . [CODESPLIT] public static String getCountryISO3 ( String country ) { country = StringUtils . trimToNull ( country ) ; if ( country == null ) return null ; if ( country . length ( ) == 3 ) return country ; String [ ] iso2Codes = Locale . getISOCountries ( ) ; if ( country . length ( ) == 2 ) { String iso3code = LocaleUtils . getCountryISO3FromISO2 ( country ) ; if ( iso3code != null ) return iso3code ; } for ( String iso2Code : iso2Codes ) { Locale countryLocale = new Locale ( iso2Code , iso2Code ) ; String iso3Code = StringUtils . trimToNull ( countryLocale . getISO3Country ( ) ) ; if ( iso3Code == null ) continue ; for ( Locale translationLocale : LocaleUtils . availableLocaleList ( ) ) { String name = StringUtils . trimToNull ( countryLocale . getDisplayCountry ( translationLocale ) ) ; if ( name != null && name . equalsIgnoreCase ( country ) ) return iso3Code ; } } return null ; }


Input: Create an ISO - 3 country code from an ISO - 2 country code . [CODESPLIT] public static String getCountryISO3FromISO2 ( String iso2Code ) { iso2Code = StringUtils . trimToNull ( iso2Code ) ; if ( iso2Code == null ) return null ; if ( iso2Code . length ( ) == 2 ) { Locale countryLocale = new Locale ( iso2Code , iso2Code ) ; String iso3Code = StringUtils . trimToNull ( countryLocale . getISO3Country ( ) ) ; if ( iso3Code != null ) return iso3Code ; } return null ; }


Input: Return a country name in another language . [CODESPLIT] public static String getCountryName ( String country , Locale language ) { country = StringUtils . trimToNull ( country ) ; if ( country == null ) return null ; String iso2Code = LocaleUtils . getCountryISO2 ( country ) ; if ( iso2Code != null ) { String name = StringUtils . trimToNull ( new Locale ( iso2Code , iso2Code ) . getDisplayCountry ( language ) ) ; if ( name != null ) return name ; } return null ; }


Input: Translate a country name into another language . [CODESPLIT] public static String translateCountryName ( String country , Locale language ) { country = StringUtils . trimToNull ( country ) ; if ( country == null ) return null ; for ( String iso2Code : Locale . getISOCountries ( ) ) { Locale countryLocale = new Locale ( iso2Code , iso2Code ) ; for ( Locale translationLocale : LocaleUtils . availableLocaleList ( ) ) { String name = StringUtils . trimToNull ( countryLocale . getDisplayCountry ( translationLocale ) ) ; if ( name != null && name . equalsIgnoreCase ( country ) ) { name = StringUtils . trimToNull ( countryLocale . getDisplayCountry ( language ) ) ; if ( name != null ) return name ; } } } return null ; }


Input: Gets the value of the anbieter property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < Anbieter > getAnbieter ( ) { if ( anbieter == null ) { anbieter = new ArrayList < Anbieter > ( ) ; } return this . anbieter ; }


Input: Sets the value of the periode property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setPeriode ( MieteinnahmenSoll . Periode value ) { this . periode = value ; }


Input: Sets the value of the category property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:48:12+02:00" , comments = "JAXB RI v2.2.11" ) public void setCategory ( BusinessElement . BusinessElementCategory value ) { this . category = value ; }


Input: Gets the value of the pdf property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:42+02:00" , comments = "JAXB RI v2.2.11" ) public List < URI > getPdf ( ) { if ( pdf == null ) { pdf = new ArrayList < URI > ( ) ; } return this . pdf ; }


Input: Sets the value of the aktionart property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setAktionart ( Aktion . AktionArt value ) { this . aktionart = value ; }


Input: Start the example application . [CODESPLIT] @ SuppressWarnings ( "Duplicates" ) public static void main ( String [ ] args ) { // init logging PropertyConfigurator . configure ( IdxReadingExample . class . getResource ( PACKAGE + "/log4j.properties" ) ) ; // read example file, if no files were specified as command line arguments if ( args . length < 1 ) { try { read ( IdxReadingExample . class . getResourceAsStream ( PACKAGE + "/idx.csv" ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't read example file!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 2 ) ; } } // read files, that were specified as command line arguments else { for ( String arg : args ) { try { read ( new File ( arg ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't read file '" + arg + "'!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 2 ) ; } } } }


Input: Read a { @link File } into an { @link IdxParser } and print some of its content to console . [CODESPLIT] protected static void read ( File csvFile ) throws IOException { LOGGER . info ( "process file: " + csvFile . getAbsolutePath ( ) ) ; if ( ! csvFile . isFile ( ) ) { LOGGER . warn ( "> The provided file is invalid!" ) ; return ; } try ( IdxParser parser = IdxParser . create ( csvFile ) ) { if ( parser == null ) LOGGER . warn ( "> Can't create parser!" ) ; else printToConsole ( parser ) ; } }


Input: Read an { @link InputStream } into an { @link IdxParser } and print some of its content to console . [CODESPLIT] protected static void read ( InputStream csvInputStream ) throws IOException { LOGGER . info ( "process example file" ) ; try ( IdxParser parser = IdxParser . create ( csvInputStream ) ) { if ( parser == null ) LOGGER . warn ( "> Can't create parser!" ) ; else printToConsole ( parser ) ; } }


Input: Print some content of an { @link IdxParser } to console . [CODESPLIT] protected static void printToConsole ( IdxParser parser ) { // process records while ( parser . hasNext ( ) ) { IdxRecord record = parser . next ( ) ; // get object nr String objectNr = record . getRefObject ( ) ; if ( objectNr == null ) objectNr = "???" ; // get object title String objectTitle = record . getObjectTitle ( ) ; if ( objectTitle == null ) objectTitle = "???" ; // print object information to console System . out . println ( "> found object '" + objectNr + "' " + "with title '" + objectTitle + "'" ) ; } }


Input: Sets the value of the realestateitems property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:41:02+02:00" , comments = "JAXB RI v2.2.11" ) public void setRealestateitems ( Container . Realestateitems value ) { this . realestateitems = value ; }


Input: Sets the value of the pacht property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public void setPacht ( JAXBElement < VermarktungGrundstueckWohnenMieteTyp . Pacht > value ) { this . pacht = value ; }


Input: Gets the value of the objektkategorie2 property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public HalleProduktionKategorieTyp getObjektkategorie2 ( ) { if ( objektkategorie2 == null ) { return HalleProduktionKategorieTyp . KEINE_ANGABE ; } else { return objektkategorie2 ; } }


Input: Start the example application . [CODESPLIT] @ SuppressWarnings ( "Duplicates" ) public static void main ( String [ ] args ) { // init logging PropertyConfigurator . configure ( ImmoXmlWritingExample . class . getResource ( PACKAGE + "/log4j.properties" ) ) ; // create an Immoxml object with some example data // this object corresponds to the <immoxml> root element in XML Immoxml immoxml = FACTORY . createImmoxml ( ) ; immoxml . setUebertragung ( createUebertragung ( ) ) ; immoxml . getAnbieter ( ) . add ( createAnbieter ( ) ) ; // convert the Immoxml object into a XML document ImmoXmlDocument doc = null ; try { doc = ImmoXmlDocument . newDocument ( immoxml ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't create XML document!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } // write XML document into a java.io.File try { write ( doc , File . createTempFile ( "output-" , ".xml" ) ) ; } catch ( IOException ex ) { LOGGER . error ( "Can't create temporary file!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } // write XML document into a java.io.OutputStream write ( doc , new NullOutputStream ( ) ) ; // write XML document into a java.io.Writer write ( doc , new NullWriter ( ) ) ; // write XML document into a string and send it to the console writeToConsole ( doc ) ; }


Input: Create an { @link Uebertragung } with some example data . [CODESPLIT] protected static Uebertragung createUebertragung ( ) { // create an example transfer Uebertragung uebertragung = FACTORY . createUebertragung ( ) ; uebertragung . setArt ( Uebertragung . Art . OFFLINE ) ; uebertragung . setSendersoftware ( "OpenEstate-IO" ) ; uebertragung . setTechnEmail ( "test@test.org" ) ; uebertragung . setUmfang ( Uebertragung . Umfang . VOLL ) ; return uebertragung ; }


Input: Downgrade an OpenImmo document from version 1 . 2 . 7 to 1 . 2 . 6 . [CODESPLIT] @ Override public void downgradeToPreviousVersion ( OpenImmoDocument doc ) { doc . setDocumentVersion ( OpenImmoVersion . V1_2_6 ) ; if ( doc instanceof OpenImmoTransferDocument ) { try { this . removeMultipleEnergiepassElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove odd <energiepass> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeObjektTextElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported <objekt_text> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeSummemietenettoElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <summemietenetto> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeBefeuerungElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <befeuerung> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeAnhangElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <anhang> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeAktionElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <aktion> 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 ) ; } } }


Input: Upgrade an OpenImmo document from version 1 . 2 . 6 to 1 . 2 . 7 . [CODESPLIT] @ Override public void upgradeFromPreviousVersion ( OpenImmoDocument doc ) { doc . setDocumentVersion ( OpenImmoVersion . V1_2_7 ) ; if ( doc instanceof OpenImmoTransferDocument ) { try { this . upgradeSummemietenettoElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't upgrade <summemietenetto> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . upgradeEnergiepassElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't upgrade <energiepass> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } } }


Input: Downgrade &lt ; befeuerung&gt ; elements to OpenImmo 1 . 2 . 6 . <p > The attributes KOHLE HOLZ FLUESSIGGAS of &lt ; befeuerung&gt ; elements are not available in OpenImmo 1 . 2 . 6 . [CODESPLIT] protected void downgradeBefeuerungElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:ausstattung/io:befeuerung[@KOHLE or @HOLZ or @FLUESSIGGAS]" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; node . removeAttribute ( "KOHLE" ) ; node . removeAttribute ( "HOLZ" ) ; node . removeAttribute ( "FLUESSIGGAS" ) ; } }


Input: Downgrade &lt ; energiepass&gt ; elements to OpenImmo 1 . 2 . 6 . <p > The child elements &lt ; stromwert&gt ; &lt ; waermewert&gt ; &lt ; wertklasse&gt ; &lt ; baujahr&gt ; &lt ; ausstelldatum&gt ; &lt ; jahrgang&gt ; &lt ; gebaeudeart&gt ; are copied into separate &lt ; user_defined_simplefield&gt ; elements as it was <a href = http : // www . openimmo . de / go . php / p / 44 / cm_enev2014 . htm > suggested by OpenImmo e . V . < / a > . <p > The child elements &lt ; primaerenergietraeger&gt ; &lt ; epasstext&gt ; are not available in OpenImmo 1 . 2 . 6 . [CODESPLIT] protected void downgradeEnergiepassElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben/io:energiepass" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) ; boolean stromwertPassed = false ; boolean waermewertPassed = false ; boolean wertklassePassed = false ; boolean baujahrPassed = false ; boolean ausstelldatumPassed = false ; boolean jahrgangPassed = false ; boolean gebaeudeartPassed = false ; List childNodes ; // <primaerenergietraeger> elements are not supported in version 1.2.6 childNodes = XmlUtils . newXPath ( "io:primaerenergietraeger" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Node childNode = ( Node ) childItem ; node . removeChild ( childNode ) ; } // <epasstext> elements are not supported in version 1.2.6 childNodes = XmlUtils . newXPath ( "io:epasstext" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Node childNode = ( Node ) childItem ; node . removeChild ( childNode ) ; } // create a <user_defined_simplefield> for <stromwert> elements childNodes = XmlUtils . newXPath ( "io:stromwert" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Node childNode = ( Node ) childItem ; if ( ! stromwertPassed ) { String value = StringUtils . trimToNull ( childNode . getTextContent ( ) ) ; if ( value != null ) { parentNode . appendChild ( OpenImmoUtils . createUserDefinedSimplefield ( doc , "epass_stromwert" , value ) ) ; stromwertPassed = true ; } } node . removeChild ( childNode ) ; } // create a <user_defined_simplefield> for <waermewert> elements childNodes = XmlUtils . newXPath ( "io:waermewert" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Node childNode = ( Node ) childItem ; if ( ! waermewertPassed ) { String value = StringUtils . trimToNull ( childNode . getTextContent ( ) ) ; if ( value != null ) { parentNode . appendChild ( OpenImmoUtils . createUserDefinedSimplefield ( doc , "epass_waermewert" , value ) ) ; waermewertPassed = true ; } } node . removeChild ( childNode ) ; } // create a <user_defined_simplefield> for <wertklasse> elements childNodes = XmlUtils . newXPath ( "io:wertklasse" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Node childNode = ( Node ) childItem ; if ( ! wertklassePassed ) { String value = StringUtils . trimToNull ( childNode . getTextContent ( ) ) ; if ( value != null ) { parentNode . appendChild ( OpenImmoUtils . createUserDefinedSimplefield ( doc , "epass_wertklasse" , value ) ) ; wertklassePassed = true ; } } node . removeChild ( childNode ) ; } // create a <user_defined_simplefield> for <baujahr> elements childNodes = XmlUtils . newXPath ( "io:baujahr" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Node childNode = ( Node ) childItem ; if ( ! baujahrPassed ) { String value = StringUtils . trimToNull ( childNode . getTextContent ( ) ) ; if ( value != null ) { parentNode . appendChild ( OpenImmoUtils . createUserDefinedSimplefield ( doc , "epass_baujahr" , value ) ) ; baujahrPassed = true ; } } node . removeChild ( childNode ) ; } // create a <user_defined_simplefield> for <ausstelldatum> elements childNodes = XmlUtils . newXPath ( "io:ausstelldatum" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Node childNode = ( Node ) childItem ; if ( ! ausstelldatumPassed ) { String value = StringUtils . trimToNull ( childNode . getTextContent ( ) ) ; if ( value != null ) { parentNode . appendChild ( OpenImmoUtils . createUserDefinedSimplefield ( doc , "epass_ausstelldatum" , value ) ) ; ausstelldatumPassed = true ; } } node . removeChild ( childNode ) ; } // create a <user_defined_simplefield> for <jahrgang> elements childNodes = XmlUtils . newXPath ( "io:jahrgang" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Node childNode = ( Node ) childItem ; if ( ! jahrgangPassed ) { String value = StringUtils . trimToNull ( childNode . getTextContent ( ) ) ; if ( "2008" . equalsIgnoreCase ( value ) || "2014" . equalsIgnoreCase ( value ) || "ohne" . equalsIgnoreCase ( value ) ) { parentNode . appendChild ( OpenImmoUtils . createUserDefinedSimplefield ( doc , "epass_jahrgang" , value ) ) ; jahrgangPassed = true ; } } node . removeChild ( childNode ) ; } // create a <user_defined_simplefield> for <gebaeudeart> elements childNodes = XmlUtils . newXPath ( "io:gebaeudeart" , doc ) . selectNodes ( node ) ; for ( Object childItem : childNodes ) { Node childNode = ( Node ) childItem ; if ( ! gebaeudeartPassed ) { String value = StringUtils . trimToNull ( childNode . getTextContent ( ) ) ; if ( "wohn" . equalsIgnoreCase ( value ) || "nichtwohn" . equalsIgnoreCase ( value ) || "ohne" . equalsIgnoreCase ( value ) ) { parentNode . appendChild ( OpenImmoUtils . createUserDefinedSimplefield ( doc , "epass_gebaeudeart" , value ) ) ; gebaeudeartPassed = true ; } } node . removeChild ( childNode ) ; } } }


Input: Only use one &lt ; energiepass&gt ; element for each &lt ; immobilie&gt ; . <p > OpenImmo 1 . 2 . 6 does not allow more then one &lt ; energiepass&gt ; element for each &lt ; immobilie&gt ; ( maxOccurs = 1 ) . Odd &lt ; energiepass&gt ; elements are removed by this function . [CODESPLIT] protected void removeMultipleEnergiepassElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element parentNode = ( Element ) item ; List childNodes = XmlUtils . newXPath ( "io:energiepass" , doc ) . selectNodes ( parentNode ) ; if ( childNodes . size ( ) < 2 ) continue ; for ( int j = 1 ; j < childNodes . size ( ) ; j ++ ) { parentNode . removeChild ( ( Node ) childNodes . get ( j ) ) ; } } }


Input: Start the example application . [CODESPLIT] public static void main ( String [ ] args ) { // init logging PropertyConfigurator . configure ( FilemakerWritingExample . class . getResource ( PACKAGE + "/log4j.properties" ) ) ; // create a mapping from the example document, if no files were specified as command line arguments FilemakerResultMapping mapping = null ; if ( args . length < 1 ) { try { mapping = new FilemakerResultDocument ( buildExampleDocument ( ) ) . toMapping ( ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't create mapping!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } } // read file, that was specified as command line argument else { try { mapping = new FilemakerResultDocument ( XmlUtils . newDocument ( new File ( args [ 0 ] ) ) ) . toMapping ( ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't create mapping from file '" + args [ 0 ] + "'!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } } if ( mapping == null ) { LOGGER . error ( "No mapping was created!" ) ; System . exit ( 1 ) ; } // loop through available rows and access their values through the field name for ( int i = 0 ; i < mapping . getRowCount ( ) ; i ++ ) { FilemakerResultMapping . Row row = mapping . getRow ( i ) ; LOGGER . info ( StringUtils . repeat ( "-" , 50 ) ) ; LOGGER . info ( "record at row " + i ) ; LOGGER . info ( "> recordId = " + row . getRecordId ( ) ) ; LOGGER . info ( "> modId = " + row . getModId ( ) ) ; // access record values through their field name for ( String field : row . getFieldNames ( ) ) { LOGGER . info ( "> " + field + " = " + row . getValue ( field ) ) ; } } }


Input: Gets the value of the content property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public List < Object > getContent ( ) { if ( content == null ) { content = new ArrayList < Object > ( ) ; } return this . content ; }


Input: Returns the names of specified fields . [CODESPLIT] public String [ ] getFieldNames ( ) { List < String > names = new ArrayList <> ( ) ; for ( MetaDataType . FIELD field : this . fields ) { names . add ( field . getNAME ( ) ) ; } return names . toArray ( new String [ 0 ] ) ; }


Input: Sets the value of the blick property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setBlick ( Ausblick . Blick value ) { this . blick = value ; }


Input: Sets the value of the pauschalmiete property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public void setPauschalmiete ( WazTyp . Pauschalmiete value ) { this . pauschalmiete = value ; }


Input: Sets the value of the monatsmiete property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public void setMonatsmiete ( WazTyp . Monatsmiete value ) { this . monatsmiete = value ; }


Input: Gets the value of the parkplatz property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public StellplatzKategorieTyp getParkplatz ( ) { if ( parkplatz == null ) { return StellplatzKategorieTyp . KEINE_ANGABE ; } else { return parkplatz ; } }


Input: Create an instance of { @link Container . Realestateitems . Realestate . Images . Advertismentimage } [CODESPLIT] public Container . Realestateitems . Realestate . Images . Advertismentimage createContainerRealestateitemsRealestateImagesAdvertismentimage ( ) { return new Container . Realestateitems . Realestate . Images . Advertismentimage ( ) ; }


Input: Sets the value of the lastenaufzug property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public void setLastenaufzug ( JAXBElement < HebeanlageTyp > value ) { this . lastenaufzug = value ; }


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


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


Input: Read a { @link InputStream } into an { @link ImmobiliareItDocument } and print some of its content to console . [CODESPLIT] protected static void read ( InputStream xmlInputStream ) throws SAXException , IOException , ParserConfigurationException , JAXBException { LOGGER . info ( "process example file" ) ; ImmobiliareItDocument doc = ImmobiliareItUtils . createDocument ( xmlInputStream ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else { printToConsole ( doc ) ; } }


Input: Print some content of an { @link ImmobiliareItDocument } to console . [CODESPLIT] protected static void printToConsole ( ImmobiliareItDocument doc ) throws JAXBException { LOGGER . info ( "> process document in version " + doc . getDocumentVersion ( ) ) ; Feed feed = doc . toObject ( ) ; // process properties if ( feed . getProperties ( ) != null ) { for ( Property object : feed . getProperties ( ) . getProperty ( ) ) { // get object nr String objectNr = StringUtils . trimToNull ( object . getUniqueId ( ) ) ; if ( objectNr == null ) objectNr = "???" ; // get object description String objectInfo = ( object . getFeatures ( ) != null && ! object . getFeatures ( ) . getDescription ( ) . isEmpty ( ) ) ? StringUtils . trimToNull ( object . getFeatures ( ) . getDescription ( ) . get ( 0 ) . getValue ( ) ) : null ; if ( objectInfo == null ) objectInfo = "???" ; // print object information to console LOGGER . info ( "> found object " + "'" + objectNr + "': " + objectInfo ) ; } } }


Input: Gets the value of the feld property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < Bewertung . Feld > getFeld ( ) { if ( feld == null ) { feld = new ArrayList < Bewertung . Feld > ( ) ; } return this . feld ; }


Input: Receive notification of a validation warning or error . [CODESPLIT] @ Override public boolean handleEvent ( ValidationEvent event ) { if ( event == null ) throw new IllegalArgumentException ( "No validation event was provided!" ) ; int line = - 1 ; int col = - 1 ; if ( event . getLocator ( ) != null ) { line = event . getLocator ( ) . getLineNumber ( ) ; col = event . getLocator ( ) . getColumnNumber ( ) ; } if ( ValidationEvent . FATAL_ERROR == event . getSeverity ( ) ) { LOGGER . warn ( "fatal validation error" ) ; if ( line > - 1 && col > - 1 ) LOGGER . warn ( "> at line " + line + " / column " + col ) ; LOGGER . warn ( "> " + event . getMessage ( ) ) ; return false ; } if ( ValidationEvent . WARNING == event . getSeverity ( ) ) { LOGGER . warn ( "validation warning" ) ; if ( line > - 1 && col > - 1 ) LOGGER . warn ( "> at line " + line + " / column " + col ) ; LOGGER . warn ( "> " + event . getMessage ( ) ) ; } else { LOGGER . warn ( "validation error" ) ; if ( line > - 1 && col > - 1 ) LOGGER . warn ( "> at line " + line + " / column " + col ) ; LOGGER . warn ( "> " + event . getMessage ( ) ) ; } return true ; }


Input: Write content of the record in a human readable form . [CODESPLIT] public void dump ( Writer writer , String lineSeparator ) throws IOException { for ( int i = 0 ; i < this . getRecordLenth ( ) ; i ++ ) { StringBuilder txt = new StringBuilder ( ) ; try ( StringReader reader = new StringReader ( StringUtils . trimToEmpty ( this . get ( i ) ) ) ) { for ( String line : IOUtils . readLines ( reader ) ) { if ( txt . length ( ) > 0 ) txt . append ( lineSeparator ) ; txt . append ( line ) ; } } writer . write ( i + ":" + txt . toString ( ) ) ; writer . write ( System . lineSeparator ( ) ) ; } }


Input: Returns the value of the record at a certain index position . [CODESPLIT] protected final String get ( int pos , String defaultValue ) { String value = StringUtils . trimToNull ( this . values . get ( pos ) ) ; return ( value != null ) ? value : defaultValue ; }


Input: Loads data from { @link CsvParser } into the record . [CODESPLIT] protected void parse ( CSVRecord record ) { this . values . clear ( ) ; for ( int i = 0 ; i < record . size ( ) ; i ++ ) { this . values . put ( i , this . parse ( record . get ( i ) ) ) ; } }


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


Input: Sets the value of this record at a certain index position . [CODESPLIT] protected final void set ( int pos , String value ) { value = StringUtils . trimToNull ( value ) ; if ( value != null ) this . values . put ( pos , value ) ; else if ( this . values . containsKey ( pos ) ) this . values . remove ( pos ) ; }


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


Input: Read a { @link InputStream } into a { @link TrovitDocument } and print some of its content to console . [CODESPLIT] protected static void read ( InputStream xmlInputStream ) throws SAXException , IOException , ParserConfigurationException , JAXBException { LOGGER . info ( "process example file" ) ; TrovitDocument doc = TrovitUtils . createDocument ( xmlInputStream ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else { printToConsole ( doc ) ; } }


Input: Print some content of a { @link TrovitDocument } to console . [CODESPLIT] protected static void printToConsole ( TrovitDocument doc ) throws JAXBException { Trovit trovit = doc . toObject ( ) ; // process ads for ( AdType ad : trovit . getAd ( ) ) { // get object nr String objectNr = StringUtils . trimToNull ( ad . getId ( ) ) ; if ( objectNr == null ) objectNr = "???" ; // get object title String objectTitle = StringUtils . trimToNull ( ad . getTitle ( ) ) ; if ( objectTitle == null ) objectTitle = "???" ; // print object information to console LOGGER . info ( "> found object '" + objectNr + "' " + "with title '" + objectTitle + "'" ) ; } }


Input: Sets the value of the haustyp property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setHaustyp ( Haus . Haustyp value ) { this . haustyp = value ; }


Input: Read a { @link InputStream } into a { @link KyeroDocument } and print some of its content to console . [CODESPLIT] protected static void read ( InputStream xmlInputStream ) throws SAXException , IOException , ParserConfigurationException , JAXBException { LOGGER . info ( "process example file" ) ; KyeroDocument doc = KyeroUtils . createDocument ( xmlInputStream ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else { printToConsole ( doc ) ; } }


Input: Print some content of a { @link KyeroDocument } to console . [CODESPLIT] protected static void printToConsole ( KyeroDocument doc ) throws JAXBException { Root root = doc . toObject ( ) ; // process properties in the document for ( PropertyType obj : root . getProperty ( ) ) { // get object nr String objectNr = ( obj . getId ( ) != null ) ? obj . getId ( ) : "???" ; // get object description String objectInfo = null ; if ( obj . getDesc ( ) != null ) { objectInfo = StringUtils . trimToNull ( obj . getDesc ( ) . getEn ( ) ) ; if ( objectInfo == null ) objectInfo = StringUtils . trimToNull ( obj . getDesc ( ) . getDe ( ) ) ; if ( objectInfo == null ) objectInfo = StringUtils . trimToNull ( obj . getDesc ( ) . getEs ( ) ) ; } // print object information to console LOGGER . info ( "> found object '" + objectNr + "' " + "with title '" + objectInfo + "'" ) ; } }


Input: Gets the value of the energiepass property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public List < Energiepass > getEnergiepass ( ) { if ( energiepass == null ) { energiepass = new ArrayList < Energiepass > ( ) ; } return this . energiepass ; }


Input: Sets the value of the keller property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:54:50+02:00" , comments = "JAXB RI v2.2.11" ) public void setKeller ( Unterkellert . Keller value ) { this . keller = value ; }


Input: Sets the value of the grundstTyp property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setGrundstTyp ( Grundstueck . GrundstTyp value ) { this . grundstTyp = value ; }


Input: Sets the value of the geschlAttr property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setGeschlAttr ( Geschlecht . GeschlAttr value ) { this . geschlAttr = value ; }


Input: Sets the value of the hallenTyp property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:50:55+02:00" , comments = "JAXB RI v2.2.11" ) public void setHallenTyp ( HallenLagerProd . HallenTyp value ) { this . hallenTyp = value ; }


Input: Sets the value of the type property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:48:12+02:00" , comments = "JAXB RI v2.2.11" ) public void setType ( Box . BoxType value ) { this . type = value ; }


Input: Gets the value of the wiederholungstermin property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public Boolean getWiederholungstermin ( ) { if ( wiederholungstermin == null ) { return false ; } else { return wiederholungstermin ; } }


Input: Gets the value of the teilungsversteigerung property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public Boolean getTeilungsversteigerung ( ) { if ( teilungsversteigerung == null ) { return false ; } else { return teilungsversteigerung ; } }


Input: Sets the value of the kauf property . [CODESPLIT] @ Generated ( value = "com.sun.tools.xjc.Driver" , date = "2018-10-12T02:52:47+02:00" , comments = "JAXB RI v2.2.11" ) public void setKauf ( JAXBElement < VermarktungGrundstueckWohnenKaufTyp . Kauf > value ) { this . kauf = value ; }


Input: Downgrade an OpenImmo document from version 1 . 2 . 3 to 1 . 2 . 2 . [CODESPLIT] @ Override public void downgradeToPreviousVersion ( OpenImmoDocument doc ) { doc . setDocumentVersion ( OpenImmoVersion . V1_2_2 ) ; if ( doc instanceof OpenImmoTransferDocument ) { try { this . removeEmailFeedbackElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported <email_feedback> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removePreiseChildElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported children of <preise> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeFlaechenChildElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <flaechen> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeAusstattungChildElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported children of <ausstattung> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeZustandAngabenChildElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported children of <zustand_angaben> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . removeUserDefinedExtendElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't remove unsupported <user_defined_extend> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeParkenElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <parken> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeBadElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <bad> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeKuecheElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <kueche> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeBodenElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <boden> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeBefeuerungElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <befeuerung> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeAusrichtBalkonTerrasseElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <ausricht_balkon_terrasse> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeDachformElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <dachform> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeWohnungElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <wohnung> 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 . downgradeSonstigeElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <sonstige> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . downgradeZinshausRenditeobjektElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <zinshaus_renditeobjekt> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } } }


Input: Upgrade an OpenImmo document from version 1 . 2 . 2 to 1 . 2 . 3 . [CODESPLIT] @ Override public void upgradeFromPreviousVersion ( OpenImmoDocument doc ) { doc . setDocumentVersion ( OpenImmoVersion . V1_2_3 ) ; if ( doc instanceof OpenImmoTransferDocument ) { try { this . upgradeSonstigeElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <sonstige> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } try { this . upgradeZinshausRenditeobjektElements ( doc . getDocument ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't downgrade <zinshaus_renditeobjekt> elements!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } } }


Input: Downgrade &lt ; ausricht_balkon_terrasse&gt ; elements to OpenImmo 1 . 2 . 2 . <p > The attributes NORDOST NORDWEST SUEDOST SUEDWEST for &lt ; ausricht_balkon_terrasse&gt ; elements are not available in version 1 . 2 . 2 . <p > Any occurences of these values are replaced by the single components - e . g . NORDOST is removed and NORD + OST is set . [CODESPLIT] protected void downgradeAusrichtBalkonTerrasseElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:ausstattung/io:ausricht_balkon_terrasse[@NORDOST or @NORDWEST or @SUEDOST or @SUEDWEST]" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; if ( node . hasAttribute ( "NORDOST" ) ) { String value = StringUtils . trimToEmpty ( node . getAttribute ( "NORDOST" ) ) . toLowerCase ( ) ; if ( value . equals ( "1" ) || value . equals ( "true" ) ) { node . setAttribute ( "NORD" , "true" ) ; node . setAttribute ( "OST" , "true" ) ; } node . removeAttribute ( "NORDOST" ) ; } if ( node . hasAttribute ( "NORDWEST" ) ) { String value = StringUtils . trimToEmpty ( node . getAttribute ( "NORDWEST" ) ) . toLowerCase ( ) ; if ( value . equals ( "1" ) || value . equals ( "true" ) ) { node . setAttribute ( "NORD" , "true" ) ; node . setAttribute ( "WEST" , "true" ) ; } node . removeAttribute ( "NORDWEST" ) ; } if ( node . hasAttribute ( "SUEDOST" ) ) { String value = StringUtils . trimToEmpty ( node . getAttribute ( "SUEDOST" ) ) . toLowerCase ( ) ; if ( value . equals ( "1" ) || value . equals ( "true" ) ) { node . setAttribute ( "SUED" , "true" ) ; node . setAttribute ( "OST" , "true" ) ; } node . removeAttribute ( "SUEDOST" ) ; } if ( node . hasAttribute ( "SUEDWEST" ) ) { String value = StringUtils . trimToEmpty ( node . getAttribute ( "SUEDWEST" ) ) . toLowerCase ( ) ; if ( value . equals ( "1" ) || value . equals ( "true" ) ) { node . setAttribute ( "SUED" , "true" ) ; node . setAttribute ( "WEST" , "true" ) ; } node . removeAttribute ( "SUEDWEST" ) ; } } }


Input: Remove unsupported children from all &lt ; flaechen&gt ; elements . <p > OpenImmo 1 . 2 . 2 does not support the following children for &lt ; flaechen&gt ; elements : &lt ; anzahl_balkone&gt ; &lt ; anzahl_terrassen&gt ; <p > These elements are removed by this function . If &lt ; anzahl_balkon_terrassen&gt ; is not already specified the sum values of &lt ; anzahl_balkone&gt ; and &lt ; anzahl_terrassen&gt ; are written into &lt ; anzahl_balkon_terrassen&gt ; . [CODESPLIT] protected void downgradeFlaechenChildElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:flaechen" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element parentNode = ( Element ) item ; boolean passedAnzahlBalkone = false ; boolean passedAnzahlTerrassen = false ; double sum = 0 ; List childNodes = XmlUtils . newXPath ( "io:anzahl_balkone" , doc ) . selectNodes ( parentNode ) ; for ( Object childItem : childNodes ) { Node node = ( Node ) childItem ; if ( ! passedAnzahlBalkone ) { passedAnzahlBalkone = true ; String value = StringUtils . trimToNull ( node . getTextContent ( ) ) ; try { sum += ( value != null ) ? Double . parseDouble ( value ) : 0 ; } catch ( NumberFormatException ex ) { LOGGER . warn ( "Can't parse <anzahl_balkone>" + value + "</anzahl_balkone> into a numeric value!" ) ; LOGGER . warn ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } } parentNode . removeChild ( node ) ; } childNodes = XmlUtils . newXPath ( "io:anzahl_terrassen" , doc ) . selectNodes ( parentNode ) ; for ( Object childItem : childNodes ) { Node node = ( Node ) childItem ; if ( ! passedAnzahlTerrassen ) { passedAnzahlTerrassen = true ; String value = StringUtils . trimToNull ( node . getTextContent ( ) ) ; try { sum += ( value != null ) ? Double . parseDouble ( value ) : 0 ; } catch ( NumberFormatException ex ) { LOGGER . warn ( "Can't parse <anzahl_terrassen>" + value + "</anzahl_terrassen> into a numeric value!" ) ; LOGGER . warn ( "> " + ex . getLocalizedMessage ( ) , ex ) ; } } parentNode . removeChild ( node ) ; } if ( sum > 0 ) { Element node = ( Element ) XmlUtils . newXPath ( "io:anzahl_balkon_terrassen" , doc ) . selectSingleNode ( parentNode ) ; if ( node == null ) { node = doc . createElementNS ( StringUtils . EMPTY , "anzahl_balkon_terrassen" ) ; node . setTextContent ( String . valueOf ( sum ) ) ; parentNode . appendChild ( node ) ; } else if ( StringUtils . isBlank ( node . getTextContent ( ) ) ) { node . setTextContent ( String . valueOf ( sum ) ) ; } } } }


Input: Replace &lt ; parken&gt ; elements with &lt ; sonstige&gt ; elements . <p > OpenImmo 1 . 2 . 2 does not support &lt ; parken&gt ; elements . Any occurence is converted into &lt ; sonstige&gt ; elements . [CODESPLIT] protected void downgradeParkenElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart/io:parken" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) ; parentNode . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "sonstige" ) ; newNode . setAttribute ( "sonstige_typ" , "PARKFLACHE" ) ; parentNode . appendChild ( newNode ) ; } }


Input: Upgrade &lt ; zinshaus_renditeobjekt&gt ; elements to OpenImmo 1 . 2 . 3 . <p > The options PFLEGEHEIM SANATORIUM SENIORENHEIM BETREUTES - WOHNEN for the haustyp attribute of &lt ; haus&gt ; elements are placed in the &lt ; zinshaus_renditeobjekt&gt ; element in version 1 . 2 . 3 . [CODESPLIT] protected void upgradeZinshausRenditeobjektElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart/io:haus[@haustyp]" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parent = ( Element ) node . getParentNode ( ) ; String value = StringUtils . trimToNull ( node . getAttribute ( "haustyp" ) ) ; if ( "PFLEGEHEIM" . equalsIgnoreCase ( value ) ) { parent . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "zinshaus_renditeobjekt" ) ; newNode . setAttribute ( "zins_typ" , "PFLEGEHEIM" ) ; parent . appendChild ( newNode ) ; } else if ( "SANATORIUM" . equalsIgnoreCase ( value ) ) { parent . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "zinshaus_renditeobjekt" ) ; newNode . setAttribute ( "zins_typ" , "SANATORIUM" ) ; parent . appendChild ( newNode ) ; } else if ( "SENIORENHEIM" . equalsIgnoreCase ( value ) ) { parent . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "zinshaus_renditeobjekt" ) ; newNode . setAttribute ( "zins_typ" , "SENIORENHEIM" ) ; parent . appendChild ( newNode ) ; } else if ( "BETREUTES-WOHNEN" . equalsIgnoreCase ( value ) ) { parent . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "zinshaus_renditeobjekt" ) ; newNode . setAttribute ( "zins_typ" , "BETREUTES-WOHNEN" ) ; parent . appendChild ( newNode ) ; } } }


Input: Create an instance of { @link JAXBElement } { @code < } { @link VirtuelleImmobilieBaseTyp } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "VirtuelleImmobilie" ) public JAXBElement < VirtuelleImmobilieBaseTyp > createVirtuelleImmobilie ( VirtuelleImmobilieBaseTyp value ) { return new JAXBElement < VirtuelleImmobilieBaseTyp > ( _VirtuelleImmobilie_QNAME , VirtuelleImmobilieBaseTyp . class , null , value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link ImmobilieBaseTyp } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "Immobilie" ) public JAXBElement < ImmobilieBaseTyp > createImmobilie ( ImmobilieBaseTyp value ) { return new JAXBElement < ImmobilieBaseTyp > ( _Immobilie_QNAME , ImmobilieBaseTyp . class , null , value ) ; }


Input: Create an instance of { @link WohnungKauf }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "WohnungKauf" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public WohnungKauf createWohnungKauf ( WohnungKauf . Type value ) { return new WohnungKauf ( value ) ; }


Input: Create an instance of { @link WohnungMiete }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "WohnungMiete" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public WohnungMiete createWohnungMiete ( WohnungMiete . Type value ) { return new WohnungMiete ( value ) ; }


Input: Create an instance of { @link HausKauf }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "HausKauf" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public HausKauf createHausKauf ( HausKauf . Type value ) { return new HausKauf ( value ) ; }


Input: Create an instance of { @link HausMiete }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "HausMiete" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public HausMiete createHausMiete ( HausMiete . Type value ) { return new HausMiete ( value ) ; }


Input: Create an instance of { @link WAZ }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "WAZ" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public WAZ createWAZ ( WAZ . Type value ) { return new WAZ ( value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link Grundstueck } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "Grundstueck" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public JAXBElement < Grundstueck > createGrundstueck ( Grundstueck value ) { return new JAXBElement < Grundstueck > ( _Grundstueck_QNAME , Grundstueck . class , null , value ) ; }


Input: Create an instance of { @link GrundstueckWohnenKauf }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "GrundstueckWohnenKauf" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public GrundstueckWohnenKauf createGrundstueckWohnenKauf ( GrundstueckWohnenKauf . Type value ) { return new GrundstueckWohnenKauf ( value ) ; }


Input: Create an instance of { @link GrundstueckWohnenMiete }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "GrundstueckWohnenMiete" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public GrundstueckWohnenMiete createGrundstueckWohnenMiete ( GrundstueckWohnenMiete . Type value ) { return new GrundstueckWohnenMiete ( value ) ; }


Input: Create an instance of { @link GrundstueckGewerbe }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "GrundstueckGewerbe" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public GrundstueckGewerbe createGrundstueckGewerbe ( GrundstueckGewerbe . Type value ) { return new GrundstueckGewerbe ( value ) ; }


Input: Create an instance of { @link JAXBElement } { @code < } { @link TypenHaus } { @code > }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "TypenHaus" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "VirtuelleImmobilie" ) public JAXBElement < TypenHaus > createTypenHaus ( TypenHaus value ) { return new JAXBElement < TypenHaus > ( _TypenHaus_QNAME , TypenHaus . class , null , value ) ; }


Input: Create an instance of { @link BueroPraxis }} [CODESPLIT] @ XmlElementDecl ( namespace = "http://www.immobilienscout24.de/immobilientransfer" , name = "BueroPraxis" , substitutionHeadNamespace = "http://www.immobilienscout24.de/immobilientransfer" , substitutionHeadName = "Immobilie" ) public BueroPraxis createBueroPraxis ( BueroPraxis . Type value ) { return new BueroPraxis ( value ) ; }