Examples/src/main/java/org/openestate/io/examples/OpenImmoReadingExample.java
@SuppressWarnings("Duplicates")
    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;
        }
        OpenImmoDocument doc = OpenImmoUtils.createDocument(xmlFile);
        if (doc == null) {
            LOGGER.warn("> provided XML is not supported");
        } else if (doc.isFeedback()) {
            printToConsole((OpenImmoFeedbackDocument) doc);
        } else if (doc.isTransfer()) {
            printToConsole((OpenImmoTransferDocument) doc);
        } else {
            LOGGER.warn("> unsupported type of document: "
                    + doc.getClass().getName());
        }
    }
@SuppressWarnings("Duplicates")
    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;
        }
        OpenImmoDocument doc = OpenImmoUtils.createDocument(xmlFile);
        if (doc == null) {
            LOGGER.warn("> provided XML is not supported");
        } else if (doc.isFeedback()) {
            printToConsole((OpenImmoFeedbackDocument) doc);
        } else if (doc.isTransfer()) {
            printToConsole((OpenImmoTransferDocument) doc);
        } else {
            LOGGER.warn("> unsupported type of document: "
                    + doc.getClass().getName());
        }
    }
@ SuppressWarnings ( "Duplicates" ) 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 ; } OpenImmoDocument doc = OpenImmoUtils . createDocument ( xmlFile ) ; if ( doc == null ) { LOGGER . warn ( "> provided XML is not supported" ) ; } else if ( doc . isFeedback ( ) ) { printToConsole ( ( OpenImmoFeedbackDocument ) doc ) ; } else if ( doc . isTransfer ( ) ) { printToConsole ( ( OpenImmoTransferDocument ) doc ) ; } else { LOGGER . warn ( "> unsupported type of document: " + doc . getClass ( ) . getName ( ) ) ; } }
Read a {@link File} into an {@link OpenImmoTransferDocument} or
{@link OpenImmoFeedbackDocument} and print some of their content to
console.

@param xmlFile the file to read
@throws SAXException                 if the file is not readable by the XML parser
@throws IOException                  if the file is not readable
@throws ParserConfigurationException if the XML parser is improperly configured
@throws JAXBException                if XML conversion into Java objects failed
Read a { @link File } into an { @link OpenImmoTransferDocument } or { @link OpenImmoFeedbackDocument } and print some of their content to console .