protected static void printToConsole(CasaItDocument doc) throws JAXBException {
        Container container = doc.toObject();

        // process real estates
        if (container.getRealestateitems() != null) {
            for (Container.Realestateitems.Realestate obj : container.getRealestateitems().getRealestate()) {
                // get object nr
                String objectNr = StringUtils.trimToNull(obj.getReference());
                if (objectNr == null) objectNr = "???";

                // get object title
                String objectTitle = (obj.getDescription() != null) ?
                        StringUtils.trimToNull(obj.getDescription().getValue()) : null;
                if (objectTitle == null) objectTitle = "???";

                // print object information to console
                LOGGER.info("> found object '" + objectNr + "' "
                        + "with title '" + objectTitle + "'");
            }
        }
    }
protected static void printToConsole ( CasaItDocument doc ) throws JAXBException { Container container = doc . toObject ( ) ; if ( container . getRealestateitems ( ) != null ) { for ( Container . Realestateitems . Realestate obj : container . getRealestateitems ( ) . getRealestate ( ) ) { String objectNr = StringUtils . trimToNull ( obj . getReference ( ) ) ; if ( objectNr == null ) objectNr = "???" ; String objectTitle = ( obj . getDescription ( ) != null ) ? StringUtils . trimToNull ( obj . getDescription ( ) . getValue ( ) ) : null ; if ( objectTitle == null ) objectTitle = "???" ; LOGGER . info ( "> found object '" + objectNr + "' " + "with title '" + objectTitle + "'" ) ; } } }
Print some content of a {@link CasaItDocument} to console.

@param doc the document to process
@throws JAXBException if XML conversion into Java objects failed