Examples/src/main/java/org/openestate/io/examples/OpenImmoReadingExample.java
@SuppressWarnings("Duplicates")
    public static void main(String[] args) {
        // init logging
        PropertyConfigurator.configure(
                OpenImmoReadingExample.class.getResource(PACKAGE + "/log4j.properties"));

        // read example files, if no files were specified as command line arguments
        if (args.length < 1) {
            try {
                read(OpenImmoReadingExample.class.getResourceAsStream(PACKAGE + "/openimmo.xml"));
            } catch (Exception ex) {
                LOGGER.error("Can't read example transfer file!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
                System.exit(2);
            }

            try {
                read(OpenImmoReadingExample.class.getResourceAsStream(PACKAGE + "/openimmo-feedback.xml"));
            } catch (Exception ex) {
                LOGGER.error("Can't read example feedback 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);
                }
            }
        }
    }
@SuppressWarnings("Duplicates")
    public static void main(String[] args) {
        // init logging
        PropertyConfigurator.configure(
                OpenImmoReadingExample.class.getResource(PACKAGE + "/log4j.properties"));

        // read example files, if no files were specified as command line arguments
        if (args.length < 1) {
            try {
                read(OpenImmoReadingExample.class.getResourceAsStream(PACKAGE + "/openimmo.xml"));
            } catch (Exception ex) {
                LOGGER.error("Can't read example transfer file!");
                LOGGER.error("> " + ex.getLocalizedMessage(), ex);
                System.exit(2);
            }

            try {
                read(OpenImmoReadingExample.class.getResourceAsStream(PACKAGE + "/openimmo-feedback.xml"));
            } catch (Exception ex) {
                LOGGER.error("Can't read example feedback 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);
                }
            }
        }
    }
Start the example application.

@param args command line arguments