OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_3.java
@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);
            }
        }
    }
@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);
            }
        }
    }
@ 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 ) ; } } }
Downgrade an OpenImmo document from version 1.2.3 to 1.2.2.

@param doc OpenImmo document in version 1.2.3
Downgrade an OpenImmo document from version 1 . 2 . 3 to 1 . 2 . 2 .