OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_3.java
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");
            }
        }
    }
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");
            }
        }
    }
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" ) ; } } }
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.

@param doc OpenImmo document in version 1.2.3
@throws JaxenException if xpath evaluation failed
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 .