|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
java.util.LinkedList<DataRow>
pl.edu.agh.cast.importer.base.data.TabularData
public class TabularData
Class, which represents the data read from the source data file in a form of a table with already-analyzed records.
It extends LinkedList of DataRows.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
TabularData()
The default constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
|
TabularData |
copyDataLeavingColumns(List<Integer> colIndices)
Copies the current tabular data, leaving only the columns with the specified column indices. |
boolean |
equals(Object obj)
|
IAnalyzer |
getColumnAnalyzer(int index)
Returns IAnalyzer for column from input index. |
List<String> |
getColumnCaptions()
Retrieves the captions of columns of the tabular data. |
int |
getColumnsCount()
Retrieves the number of columns of the tabular data. |
List<Class<?>> |
getColumnTypes()
Retrieves the column types of the tabular data columns. |
List<String> |
getFormatters()
Retrieves the formatters of the tabular data columns. |
int |
getHeaderRowIdx()
|
int |
getInputColumnForIndex(int index)
Sets the input column reference for column with specified index. |
List<IImportDataObserver> |
getObservers()
Retrieves the list of all registered observers. |
DataRow |
getRowByIndex(int rowIndex)
Retrieves row with specified index. |
int |
hashCode()
|
boolean |
isRedoAvailable()
Checks whether the redo operation is available. |
boolean |
isUndoAvailable()
Checks whether the undo operation is available. |
List<DataRow> |
redoOperation()
Redoes row removal operation by removing again the rows that had previously been removed and restored with use of an undo operation. |
void |
registerObserver(IImportDataObserver observer)
Registers a new observer. |
DataRow |
remove(int row)
|
boolean |
remove(Object obj)
|
DataRow |
removeFirst()
|
void |
removeHeaderRow()
Removes the data header row. |
DataRow |
removeLast()
|
void |
removeRows(List<DataRow> rows)
Delegate method with default ignored flag set to true. |
void |
removeRows(List<DataRow> rows,
boolean ignored)
Removes list of data rows and either saves them to an undo cache in order for an undo operation to be available (if the ignored flag is not set), or saves the rows to the ignored rows cache in order for them to be available if the ignored option is turned off. |
DataRow |
removeRowWithIndex(int rowIndex)
Removes row with specified index. |
List<DataRow> |
restoreIgnoredRows(int rowCount)
Restores a specified number of ignored data rows. |
TabularData |
retrieveDataPreview(int size)
Retrieves tabular data preview of specified size (number of data rows to include in the preview). |
void |
setColumnCaptions(List<String> captions)
Sets the column captions for the tabular data columns. |
void |
setColumns(List<TabularDataColumn> columns)
|
void |
setFormatters(List<String> formatters)
Sets the formatters for the tabular data columns. |
void |
setHeaderRowIdx(int rowIdx)
|
List<DataRow> |
undoOperation()
Undoes row removal operation by restoring the rows that were removed last. |
void |
unregisterObserver(IImportDataObserver observer)
Unregisters an existing observer. |
| Methods inherited from class java.util.LinkedList |
|---|
add, add, addAll, addAll, addFirst, addLast, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, removeFirstOccurrence, removeLastOccurrence, set, size, toArray, toArray |
| Methods inherited from class java.util.AbstractSequentialList |
|---|
iterator |
| Methods inherited from class java.util.AbstractList |
|---|
listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, isEmpty, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
add, add, addAll, addAll, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, retainAll, set, size, subList, toArray, toArray |
| Methods inherited from interface java.util.Deque |
|---|
iterator |
| Constructor Detail |
|---|
public TabularData()
| Method Detail |
|---|
public void registerObserver(IImportDataObserver observer)
registerObserver in interface IImportDataMonitorableobserver - the observer to register#registerObserver(pl.edu.agh.cast.importer.base.logging.IImportDataObserver)public void unregisterObserver(IImportDataObserver observer)
unregisterObserver in interface IImportDataMonitorableobserver - the observer to unregister#unregisterObserver(pl.edu.agh.cast.importer.base.logging.IImportDataObserver)public List<IImportDataObserver> getObservers()
getObservers in interface IImportDataMonitorableIImportDataMonitorable.getObservers()public List<DataRow> undoOperation()
public List<DataRow> redoOperation()
public void removeRows(List<DataRow> rows,
boolean ignored)
rows - the rows to be removedignored - flag indicating whether the removed rows should be ignored (or deleted)public void removeRows(List<DataRow> rows)
ignored flag set to true.
removeRows(List, boolean)public List<DataRow> restoreIgnoredRows(int rowCount)
rowCount - the number of rows to restore
public TabularData copyDataLeavingColumns(List<Integer> colIndices)
colIndices - the indices of columns to leave in the copied tabular data
public TabularData retrieveDataPreview(int size)
size - the preview size
public DataRow removeRowWithIndex(int rowIndex)
rowIndex - the index of row to be removed
public DataRow getRowByIndex(int rowIndex)
rowIndex - the index of row to be returned
public void removeHeaderRow()
public boolean equals(Object obj)
equals in interface Collection<DataRow>equals in interface List<DataRow>equals in class AbstractList<DataRow>AbstractList.equals(java.lang.Object)public int hashCode()
hashCode in interface Collection<DataRow>hashCode in interface List<DataRow>hashCode in class AbstractList<DataRow>AbstractList.hashCode()public DataRow remove(int row)
remove in interface List<DataRow>remove in class LinkedList<DataRow>LinkedList.remove(int)public boolean remove(Object obj)
remove in interface Collection<DataRow>remove in interface Deque<DataRow>remove in interface List<DataRow>remove in class LinkedList<DataRow>LinkedList.remove(java.lang.Object)public DataRow removeFirst()
removeFirst in interface Deque<DataRow>removeFirst in class LinkedList<DataRow>LinkedList.removeFirst()public DataRow removeLast()
removeLast in interface Deque<DataRow>removeLast in class LinkedList<DataRow>LinkedList.removeLast()public void clear()
clear in interface Collection<DataRow>clear in interface List<DataRow>clear in class LinkedList<DataRow>LinkedList.clear()public int getColumnsCount()
getColumnsCount in interface ITabularData<DataRow>ITabularData.getColumnsCount()public List<String> getColumnCaptions()
getColumnCaptions in interface ITabularData<DataRow>ITabularData.getColumnCaptions()public List<Class<?>> getColumnTypes()
public void setFormatters(List<String> formatters)
formatters - the column formatterspublic List<String> getFormatters()
public IAnalyzer getColumnAnalyzer(int index)
IAnalyzer for column from input index.
index - column index
public int getInputColumnForIndex(int index)
index - the column index
public void setColumnCaptions(List<String> captions)
captions - the column captionspublic boolean isUndoAvailable()
true if undo available, false otherwisepublic boolean isRedoAvailable()
true if redo available, false otherwisepublic void setColumns(List<TabularDataColumn> columns)
public void setHeaderRowIdx(int rowIdx)
public int getHeaderRowIdx()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||