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
ConstructorDescriptionIndexCSV
(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 TypeMethodDescriptionlong
count()
Gives the number of rows, excluding the headervoid
Processes the CSV file line by line importing the documentsMethods inherited from class com.logicaldoc.util.csv.CSVFileReader
close, readFields
Methods 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:
IOException
com.logicaldoc.core.PersistenceException
-
IndexCSV
public IndexCSV(ImportFolderCrawler 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:
IOException
com.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
-