pl.edu.agh.cast.model.base
Class AbstractDataLoaderWithStatistics

java.lang.Object
  extended by pl.edu.agh.cast.model.base.AbstractDataLoaderWithStatistics
All Implemented Interfaces:
IDataLoader
Direct Known Subclasses:
AbstractModelDataLoader

public abstract class AbstractDataLoaderWithStatistics
extends Object
implements IDataLoader

Author:
AGH CAST Team

Constructor Summary
AbstractDataLoaderWithStatistics()
           
 
Method Summary
 IDataSet loadData(TabularData data, Map<Integer,Integer> modelToDataMapping)
          Converts data into IDataSet.
abstract  IDataSet loadData(TabularData data, Map<Integer,Integer> modelToDataMapping, BrokenDataInfo brokenDataInfo)
          Converts data into IDataSet.
abstract  BrokenDataInfo validateData(TabularData data, Map<Integer,Integer> modelToDataMapping)
          Validates data and creates statistic object which contain all information about input data.
abstract  BrokenRowInfo validateRow(DataRow row, Map<Integer,Integer> modelToDataMapping)
          Check if row cells are correct for attached mapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDataLoaderWithStatistics

public AbstractDataLoaderWithStatistics()
Method Detail

loadData

public IDataSet loadData(TabularData data,
                         Map<Integer,Integer> modelToDataMapping)
Converts data into IDataSet.

Specified by:
loadData in interface IDataLoader
Parameters:
data - to convert
modelToDataMapping - TODO
Returns:
IDataSet object which contains converted data
See Also:
IDataLoader.loadData(pl.edu.agh.cast.rawdata.TabularData, java.util.Map)

loadData

public abstract IDataSet loadData(TabularData data,
                                  Map<Integer,Integer> modelToDataMapping,
                                  BrokenDataInfo brokenDataInfo)
Converts data into IDataSet.

Parameters:
data - data to convert
modelToDataMapping - mapping between input and output data columns
brokenDataInfo - object which contains information about errors and warnings
Returns:
converted data

validateData

public abstract BrokenDataInfo validateData(TabularData data,
                                            Map<Integer,Integer> modelToDataMapping)
Validates data and creates statistic object which contain all information about input data.

Parameters:
data - data to validate
modelToDataMapping - TODO
Returns:
validation statistics, if no errors occurred an empty object is returned

validateRow

public abstract BrokenRowInfo validateRow(DataRow row,
                                          Map<Integer,Integer> modelToDataMapping)
Check if row cells are correct for attached mapping. If row is good then null value is returned. In other case new instance of BrokenRowInfo is returned.

Parameters:
row - - row to validate
modelToDataMapping - - model to data mapping
Returns:
broken row info; null if row is correct


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.