Package gov.nara.nwts.ftapp.stats

Examples of gov.nara.nwts.ftapp.stats.Stats


    try {
      BufferedReader br = new BufferedReader(new FileReader(selectedFile));
      int i=1000000;
      for(String line=br.readLine(); line!=null; line=br.readLine()){
        String key = ""+ (i++);
        Stats stats = new Stats(key);
        types.put(key, stats);
        Matcher m = test(line);
        setVals(m, stats, line);
      }
      br.close();
View Full Code Here


      colcount = Math.max(colcount,cols.size());
      String key = cols.get(0);
      if (forceKey) {
        key = "" + (rowKey++);
      }
      Stats stats = new Stats(key);
      if (forceKey) {
        stats.vals.add(cols.get(0));
      }
      for(int i=1; i<cols.size(); i++){
        stats.vals.add(cols.get(i));
View Full Code Here

    return true;
  }

  public void checkFile(File thefile, FileTest fileTest) {
    if (fileTest.isTestable(thefile)){
      Stats mystats = fileTest.getStats(thefile);
      if (mystats!=null){
        mystats.compute(thefile, fileTest);
      }
    }
  }
View Full Code Here

      }
    }
  }
  public void checkDirFile(File thefile, FileTest fileTest) {
    if (fileTest.isTestable(thefile)){
      Stats mystats = fileTest.getStats(thefile);
      mystats.compute(thefile, fileTest);
    }
  }
View Full Code Here

    FileReader fr = new FileReader(selectedFile);
    BufferedReader br = new BufferedReader(fr);
    for(String line=br.readLine(); line!=null; line=br.readLine()){
      File f=new File(line);
      String s = f.getName();
      Stats stats = new Stats(s);
      types.put(s,stats);
    }     
    return new ActionResult(selectedFile, selectedFile.getName(), this.toString(), details, types, true, timer.getDuration());
  }
View Full Code Here

          nf.setGroupingUsed(false);
          if (pad.getSelectedItem() instanceof Integer) {
            nf.setMinimumIntegerDigits((Integer)pad.getSelectedItem());
          }
          String key = prefix.getText() + nf.format(i) + suffix.getText();
          Stats stats = new Stats(key);
          stats.vals.add(1);
          types.put(key, stats);
        }
        parent.showSummary("Generated "+(++parent.summaryCount), details, types, true);
      }
View Full Code Here

  public Stats getStats(File f) {
    return getStats(getKey(f));
  }

  public Stats getStats(String key) {
    Stats mystats = dt.types.get(key);
    if (mystats == null) {
      mystats = createStats(key);
    }
    dt.types.put(key, mystats);
   
View Full Code Here

    String path = f.getAbsolutePath();
    return path;
  }

  public Stats createStats(String key) {
    Stats stats = new Stats(key) {
      public Object compute(File f, FileTest fileTest) {
        vals.set(0, f.getName());
        return f.getName();
      }
    };
View Full Code Here

  }
  public String getKey(File f) {
    return f.getAbsolutePath();
  }
    public Stats createStats(String key){
      Stats stats = new RandomStats(key);
      stats.vals.add(YN.N);
      return stats;
    }
View Full Code Here

    AQL aql = (AQL)getProperty(LAQL);
    int batchSize = dt.types.size();
    int sampleSize = aql.getSampleSize(batchSize);
   
    for(Iterator<String>i=keySet.values().iterator(); i.hasNext(); ){
      Stats stats = dt.types.get(i.next());
      stats.vals.set(0, (count< sampleSize) ? YN.Y : YN.N);
      count++;
    }
    keySet.clear();
  }
View Full Code Here

TOP

Related Classes of gov.nara.nwts.ftapp.stats.Stats

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.