Package org.deidentifier.arx.io
Klasse ImportAdapterExcel
java.lang.Object
org.deidentifier.arx.io.ImportAdapter
org.deidentifier.arx.io.ImportAdapterExcel
Import adapter for Excel files
This adapter can import data from Excel files. It handles both XLS and XLSX
files. The file type itself is defined by
ImportConfigurationExcel.
The files are accessed using Apache POI.- Siehe auch:
-
Feldübersicht
Von Klasse geerbte Felder org.deidentifier.arx.io.ImportAdapter
dataTypes, header, indexes -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedCreates a new instance of this object with given configuration Depending upon the file type it either uses HSSF or XSSF to access the file. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected int[]Returns an array with indexes of columns that should be imported Only columns listed withinwill be imported.Ungültige Referenz
#columnintReturns the percentage of data that has already been returned The basis for this calculation is the row currently being accessed.booleanhasNext()Indicates whether there is another element to return This returns true when the file contains another line, which could be accessed byiterator.String[]next()Returns the next row The returned element is sorted as defined byand contains as many elements as there are columns selected to import fromUngültige Referenz
ImportColumn#indexImportAdapter.indexes.voidremove()Dummy.Von Klasse geerbte Methoden org.deidentifier.arx.io.ImportAdapter
create, getColumnDatatypes, getConfig, getHeader, getLengthVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden java.util.Iterator
forEachRemaining
-
Konstruktordetails
-
ImportAdapterExcel
Creates a new instance of this object with given configuration Depending upon the file type it either uses HSSF or XSSF to access the file. In both casesiteratorwill be assigned a reference to an iterator, which can then be used to access the actual data on a row by row basis.- Parameter:
config-config- Löst aus:
IOException- In case file doesn't contain actual data
-
-
Methodendetails
-
getProgress
public int getProgress()Returns the percentage of data that has already been returned The basis for this calculation is the row currently being accessed.- Angegeben von:
getProgressin KlasseImportAdapter- Gibt zurück:
-
hasNext
public boolean hasNext()Indicates whether there is another element to return This returns true when the file contains another line, which could be accessed byiterator.- Gibt zurück:
-
next
Returns the next row The returned element is sorted as defined byand contains as many elements as there are columns selected to import fromUngültige Referenz
ImportColumn#indexImportAdapter.indexes. The first row will always contain the names of the columns.headerReturnedis used to keep track of that.- Gibt zurück:
-
remove
public void remove()Dummy. -
getIndexesToImport
protected int[] getIndexesToImport()Returns an array with indexes of columns that should be imported Only columns listed withinwill be imported. This iterates over the list of columns and returns an array with indexes of columns that should be imported.Ungültige Referenz
#column- Gibt zurück:
- Array containing indexes of columns that should be imported
-