Examples/src/main/java/org/openestate/io/examples/TrovitReadingExample.java
protected static void printToConsole(TrovitDocument doc) throws JAXBException {
        Trovit trovit = doc.toObject();

        // process ads
        for (AdType ad : trovit.getAd()) {
            // get object nr
            String objectNr = StringUtils.trimToNull(ad.getId());
            if (objectNr == null) objectNr = "???";

            // get object title
            String objectTitle = StringUtils.trimToNull(ad.getTitle());
            if (objectTitle == null) objectTitle = "???";

            // print object information to console
            LOGGER.info("> found object '" + objectNr + "' "
                    + "with title '" + objectTitle + "'");
        }
    }
protected static void printToConsole(TrovitDocument doc) throws JAXBException {
        Trovit trovit = doc.toObject();

        // process ads
        for (AdType ad : trovit.getAd()) {
            // get object nr
            String objectNr = StringUtils.trimToNull(ad.getId());
            if (objectNr == null) objectNr = "???";

            // get object title
            String objectTitle = StringUtils.trimToNull(ad.getTitle());
            if (objectTitle == null) objectTitle = "???";

            // print object information to console
            LOGGER.info("> found object '" + objectNr + "' "
                    + "with title '" + objectTitle + "'");
        }
    }
protected static void printToConsole ( TrovitDocument doc ) throws JAXBException { Trovit trovit = doc . toObject ( ) ; // process ads for ( AdType ad : trovit . getAd ( ) ) { // get object nr String objectNr = StringUtils . trimToNull ( ad . getId ( ) ) ; if ( objectNr == null ) objectNr = "???" ; // get object title String objectTitle = StringUtils . trimToNull ( ad . getTitle ( ) ) ; if ( objectTitle == null ) objectTitle = "???" ; // print object information to console LOGGER . info ( "> found object '" + objectNr + "' " + "with title '" + objectTitle + "'" ) ; } }
Print some content of a {@link TrovitDocument} to console.

@param doc the document to process
@throws JAXBException if XML conversion into Java objects failed
Print some content of a { @link TrovitDocument } to console .