Logo Search packages:      
Sourcecode: pcalendar version File versions  Download package

void net::sf::linuxorg::pcal::engine::Engine::saveToFileDateValues ( Document  doc,
Element  parent_element 
) [inline, private]

Save to file the Date-Value pairs saveToFile helper

Parameters:
doc
parent_element

Definition at line 908 of file Engine.java.

References bBTList, dateValueTypeToTagMap, and notesContainer.

Referenced by saveToFile().

                                                                              {
            for(Integer valueTypeID: dateValueTypeToTagMap.keySet()) {
                  Element element;
                  Set<Date> dateSet = null;
                  if(valueTypeID.equals(PCAL_TYPE_NOTES)) {
                        dateSet = notesContainer.keySet();
                  } else 
                        if(valueTypeID.equals(PCAL_TYPE_BBT)) {
                              dateSet = bBTList.keySet();
                        } else
                              if(valueTypeID.equals(PCAL_TYPE_DATE_INTS)) {
                                    dateSet = dateIntValues.keySet();
                              }

                  for(Date d: dateSet) {
                        element = doc.createElement(dateValueTypeToTagMap.get(valueTypeID));
                        Element e1 =doc.createElement("date"); //$NON-NLS-1$
                        e1.appendChild(doc.createTextNode(DATE_FORMAT.format(d))); 
                        element.appendChild(e1);

                        e1 =doc.createElement("text"); //$NON-NLS-1$                      

                        String text = ""; //$NON-NLS-1$
                        if(valueTypeID.equals(PCAL_TYPE_NOTES)) {
                              text = notesContainer.get(d);
                        } else 
                              if(valueTypeID.equals(PCAL_TYPE_BBT)) {
                                    text = bBTList.get(d).toString();
                              } else 
                                    if(valueTypeID.equals(PCAL_TYPE_DATE_INTS)) {
                                          text = dateIntValues.get(d).toString();
                                    }

                        e1.appendChild(doc.createTextNode(text));
                        element.appendChild(e1);

                        parent_element.appendChild(element);
                  }
            }
      }

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index