Package net.sf.nfp.mini.data

Examples of net.sf.nfp.mini.data.Observation


 
  public void load(Object parameter) throws Exception {
    Log.log("SaveObservationModel.load()");
    Object[] params = (Object[]) parameter;
    Period period = (Period) params[0];
    Observation observation = (Observation) params[1];
    Log.log("period:"+period);
    Log.log("observ:"+observation);
    boolean newPeriodStarted = false;
    if (period == null) {
      period = new Period(observation.getDate());
      newPeriodStarted = true;
    } else if (observation.isBleeding()) {
      // only current period is "closed" when adding new bleeding
      // observations
      if (isCurrentPeriod(period) && !isBleeingContinuation(period, observation)) {
        period = new Period(observation.getDate());
        newPeriodStarted = true;
      }
    }
    Period[] ref = { period };
    observation = LogicDAO.addObservationToPeriod(observation, ref, controler);
View Full Code Here


    final PeriodDAO periodDAO = controler.getPeriodDAO();
    final ObservationDAO observationDAO = controler.getObservationDAO();
    Vector ids = periodDAO.getObservationIds(period);
    for(int i=0;i<ids.size();++i) {
      Integer id = (Integer) ids.elementAt(i);
      Observation o = observationDAO.find(id.intValue());
      if(o.isBleeding() == false)
        if(o.getDate().getTime() < observation.getDate().getTime())
          //There is a non-bleeding observation before 'observation'
          return false;
    }
    return true;
  }
View Full Code Here

        temperature = Utils.parseTemperature(tempString);
        //#endif
      }
    }   
    Mucus mucus = (Mucus) MucusRegistry.instance().getAll().elementAt(mucusChoise.getSelectedIndex())
    return new Observation(dateField.getDate(), temperature, mucus, bleeding, disturbed, "");
  }
View Full Code Here

TOP

Related Classes of net.sf.nfp.mini.data.Observation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.