Examples of Observation


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

    Vector observations = new Vector(days);
    observations.setSize(days + 1);
    controler.progressListner.setMaxValue(ids.size());
    for (int i1 = 0; i1 < ids.size(); ++i1) {
      int id = ((Integer) ids.elementAt(i1)).intValue();
      Observation o1 = observationDAO.find(id);
      int day = Utils.getDaysBetween(period.getStart(), o1.getDate());
      observations.setElementAt(o1, day);
      controler.progressListner.setValue(i1);
    }
    Log.log("observations: " + observations);

    int selectedDay = 0;   
    Observation observation = (Observation) params[1];
    if(observation != null) {
      for(int i=0;i<observations.size();++i) {
        Observation o = (Observation) observations.elementAt(i);
        if(o == null)
          continue;
        if(observation.getId() == o.getId()) {
          selectedDay = i;
          break;
        }
      }
    }
View Full Code Here

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

      }
    });
    view.addCommand(new ActionCommand("${save}", Command.BACK, 1) {
      public Navigation execute(Displayable d) throws Exception {
        InputView form = (InputView) d;
        Observation observation = form.getObservation();
        Observation existing = getObservationAt(observation.getDate());
        if (existing != null) {
          return new Navigation("confirm-overwrite", existing,
              new Navigation("save-observation", period, observation),
              new Navigation("graph", period, existing));
        }
View Full Code Here

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

  public void load(Object parameter) throws Exception {
    System.out.println("InputModel.load(" + parameter + ")");
    if (parameter == null) {
      period = controler.getPeriodDAO().getCurrent();
      view.setObservation(new Observation());
      view.refreshMucusList();
    } else {
      Object[] params = (Object[]) parameter;
      period = (Period) params[0];
      view.setObservation((Observation) params[1]);
View Full Code Here

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

      return null;
    Vector ids = periodDAO.getObservationIds(period);
    controler.progressListner.setMaxValue(ids.size());
    for (int i = 0; i < ids.size(); ++i) {
      int id = ((Integer) ids.elementAt(i)).intValue();
      Observation o = observationDAO.find(id);
      if (Utils.equals(date, o.getDate()))
        return o;
    }
    return null;
  }
View Full Code Here

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

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

    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

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

        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

Examples of org.rlcommunity.rlglue.codec.types.Observation

        return gamecontroller.waitForMoves();
    }
   
    private Observation createObservation(RState state)
    {
        Observation observation = new Observation();
       
        Set<GroundFact> set = state.getGroundFactState();
        String s = "";
        for (GroundFact fact : set)
        {
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

        currentState = 0;
        // Se crea una observacion(estado) formado
        // por un vector de 2 entero que denotan
        // el estado actual y el numero de estados totales
        // que hay actualmente
        Observation returnObservation = new Observation(2, 0, 0);
        // Se asigna a la posicion 0 el estado actual
        returnObservation.intArray[0] = currentState;
        // Se asigna a la posicion 1 el numero de estados
        returnObservation.intArray[1] = numStates;
        // Se devuele el estado creado
View Full Code Here

Examples of org.rlcommunity.rlglue.codec.types.Observation

        theReward = currentReward;
        // Se crea una observacion(estado) formado
        // por un vector de 2 entero que denotan
        // el estado actual y el numero de estados totales
        // que hay actualmente
        Observation returnObservation = new Observation(2, 0, 0);
        // Se asigna a la posicion 0 el estado actual
        returnObservation.intArray[0] = currentState;
        // Se asigna a la posicion 1 el numero de estados
        returnObservation.intArray[1] = numStates;
        // Se crea un clase Reward_observation_terminal
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.