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

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

Save to file the associated properties

Parameters:
doc
parent_element
Exceptions:
IOException

Definition at line 955 of file Engine.java.

References fileBBTCelsiusScale, net::sf::linuxorg::pcal::engine::BBTSympthomsSetDefinition::getSympthoms(), net::sf::linuxorg::pcal::engine::BBTSympthomsSetDefinition::getSympthomValues(), and sympthomsDefinition.

Referenced by saveToFile().

                                                                                                     {
            Properties fileProperties = new Properties();

            int i = 0;
            for(String sympthom: sympthomsDefinition.getSympthoms()) {
                  if(sympthom!=null) {
                        fileProperties.setProperty(BBT_SYMPTHOM+i, sympthom);
                        int j = 0;
                        for(String value: sympthomsDefinition.getSympthomValues(i)) {
                              fileProperties.setProperty(BBT_SYMPTHOM+i+BBT_VALUE+j, value);                      
                              j++;
                        }     
                  }
                  i++;
            }

            fileProperties.setProperty(CELSIUS_SCALE, fileBBTCelsiusScale?TRUE:FALSE);

            ByteArrayOutputStream bas = new ByteArrayOutputStream();
            fileProperties.store(bas, ""); //$NON-NLS-1$

            Element element = doc.createElement(FILE_PROPERTIES_TAG);
            element.appendChild(doc.createTextNode(bas.toString()));

            parent_element.appendChild(element);
      }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index