Class CodeListImportProcess
- java.lang.Object
-
- org.openforis.collect.manager.process.AbstractProcess<Void,CodeListImportStatus>
-
- org.openforis.collect.manager.codelistimport.CodeListImportProcess
-
public class CodeListImportProcess extends AbstractProcess<Void,CodeListImportStatus>
Deprecated.UseCodeListImportJobinstead- Author:
- S. Ricci
-
-
Field Summary
-
Fields inherited from class org.openforis.collect.manager.process.AbstractProcess
status
-
-
Constructor Summary
Constructors Constructor Description CodeListImportProcess(CodeListManager codeListManager, CodeList codeList, String langCode, File file, boolean overwriteData)Deprecated.CodeListImportProcess(CodeListManager codeListManager, CodeList codeList, String langCode, File file, CSVFileOptions csvFileOptions, boolean overwriteData)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddDifferentLabelError(CodeListLine line, int levelIdx, String lang)Deprecated.protected voidaddDuplicateCodeError(CodeListLine line, int levelIdx)Deprecated.protected voidaddEmptyCodeColumnError(CodeListLine line, int levelIdx)Deprecated.protected voidaddLevelsToCodeList()Deprecated.protected voidaddMissingDefaultLanguageLabelError(CodeListLine line, int levelIdx)Deprecated.protected voidfillItem(CodeListItem item, String code, List<LanguageSpecificText> labelItems, List<LanguageSpecificText> descriptionItems)Deprecated.protected CodeListItemgetChildItem(CodeListItem parentItem, String code)Deprecated.protected CodeListItemgetCodeListItemInDescendants(String code)Deprecated.protected booleanhasDifferentLabel(String code, LanguageSpecificText item, CodeListItem parentItem)Deprecated.voidinit()Deprecated.protected voidinitStatus()Deprecated.protected booleanisDuplicate(String code, CodeListItem parentItem)Deprecated.Returns when: not is leaf but has different label than existing node with same code or is leaf and: - LOCAL scope and exist item with same code at the same level - SCHEME scope and exist item with same code in some levelprotected voidparseCSVLines()Deprecated.protected voidprocessFile()Deprecated.protected CodeListItemprocessLevel(CodeListItem parent, CodeListLine line, int levelIdx, boolean lastLevel)Deprecated.protected voidsaveData()Deprecated.voidstartProcessing()Deprecated.protected voidvalidateParameters()Deprecated.-
Methods inherited from class org.openforis.collect.manager.process.AbstractProcess
call, cancel, getStatus
-
-
-
-
Constructor Detail
-
CodeListImportProcess
public CodeListImportProcess(CodeListManager codeListManager, CodeList codeList, String langCode, File file, boolean overwriteData)
Deprecated.
-
CodeListImportProcess
public CodeListImportProcess(CodeListManager codeListManager, CodeList codeList, String langCode, File file, CSVFileOptions csvFileOptions, boolean overwriteData)
Deprecated.
-
-
Method Detail
-
init
public void init()
Deprecated.- Overrides:
initin classAbstractProcess<Void,CodeListImportStatus>
-
validateParameters
protected void validateParameters()
Deprecated.
-
initStatus
protected void initStatus()
Deprecated.- Specified by:
initStatusin classAbstractProcess<Void,CodeListImportStatus>
-
startProcessing
public void startProcessing() throws ExceptionDeprecated.- Specified by:
startProcessingin interfaceProcess<Void>- Overrides:
startProcessingin classAbstractProcess<Void,CodeListImportStatus>- Throws:
Exception
-
processFile
protected void processFile() throws IOExceptionDeprecated.- Throws:
IOException
-
saveData
protected void saveData()
Deprecated.
-
parseCSVLines
protected void parseCSVLines()
Deprecated.
-
processLevel
protected CodeListItem processLevel(CodeListItem parent, CodeListLine line, int levelIdx, boolean lastLevel)
Deprecated.
-
isDuplicate
protected boolean isDuplicate(String code, CodeListItem parentItem)
Deprecated.Returns when: not is leaf but has different label than existing node with same code or is leaf and: - LOCAL scope and exist item with same code at the same level - SCHEME scope and exist item with same code in some level- Parameters:
code-parentItem-lastLevel-- Returns:
-
hasDifferentLabel
protected boolean hasDifferentLabel(String code, LanguageSpecificText item, CodeListItem parentItem)
Deprecated.
-
getChildItem
protected CodeListItem getChildItem(CodeListItem parentItem, String code)
Deprecated.
-
addEmptyCodeColumnError
protected void addEmptyCodeColumnError(CodeListLine line, int levelIdx)
Deprecated.
-
addDuplicateCodeError
protected void addDuplicateCodeError(CodeListLine line, int levelIdx)
Deprecated.
-
addDifferentLabelError
protected void addDifferentLabelError(CodeListLine line, int levelIdx, String lang)
Deprecated.
-
addMissingDefaultLanguageLabelError
protected void addMissingDefaultLanguageLabelError(CodeListLine line, int levelIdx)
Deprecated.
-
getCodeListItemInDescendants
protected CodeListItem getCodeListItemInDescendants(String code)
Deprecated.
-
fillItem
protected void fillItem(CodeListItem item, String code, List<LanguageSpecificText> labelItems, List<LanguageSpecificText> descriptionItems)
Deprecated.
-
addLevelsToCodeList
protected void addLevelsToCodeList()
Deprecated.
-
-