Search in sources :

Example 1 with DumpEntity

use of org.bedework.calfacade.base.DumpEntity in project bw-calendar-engine by Bedework.

the class Dumpling method dumpCollection.

private void dumpCollection(final Iterator<T> it) throws Throwable {
    while (it.hasNext()) {
        final DumpEntity d = unwrap(it.next());
        globals.counts[countIndex]++;
        if ((globals.counts[countIndex] % 100) == 0) {
            info("        ... " + globals.counts[countIndex]);
        }
        if (d instanceof BwResource) {
            dumpResource((BwResource) d);
            continue;
        }
        if (d instanceof BwCalendar) {
            dumpCollection((BwCalendar) d);
            continue;
        }
        if (d instanceof BwEvent) {
            dumpEvent((BwEvent) d);
            continue;
        }
        /* Just dump any remaining classes - no special treatment */
        d.dump(xml);
    }
}
Also used : DumpEntity(org.bedework.calfacade.base.DumpEntity) BwResource(org.bedework.calfacade.BwResource) BwEvent(org.bedework.calfacade.BwEvent) BwCalendar(org.bedework.calfacade.BwCalendar)

Aggregations

BwCalendar (org.bedework.calfacade.BwCalendar)1 BwEvent (org.bedework.calfacade.BwEvent)1 BwResource (org.bedework.calfacade.BwResource)1 DumpEntity (org.bedework.calfacade.base.DumpEntity)1