Examples of CSVFile


Examples of br.com.objectos.comuns.io.csv.CsvFile

    }
  }

  public static Caracteristica parseString(String text) {
    LocalDate data = new DataParser(text).get();
    CsvFile csvFile = CsvFile.parseString(text);
    return new CaracteristicaParser(text, data, csvFile).get();
  }
View Full Code Here

Examples of br.com.objectos.comuns.io.csv.CsvFile

    this.data = data;
    this.registros = ImmutableList.copyOf(registros);
  }

  public static Caracteristica of(File file) {
    CsvFile csvFile = CsvFile.parse(file);
    return new CaracteristicaParser(csvFile).get();
  }
View Full Code Here

Examples of br.com.objectos.comuns.io.csv.CsvFile

    }
  }

  static Caracteristica parseString(String text) {
    LocalDate data = new DataParser(text).get();
    CsvFile csvFile = CsvFile.parseString(text);
    return new CaracteristicaParser(data, csvFile).get();
  }
View Full Code Here

Examples of br.com.objectos.comuns.io.csv.CsvFile

      parser.configureXls(xls);
      return new TableReaderXls<T>(xls, parser, filter);

    } catch (IllegalArgumentException e) {
      CsvFile csv = CsvFile
          .parse(stream)
          .from(this)
          .skipFirstLines(skip);

      parser.configureCsv(csv);
View Full Code Here

Examples of br.com.objectos.comuns.io.csv.CsvFile

    this.registros = ImmutableList.copyOf(registros);
  }

  public static Caracteristica of(File file) {
    LocalDate data = new DataParser(file).get();
    CsvFile csvFile = CsvFile.parse(file);
    return new CaracteristicaParser(data, csvFile).get();
  }
View Full Code Here

Examples of com.bbn.openmap.io.CSVFile

    protected void loadTiles(String csvFileName) {
        int imageCount = 0;

        if (csvFileName != null) {
            try {
                tilefile = new CSVFile(csvFileName);
                tilefile.setHeadersExist(fileHasHeader);
                tilefile.loadData(false);
                // MediaTracker tracker = new MediaTracker(component); // Create
                // a media tracker
View Full Code Here

Examples of com.bbn.openmap.io.CSVFile

        Hashtable library = new Hashtable();
        // Create location data
        if (locationFile != null && nameIndex != -1) {
            Debug.message("scenario", "Reading location file...");
            try {
                CSVFile locations = new CSVFile(locationFile);
                locations.loadData();
                Iterator records = locations.iterator();
                while (records.hasNext()) {
                    String name = null;
                    String icon = null;
                    Vector record = (Vector) records.next();

                    if (record.size() == 0)
                        continue;

                    name = (String) record.elementAt(nameIndex);

                    if (iconIndex != -1) {
                        icon = (String) record.elementAt(iconIndex);
                    }

                    if (name != null) {
                        ScenarioPoint location = new ScenarioPoint(name, icon);
                        location.setShowName(showNames);
                        drawingAttributes.setTo(location);
                        library.put(name.intern(), location);
                        list.add(location);
                    } else {
                        Debug.error("ScenaroGraphicLoader: no name to use to create location: "
                                + name);
                    }
                }
            } catch (MalformedURLException murle) {
                Debug.error("ScenarioGraphicLoader: problem finding the location file: "
                        + locationFile);
                return list;
            } catch (ArrayIndexOutOfBoundsException aioobe) {
                Debug.error("ScenarioGraphicLoader: problem with parsing location file: "
                        + locationFile);
                if (Debug.debugging("scenario")) {
                    Debug.output("The problem is with one of the indexes into the file: \n"
                            + aioobe.getMessage());
                    aioobe.printStackTrace();
                }
            } catch (NullPointerException npe) {
                Debug.error("ScenarioGraphicLoader ("
                        + getName()
                        + ") null pointer exception, most likely a problem finding the organization data file");
            }
        } else {
            Debug.error("ScenarioGraphicLoader(" + getName()
                    + "): Location file (" + locationFile + ") not configured.");
            return list;
        }

        // OK, got the locations built up, need to fill up the
        // scenario
        // Create location data
        if (activityFile != null && activityNameIndex != -1 && latIndex != -1
                && lonIndex != -1 && timeIndex != -1) {
            Debug.message("scenario", "Reading activity file...");
            try {
                CSVFile activities = new CSVFile(activityFile);
                activities.loadData(); // numbers as strings == false
                Iterator records = activities.iterator();
                while (records.hasNext()) {
                    String name = null;
                    float lat;
                    float lon;
                    long time;
View Full Code Here

Examples of com.qspin.qtaste.io.CSVFile

    }
    public int getTestcaseCount() {
        File testDataFileName = new File(f + File.separator + StaticConfiguration.TEST_DATA_FILENAME);
        try {
            CSVFile testDataFile = new CSVFile(testDataFileName);
            return testDataFile.getCSVDataSet().size();
        } catch (FileNotFoundException ex) {
            //
            return -1;
        } catch (IOException ex) {
            //
View Full Code Here

Examples of com.qspin.qtaste.io.CSVFile

        File testDataFile = new File(f + File.separator + StaticConfiguration.TEST_DATA_FILENAME);
        if (!testScriptFile.canRead() || !testDataFile.canRead()) {
            return false;
        }
        try {
            CSVFile csvFile = new CSVFile(testDataFile);
            return !csvFile.getCSVDataSet().isEmpty();
        } catch (Exception ex) {
            return false;
        }
    }   
View Full Code Here

Examples of com.qspin.qtaste.io.CSVFile

            try {
                ArrayList<TestDataNode> arrayDataNode = new ArrayList<TestDataNode>();
                // load test case data
                File tcDataFile = this.getPythonTestScript().getTestcaseData();
                if (tcDataFile== null) return new Object[]{};
                CSVFile csvDataFile = new CSVFile(tcDataFile);
                List<LinkedHashMap<String, String>> data = csvDataFile.getCSVDataSet();
                Iterator<LinkedHashMap<String, String>> it = data.iterator();
                int rowIndex = 1;
                while (it.hasNext()) {
                    LinkedHashMap<String, String> dataRow = it.next();
                    if (dataRow.containsKey("COMMENT")) {
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.