Class CodeListCSVReader
- java.lang.Object
-
- org.openforis.collect.io.metadata.parsing.DataImportReader<T>
-
- org.openforis.collect.io.metadata.parsing.CSVDataImportReader<CodeListLine>
-
- org.openforis.collect.manager.codelistimport.CodeListCSVReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CodeListCSVReader extends CSVDataImportReader<CodeListLine>
- Author:
- S. Ricci
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCodeListCSVReader.CodeListCSVLineParserstatic classCodeListCSVReader.ColumnInfostatic classCodeListCSVReader.ColumnsInfo
-
Field Summary
Fields Modifier and Type Field Description static StringCODE_COLUMN_SUFFIXstatic StringDESCRIPTION_COLUMN_SUFFIXstatic StringFLAT_LIST_CODE_COLUMN_NAMEstatic StringFLAT_LIST_LABEL_COLUMN_NAMEstatic StringLABEL_COLUMN_SUFFIXstatic StringQUALIFIABLE_COLUMN_SUFFIX-
Fields inherited from class org.openforis.collect.io.metadata.parsing.CSVDataImportReader
csvReader, currentCSVLine
-
Fields inherited from class org.openforis.collect.io.metadata.parsing.DataImportReader
currentLine
-
-
Constructor Summary
Constructors Constructor Description CodeListCSVReader(File file, CSVFileOptions csvFileOptions, List<String> languages, String defaultLanguage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CodeListCSVReader.CodeListCSVLineParsercreateLineParserInstance()CodeListCSVReader.ColumnsInfogetColumnsInfo()StringgetDefaultLanguage()List<String>getLanguages()List<String>getLevels()protected voidreadHeaders()booleanvalidateAllFile()-
Methods inherited from class org.openforis.collect.io.metadata.parsing.CSVDataImportReader
close, getColumnNames, getLinesRead, init, isReady, readNextLine, size
-
Methods inherited from class org.openforis.collect.io.metadata.parsing.DataImportReader
getCurrentLine, parseCurrentLine
-
-
-
-
Field Detail
-
FLAT_LIST_CODE_COLUMN_NAME
public static final String FLAT_LIST_CODE_COLUMN_NAME
- See Also:
- Constant Field Values
-
FLAT_LIST_LABEL_COLUMN_NAME
public static final String FLAT_LIST_LABEL_COLUMN_NAME
- See Also:
- Constant Field Values
-
CODE_COLUMN_SUFFIX
public static final String CODE_COLUMN_SUFFIX
- See Also:
- Constant Field Values
-
LABEL_COLUMN_SUFFIX
public static final String LABEL_COLUMN_SUFFIX
- See Also:
- Constant Field Values
-
DESCRIPTION_COLUMN_SUFFIX
public static final String DESCRIPTION_COLUMN_SUFFIX
- See Also:
- Constant Field Values
-
QUALIFIABLE_COLUMN_SUFFIX
public static final String QUALIFIABLE_COLUMN_SUFFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CodeListCSVReader
public CodeListCSVReader(File file, CSVFileOptions csvFileOptions, List<String> languages, String defaultLanguage) throws IOException, ParsingException
- Throws:
IOExceptionParsingException
-
-
Method Detail
-
readHeaders
protected void readHeaders() throws IOException- Overrides:
readHeadersin classCSVDataImportReader<CodeListLine>- Throws:
IOException
-
createLineParserInstance
protected CodeListCSVReader.CodeListCSVLineParser createLineParserInstance()
- Specified by:
createLineParserInstancein classDataImportReader<CodeListLine>
-
validateAllFile
public boolean validateAllFile() throws ParsingException- Specified by:
validateAllFilein classDataImportReader<CodeListLine>- Throws:
ParsingException
-
getColumnsInfo
public CodeListCSVReader.ColumnsInfo getColumnsInfo()
-
getDefaultLanguage
public String getDefaultLanguage()
-
-