Package com.logicaldoc.importfolder
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 importer, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcount()Gives the number of rows, excluding the headervoidimportDocuments()Processes the CSV file line by line importing the documents-
Methods inherited from class com.logicaldoc.util.csv.CSVFile
getFieldSeparator, getTextQualifier, setFieldSeparator, setTextQualifier
-
-
-
-
Constructor Detail
-
IndexCSV
public IndexCSV(ImportFolder importFolder, File inputFile) throws IOException, com.logicaldoc.core.PersistenceException
- Throws:
IOExceptioncom.logicaldoc.core.PersistenceException
-
IndexCSV
public IndexCSV(ImportFolderCrawler importer, ImportFolder importFolder, Map<String,com.logicaldoc.core.metadata.Template> templates, Collection<com.logicaldoc.core.folder.Folder> workspaces, File inputFile) throws IOException, com.logicaldoc.core.PersistenceException
- Throws:
IOExceptioncom.logicaldoc.core.PersistenceException
-
-
Method Detail
-
count
public long count() throws IOExceptionGives 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.PersistenceExceptionProcesses the CSV file line by line importing the documents- Throws:
com.logicaldoc.core.PersistenceException- error at data layer
-
-