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
An import index file that uses the CSV format instead of the XML
- Since:
- 8.4
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
ConstructorsConstructorDescriptionIndexCSV(Crawler 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 TypeMethodDescriptionlongcount()Gives the number of rows, excluding the headervoidProcesses the CSV file line by line importing the documentsMethods inherited from class com.logicaldoc.util.csv.CSVFileReader
close, readFieldsMethods inherited from class com.logicaldoc.util.csv.CSVFile
getFieldSeparator, getTextQualifier, setFieldSeparator, setTextQualifier
-
Constructor Details
-
IndexCSV
public IndexCSV(ImportFolder importFolder, File inputFile) throws IOException, com.logicaldoc.core.PersistenceException - Throws:
IOExceptioncom.logicaldoc.core.PersistenceException
-
IndexCSV
public IndexCSV(Crawler crawler, 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 Details
-
count
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.PersistenceExceptionProcesses the CSV file line by line importing the documents- Throws:
com.logicaldoc.core.PersistenceException- error at data layer
-