Changeset 243

Show
Ignore:
Timestamp:
03/01/06 14:29:14
Author:
douglm
Message:

Fixed bug in DumpEvents? - showed up when there are no EventAnnotations?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/dumprestore/src/org/bedework/dumprestore/dump/dumpling/DumpAll.java

    r218 r243  
    123123    info("Dumping event annotations."); 
    124124    di.open(); 
    125     new DumpEvents(globals).dumpSection(di.getEventAnnotations()); 
     125    new DumpEventAnnotations(globals).dumpSection(di.getEventAnnotations()); 
    126126    di.close(); 
    127127 
  • trunk/calendar3/dumprestore/src/org/bedework/dumprestore/dump/dumpling/DumpEvents.java

    r218 r243  
    4444 */ 
    4545public class DumpEvents extends Dumpling { 
     46  protected boolean annotations; 
     47   
    4648  /** Constructor 
    4749   * 
     
    5658   */ 
    5759  public void dumpSection(Iterator it) throws Throwable { 
    58     boolean taggedStart = false; 
    59     boolean annotations = false; 
     60    if (annotations) { 
     61      tagStart(sectionEventAnnotations); 
     62    } else { 
     63      tagStart(sectionEvents); 
     64    } 
    6065 
    6166    while (it.hasNext()) { 
    62       BwEvent e = (BwEvent)it.next(); 
    63        
    64       if (!taggedStart) { 
    65         if (e instanceof BwEventAnnotation) { 
    66           tagStart(sectionEventAnnotations); 
    67           annotations = true; 
    68         } else { 
    69           tagStart(sectionEvents); 
    70         } 
    71          
    72         taggedStart = true; 
    73       } 
    74  
    75       dumpEvent(e); 
     67      dumpEvent((BwEvent)it.next()); 
    7668    } 
    7769