|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.archiviststoolkit.importer.ImportHandler
org.archiviststoolkit.importer.TabImportHandler
public abstract class TabImportHandler
Base class for all CSV derived import handlers.
Field Summary | |
---|---|
protected DomainImportController |
controller
a reference to the domainimport controller. |
static char |
DEFAULT_SEP
The default separator. |
protected java.util.ArrayList |
fieldList
|
Fields inherited from class org.archiviststoolkit.importer.ImportHandler |
---|
file, importController |
Constructor Summary | |
---|---|
TabImportHandler()
Constructor. |
Method Summary | |
---|---|
java.util.ArrayList |
getColumnList()
Get the list of columns. |
java.lang.String |
getSourceApplication()
Get the source application name. |
abstract java.lang.Object |
handleRow(java.util.ArrayList dataList)
Handle a newly parsed row. |
boolean |
importFile(java.io.File file,
DomainImportController domainController,
InfiniteProgressPanel progressPanel)
Import the file. |
boolean |
isAutoCompleteOn()
is autocomplete on. |
abstract java.util.ArrayList |
mapColumn(java.util.ArrayList dataList)
Map a column. |
java.util.ArrayList |
parse(java.lang.String line)
parse: break the input String into fields. |
void |
purify(java.util.ArrayList arrayList)
Clean the datalist. |
void |
readHeaderRecord(java.io.File file)
|
void |
setColumnList(java.util.ArrayList columnList)
Set the list of columns. |
void |
setSourceApplication(java.lang.String sourceApplication)
Set the source application name. |
Methods inherited from class org.archiviststoolkit.importer.ImportHandler |
---|
canImportFile, getFile, getImportController, getInitialChunk, run, startImportThread |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char DEFAULT_SEP
protected DomainImportController controller
protected java.util.ArrayList fieldList
Constructor Detail |
---|
public TabImportHandler()
Method Detail |
---|
public abstract java.util.ArrayList mapColumn(java.util.ArrayList dataList)
dataList
- the datalist
public abstract java.lang.Object handleRow(java.util.ArrayList dataList) throws ImportException, ImportBadLookupException, UnknownLookupListException
dataList
- the datalist map to use
ImportException
ImportBadLookupException
UnknownLookupListException
public java.lang.String getSourceApplication()
public void setSourceApplication(java.lang.String sourceApplication)
sourceApplication
- the name of the source applicationpublic void setColumnList(java.util.ArrayList columnList)
columnList
- the list of columns.public java.util.ArrayList getColumnList()
public boolean isAutoCompleteOn()
public void readHeaderRecord(java.io.File file)
public boolean importFile(java.io.File file, DomainImportController domainController, InfiniteProgressPanel progressPanel) throws ImportException
importFile
in class ImportHandler
file
- the file to import.domainController
- which controller to use.progressPanel
-
ImportException
public java.util.ArrayList parse(java.lang.String line)
line
- the line to parse
public void purify(java.util.ArrayList arrayList)
arrayList
- the list to be cleansed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |