Class IndexCSV

java.lang.Object
com.logicaldoc.util.csv.CSVFile
com.logicaldoc.util.csv.CSVFileReader
com.logicaldoc.importfolder.IndexCSV
All Implemented Interfaces:
Closeable, AutoCloseable

public class IndexCSV extends com.logicaldoc.util.csv.CSVFileReader implements Closeable
An import index file that uses the CSV format instead of the XML
Since:
8.4
Author:
Marco Meschieri - LogicalDOC
  • Constructor Summary

    Constructors
    Constructor
    Description
    IndexCSV(ImportFolderCrawler crawler, ImportFolder importFolder, Map<String,com.logicaldoc.core.metadata.Template> templates, Collection<com.logicaldoc.core.folder.Folder> workspaces, File inputFile)
     
    IndexCSV(ImportFolder importFolder, File inputFile)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Gives the number of rows, excluding the header
    void
    Processes the CSV file line by line importing the documents

    Methods inherited from class com.logicaldoc.util.csv.CSVFileReader

    close, readFields

    Methods inherited from class com.logicaldoc.util.csv.CSVFile

    getFieldSeparator, getTextQualifier, setFieldSeparator, setTextQualifier

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.io.Closeable

    close
  • Constructor Details

  • Method Details

    • count

      public long count() throws IOException
      Gives the number of rows, excluding the header
      Returns:
      the total number of data rows
      Throws:
      IOException - error reading the CSV file
    • importDocuments

      public void importDocuments() throws com.logicaldoc.core.PersistenceException
      Processes the CSV file line by line importing the documents
      Throws:
      com.logicaldoc.core.PersistenceException - error at data layer