Examples of Observation


Examples of jmt.engine.jwat.Observation

                } else {
                  lineValue[j++] = map[i].addNewValue(lineToken[i]);
                }
              }
            }
            valori.add(new Observation(lineValue, countObs));
          } else {
            //Worong row, the line wasn't processed completely
            countObs--;
            try {
              w.write("Error in row " + totalRaw + " : Too many fields\n");
View Full Code Here

Examples of jmt.engine.jwat.Observation

                } else {
                  lineValue[j++] = map[i].addNewValue(lineToken[i]);
                }
              }
            }
            valori.add(new Observation(lineValue, countObs));
          } else {
            //Riga sbagliata, decremento il num di oss
            countObs--;
            try {
              w.write("Error in row " + k + " : Too many fields\n");
View Full Code Here

Examples of jmt.engine.jwat.Observation

                } else {
                  lineValue[j++] = map[i].addNewValue(lineToken[i]);
                }
              }
            }
            valori.add(new Observation(lineValue, countObs));
          } else {
            //Riga sbagliata, decremento il num di oss
            countObs--;
            try {
              w.write("Error in row " + (totalRaw + minInd) + " : Too many fields\n");
View Full Code Here

Examples of jmt.engine.jwat.Observation

    for (i = 0; i < numObs; i++) {
      id = dis.readInt();
      for (j = 0; j < numVar; j++) {
        valLst[j] = dis.readDouble();
      }
      valori[i] = new Observation(valLst, id);
    }
    //System.out.println("Create matrix");
    updateInfos(5, "Create matrix", false);
    m = new MatrixOsservazioni(valori, selName, selType, map);
    session.getDataModel().setMatrix(m);
View Full Code Here

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

      observationsRMS = RecordStore.openRecordStore("observations", true);
    return observationsRMS;
  }

  public Observation find(int id) throws RecordStoreException, IOException {
    return (Observation) super.find(id, new Observation());
  }
View Full Code Here

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

  private NavigationCommand noCommand = null;
  private Alert view;
 
  public void load(Object parameter) throws Exception {
    Object[] params = (Object[]) parameter;
    Observation existing = (Observation) params[0];   
    Navigation onYes = (Navigation) params[1];
    Navigation onNo = (Navigation) params[2];
 
    view.setString("${overwrite.existing}\n"+existing);
    view.setTimeout(Alert.FOREVER);
View Full Code Here

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

    view.addCommand(new ActionCommand("D:sample data", Command.SCREEN, 101) {
      public Navigation execute(Displayable d) throws Exception {
        Calendar date = Calendar.getInstance();
        Random random = new Random();
        controler.progressListner.setMaxValue(30);
        Observation o = null;
        Period period = new Period(new Date());
        controler.getPeriodDAO().setObservationIds(period, new Vector());
        for(int i=1; i < 5; ++i) {
          date.set(Calendar.DAY_OF_MONTH, i);
          o = new Observation(date.getTime(),
              Observation.NO_TEMPERATURE,
              MucusRegistry.instance().find(1),
              true, random.nextInt() % 5 == 0, "");
          LogicDAO.addObservationToPeriod(o, new Period[]{period}, controler);
          controler.progressListner.setValue(i);
        }
        for (int i = 5; i < 30; ++i) {
          date.set(Calendar.DAY_OF_MONTH, i);
          o = new Observation(date.getTime(),
              3620 + random.nextInt() % 60,
              MucusRegistry.instance().find(i % 3 + 1),
              false, random.nextInt() % 10 == 0, "");
          LogicDAO.addObservationToPeriod(o, new Period[]{period}, controler);
          controler.progressListner.setValue(i);
View Full Code Here

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

    int prevX = 0;
    int prevY = 0;
    boolean drawLine = false;
    boolean lastIsBleeding = true;
    for (int day = 0; day < observations.size(); day++) {
      Observation observation = (Observation) observations.elementAt(day);
      if(observation == null) {
        if(lastIsBleeding)
          drawInterval(g, new Interval(day, day+1), 0xff6060, true);
        continue;
      }
      if(observation.isBleeding()) {
        drawInterval(g, new Interval(day, day+1), 0x800000, true);
        if(day == selectedDay)
          drawInterval(g, new Interval(day, day+1), 0xff0000, true);
        continue;
      }else lastIsBleeding = false;
      if(!observation.hasTemperature())
        continue;
      int x = tx.get(day) + offset;
      int y = ty.get(observation.getTemperature());
      g.setColor(Color.BLACK);
      if (drawLine)
        g.drawLine(prevX + DOT_RADIUS, prevY, x - DOT_RADIUS, y);
      if (day == selectedDay) {
        g.setColor(Color.BLACK);
        drawDot(g, x, y, DOT_RADIUS + 2);
      }
      setMucusColor(g, observation);
      drawDot(g, x, y);
      g.setColor(Color.BLACK);
      fillDot(g, x, y);
      if(observation.isDisturbed()) {
        //draw a red cross
        g.setColor(DISTURBED_CROSS_COLOR);
        int r = DOT_RADIUS+2;
        g.drawLine(x - r, y - r, x + r, y + r);
        g.drawLine(x - r, y + r, x + r, y - r);
View Full Code Here

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

    g.drawLine(0, height-1, getWidth(), height-1);
    if (observations ==null || observations.isEmpty()) {
      return;
    } else {
      try {
        Observation observation = (Observation) observations.elementAt(selectedDay);
        if(observation == null)
          return;
        if(observation.isBleeding())
          g.setColor(Color.RED);
        else
          setMucusColor(g, observation);
        g.fillRect(0, height, getWidth(), detailsHeight);
        g.setColor(Color.BLACK);
View Full Code Here

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

    this.view = (GraphView) v;

    selectCommand = new ActionCommand("${select}", Command.SCREEN, 1) {
      public Navigation execute(Displayable d) throws Exception {
        GraphView view = (GraphView) d;
        Observation observation = view.getSelectedObservation();
        return new Navigation("input", period, observation);
      }
    };
    view.addCommand(selectCommand);
    view.addCommand(new ActionCommand("${enter.new}", Command.SCREEN, 2) {
      public Navigation execute(Displayable d) throws Exception {
        return new Navigation("input", period, new Observation());
      }
    });
    view.addCommand(new ActionCommand("${history}", Command.SCREEN, 5) {
      public Navigation execute(Displayable d) throws Exception {
        return new Navigation("history", period);
      }
    });
    view.addCommand(new ActionCommand("${delete}", Command.SCREEN, 3){
      public Navigation execute(Displayable d) throws Exception {
        Observation observation = view.getSelectedObservation();
        if(observation != null) {
          LogicDAO.removeObservation(controler, observation, period);
          return new Navigation("graph", period, observation);
        }else return null;
      }
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.