public class CSVDocumentImporter
extends org.dice_research.topicmodeling.preprocessing.docsupplier.AbstractDocumentSupplier
| Modifier and Type | Class and Description |
|---|---|
static class |
CSVDocumentImporter.CSVDocumentColumnBinding |
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<Class<? extends org.dice_research.topicmodeling.utils.doc.ParseableDocumentProperty>,Integer> |
columnAssignment |
private static org.slf4j.Logger |
logger |
protected int |
maxColumnId |
protected au.com.bytecode.opencsv.CSVReader |
reader |
| Constructor and Description |
|---|
CSVDocumentImporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyToRead(Class<? extends org.dice_research.topicmodeling.utils.doc.ParseableDocumentProperty> propertyClass,
int columnId) |
void |
addPropertyToRead(CSVDocumentImporter.CSVDocumentColumnBinding binding) |
void |
closeCsvFile() |
org.dice_research.topicmodeling.utils.doc.Document |
getNextDocument() |
void |
openCsvFile(File csvFile) |
void |
openCsvFile(File csvFile,
char separator) |
void |
openCsvFile(File csvFile,
char separator,
char quotechar) |
void |
openCsvFile(File csvFile,
char separator,
char quotechar,
boolean strictQuotes) |
void |
openCsvFile(File csvFile,
char separator,
char quotechar,
char escape) |
void |
openCsvFile(File csvFile,
char separator,
char quotechar,
char escape,
int line) |
void |
openCsvFile(File csvFile,
char separator,
char quotechar,
char escape,
int line,
boolean strictQuotes) |
void |
openCsvFile(File csvFile,
char separator,
char quotechar,
int line) |
getNextDocumentId, setDocumentStartIdprivate static final org.slf4j.Logger logger
protected au.com.bytecode.opencsv.CSVReader reader
protected HashMap<Class<? extends org.dice_research.topicmodeling.utils.doc.ParseableDocumentProperty>,Integer> columnAssignment
protected int maxColumnId
public void openCsvFile(File csvFile) throws FileNotFoundException
csvFile - - name and path of the CSV fileFileNotFoundExceptionpublic void openCsvFile(File csvFile, char separator) throws FileNotFoundException
csvFile - - name and path of the CSV fileseparator - - the delimiter to use for separating entriesFileNotFoundExceptionpublic void openCsvFile(File csvFile, char separator, char quotechar) throws FileNotFoundException
csvFile - - name and path of the CSV fileseparator - - the delimiter to use for separating entriesquotechar - - the character to use for quoted elementsFileNotFoundExceptionpublic void openCsvFile(File csvFile, char separator, char quotechar, boolean strictQuotes) throws FileNotFoundException
csvFile - - name and path of the CSV fileseparator - - the delimiter to use for separating entriesquotechar - - the character to use for quoted elementsstrictQuotes - - sets if characters outside the quotes are ignoredFileNotFoundExceptionpublic void openCsvFile(File csvFile, char separator, char quotechar, char escape) throws FileNotFoundException
csvFile - - name and path of the CSV fileseparator - - the delimiter to use for separating entriesquotechar - - the character to use for quoted elementsescape - - the character to use for escaping a separator or quoteFileNotFoundExceptionpublic void openCsvFile(File csvFile, char separator, char quotechar, char escape, int line) throws FileNotFoundException
csvFile - - name and path of the CSV fileseparator - - the delimiter to use for separating entriesquotechar - - the character to use for quoted elementsescape - - the character to use for escaping a separator or quoteline - - the line number to skip for start readingFileNotFoundExceptionpublic void openCsvFile(File csvFile, char separator, char quotechar, int line) throws FileNotFoundException
csvFile - - name and path of the CSV fileseparator - - the delimiter to use for separating entriesquotechar - - the character to use for quoted elementsline - - the line number to skip for start readingFileNotFoundExceptionpublic void openCsvFile(File csvFile, char separator, char quotechar, char escape, int line, boolean strictQuotes) throws FileNotFoundException
csvFile - - name and path of the CSV fileseparator - - the delimiter to use for separating entriesquotechar - - the character to use for quoted elementsescape - - the character to use for escaping a separator or quoteline - - the line number to skip for start readingstrictQuotes - - sets if characters outside the quotes are ignoredFileNotFoundExceptionpublic org.dice_research.topicmodeling.utils.doc.Document getNextDocument()
public void addPropertyToRead(Class<? extends org.dice_research.topicmodeling.utils.doc.ParseableDocumentProperty> propertyClass, int columnId)
public void addPropertyToRead(CSVDocumentImporter.CSVDocumentColumnBinding binding)
public void closeCsvFile()
Copyright © 2015–2020. All rights reserved.