|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.rawdata.stat.BrokenDataInfo
public class BrokenDataInfo
Class which represents information about broken data in TabularData object. It contains list of DataRow objects
mapped to corresponding BrokenRowInfo objects.
It contains statistics after data validation: all rows number, errors number, error rows number, etc. It is returned
as a result of DataLoaderWithStatistics.validate()
method.
Constructor Summary | |
---|---|
BrokenDataInfo(TabularData inputData)
Default constructor. |
Method Summary | |
---|---|
void |
addBrokenRowInfo(BrokenRowInfo brokenRowInfo)
Adds information about broken row in TabularData. |
List<BrokenCellInfo> |
getBrokenCells()
Returns list of all broken cells. |
List<BrokenCellInfo> |
getBrokenCellsByType(ErrorType errorType)
Returns list of BrokenCellInfo objects which are not removed. |
List<BrokenCellInfo> |
getBrokenCellsRelatedTo(DataRow row)
Returns list of BrokenCellInfo related to input row. |
BrokenRowInfo |
getBrokenRowInfo(DataRow row)
Returns broken row info associated with the specified row. |
int |
getBrokenRowsCount()
|
int |
getErrorsCount()
|
Map<ErrorType,Integer> |
getErrorTypesWithOccurrences()
Gets returns type mapped to number of occurrences in associated TabularData object. |
int |
getRowsCount()
|
int |
getWarningsCount()
|
void |
registerObserver(IRawDataObserver observer)
Registers a new observer. |
void |
removeBrokenRowInfo(BrokenRowInfo brokenRowInfo)
Removes row specified by specified BrokenRowInfo object. |
BrokenRowInfo |
removeDataRow(DataRow row)
Removed the specified row. |
void |
replaceBrokenRowInfo(DataRow row,
BrokenRowInfo newValue)
Replaces information about data row which is in newValue object. |
BrokenRowInfo |
restoreDataRow(int rowNumber)
Restores row with specified row number. |
void |
unregisterObserver(IRawDataObserver observer)
Unregisters an existing observer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BrokenDataInfo(TabularData inputData)
inputData
- TabularData which will be described by created object.Method Detail |
---|
public void addBrokenRowInfo(BrokenRowInfo brokenRowInfo)
brokenRowInfo
- information about broken row to be added to data info objectpublic BrokenRowInfo removeDataRow(DataRow row)
removeBrokenRowInfo
is
called, otherwise row is removed straightforward from data. The deleted row is cached and can be restored using
method restoreDataRow
row
- row to be deleted
public List<BrokenCellInfo> getBrokenCellsRelatedTo(DataRow row)
BrokenCellInfo
related to input row.
row
- data row
public void removeBrokenRowInfo(BrokenRowInfo brokenRowInfo)
BrokenRowInfo
object. The source object is deleted from
TabularData. The broken row info object is cached for undo action.
brokenRowInfo
- broken row info object which indicated which row should be deleted.public BrokenRowInfo restoreDataRow(int rowNumber)
rowNumber
- row number to be restored
public void replaceBrokenRowInfo(DataRow row, BrokenRowInfo newValue)
row
- row with errors or warnings which broken info will be replacednewValue
- value new broken row info; if null
the method is equal to
removeBrokenRowInfo(_brokenRows.get(row))
public List<BrokenCellInfo> getBrokenCells()
public BrokenRowInfo getBrokenRowInfo(DataRow row)
row
- data row object
public Map<ErrorType,Integer> getErrorTypesWithOccurrences()
public List<BrokenCellInfo> getBrokenCellsByType(ErrorType errorType)
BrokenCellInfo
objects which are not removed.
errorType
- type of error
public int getErrorsCount()
public int getWarningsCount()
public int getBrokenRowsCount()
public int getRowsCount()
public void registerObserver(IRawDataObserver observer)
registerObserver
in interface IRawDataMonitorable
observer
- an observer to register; it cannot be null
registerObserver(pl.edu.agh.cast.rawdata.logging.IRawDataObserver)
public void unregisterObserver(IRawDataObserver observer)
unregisterObserver
in interface IRawDataMonitorable
observer
- an observer to unregisterunregisterObserver(pl.edu.agh.cast.rawdata.logging.IRawDataObserver)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |