Examples of CSVImport


Examples of edu.isi.karma.imp.csv.CSVImport

 
  private Worksheet generateWorksheetFromDelimitedStream(String sourceName, InputStream is,
      Workspace workspace, String encoding, int maxNumLines) throws IOException,
      KarmaException, ClassNotFoundException {
    Worksheet worksheet;
    Import fileImport = new CSVImport(1, 2, ',', '\"', encoding, maxNumLines,
        sourceName, is, workspace, null);

    worksheet = fileImport.generateWorksheet();
    return worksheet;
  }
View Full Code Here

Examples of org.jayasoft.woj.server.servlet.ee.util.CSVImport

    String sep = (String) parameterMap.get("separator"); //$NON-NLS-1$
    File fileToImport = (File) parameterMap.get("fileToImport"); //$NON-NLS-1$
    if(fileToImport == null || !fileToImport.exists()) {
      addWarning("user.file.not.found"); //$NON-NLS-1$
    } else {
      CSVImport imp = new CSVImport(new CSVImport.CSVObjectConstructor() {
        public Object getObjectFromLine(String[] line) {
          if(line.length < 3 || StringUtils.isEmpty(line[0])) {
            return null;
          }
          return new User(line[0],ChecksumUtil.encodeAsString(ChecksumUtil.SHA_1, line[1]), line[2]);
        }
      }, fileToImport.getAbsolutePath());
      Object o []= imp.importEntity(sep != null?sep.charAt(0):';');
      if(ArrayUtils.isEmpty(o)) {
        addWarning("user.nothing.toimport"); //$NON-NLS-1$
      } else {
        User[] users = new User[1];
        for (int i = 0; i < o.length; i++) {
View Full Code Here

Examples of zdenekdrahos.CsvImport.CsvImport

            }
        }
    }

    private Double[][] getExampleInput() throws FileNotFoundException {
        ICsvImport csvImport = new CsvImport();
        IStringToDouble builder = new StringToDouble();
        csvImport.importFile(filePath, 2, ';');
        return builder.parseStringArray(csvImport.iterator());
    }
View Full Code Here

Examples of zdenekdrahos.CsvImport.CsvImport

    private Double[][] data;

    @Override
    public void loadCsvFile(String pathToFile, int columnsCount, char columnSeparator)
            throws FileNotFoundException {
        ICsvImport csvImport = new CsvImport();
        IStringToDouble builder = new StringToDouble();
        csvImport.importFile(pathToFile, columnsCount, columnSeparator);
        data = builder.parseStringArray(csvImport.iterator());
        onDataLoad();
    }
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.