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

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

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

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

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

@param doc OpenImmo document in version 1.2.0
Upgrade an OpenImmo document from version 1 . 2 . 0 to 1 . 2 . 1 .