Package edu.isi.karma.imp.csv

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


            fw.write(buffer, 0, length);
            }
          fw.close();
          buf.close();
          logger.info("Created : " + fileName + " by worksheet Id : " this.worksheetId) ;
          Import impCSV = new CSVFileImport(1, 2, ',', ' ', "UTF-8", -1, new File(fileName), workspace, null);
          Worksheet wsht = impCSV.generateWorksheet();
          uc = new UpdateContainer();
            uc.append(WorksheetUpdateFactory.createWorksheetHierarchicalAndCleaningResultsUpdates(wsht.getId(), SuperSelectionManager.DEFAULT_SELECTION));
            new File(fileName).delete();

        } catch (Exception e1) {
View Full Code Here


        if (!csvFiles.isEmpty()) {
            for (File csvFile : csvFiles) {


                try {
                    Import imp = new CSVFileImport(1, 2, ',', '"', encoding, maxNumLines,
                        csvFile, workspace, null);
                    Worksheet wsht = imp.generateWorksheet();

                    if (hasRevisionId()) {
                        Worksheet revisedWorksheet = workspace.getWorksheet(getRevisionId());
                        wsht.setRevisedWorksheet(revisedWorksheet);
                    }
View Full Code Here

  @Override
  protected Import createImport(Workspace workspace) {
    JSONArray tree = generateSelectTree(columnsJson, true);
    try {
      return new CSVFileImport(headerRowIndex, dataStartRowIndex,
          delimiter, quoteCharacter, encoding, maxNumLines,
          getFile(), workspace, tree);
    } catch (IOException e) {
      logger.error("Unable to import csv file: " + e.getMessage());
      return null;
View Full Code Here

  }

  @Override
  protected Import createImport(Workspace workspace, int sampleSize) {
    try {
      return new CSVFileImport(headerRowIndex, dataStartRowIndex,
          delimiter, quoteCharacter, encoding, sampleSize, getFile(),
          workspace, null);
    } catch (IOException e) {
      logger.error("Unable to import csv file: " + e.getMessage());
      return null;
View Full Code Here

TOP

Related Classes of edu.isi.karma.imp.csv.CSVFileImport

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.