C# Class BExIS.IO.Transform.Input.DataReader

DataReader is an abstract class that has functions for reading and validate the rows.
Convert list of strings to datatuple takes place here. Most of the functions work with a list of strings.
Inheritance: IDataReader
显示文件 Open project: BEXIS2/Core

Protected Properties

Property Type Description
DataStructureVariableIndentifiers List
DataTuples List
DatasetId long
DatasetManager BExIS.Dlm.Services.Data.DatasetManager
SubmitedVariableIdentifiers List
ValueValidationManagerDic ValueValidationManager>.Dictionary
VariableIdentifierRows List>

Public Methods

Method Description
DataReader ( ) : System

FileExist ( string path ) : bool

Open ( string fileName ) : FileStream

If FileStream exist open a FileStream

ReadRow ( List row, int indexOfRow ) : DataTuple

Read Row and convert each value into a variableValue and each row to a Datatuple

ValidateComparisonWithDatatsructure ( List variableIdentifers ) : List

Compare Datastructure with Submited Variables And create a Dictionary of ValueValidationmanagers

ValidateRow ( List row, int indexOfRow ) : List

Validate a row

Protected Methods

Method Description
GetValuesFromRow ( List row, int indexOfRow, List identifiers ) : List

Read Row an return only values in where the variable is in identifiers.

Private Methods

Method Description
createValueValidationManager ( string varName, string dataType, bool optional, DataAttribute variable ) : ValueValidationManager

Create ValueValidationManager of a Variable

getDatastructureAsListOfVariableIdentifers ( ICollection Variables ) : List

Get List of VariableIdentifers converted from Datastructure Variable

getDatastructureVariableIdentifiers ( ) : List

Get VairableIdentifiers from datastructure

getVariableUsage ( VariableIdentifier hv ) : Variable

Get VariableUsage based on VariableIdentifer

Method Details

DataReader() public method

public DataReader ( ) : System
return System

FileExist() public static method

public static FileExist ( string path ) : bool
path string
return bool

GetValuesFromRow() protected method

Read Row an return only values in where the variable is in identifiers.
protected GetValuesFromRow ( List row, int indexOfRow, List identifiers ) : List
row List List of values in one ro
indexOfRow int Currently row index
identifiers List list of variableids
return List

Open() public method

If FileStream exist open a FileStream
public Open ( string fileName ) : FileStream
fileName string
return System.IO.FileStream

ReadRow() public method

Read Row and convert each value into a variableValue and each row to a Datatuple
public ReadRow ( List row, int indexOfRow ) : DataTuple
row List List of values in one row
indexOfRow int Currently row index
return BExIS.Dlm.Entities.Data.DataTuple

ValidateComparisonWithDatatsructure() public method

Compare Datastructure with Submited Variables And create a Dictionary of ValueValidationmanagers
public ValidateComparisonWithDatatsructure ( List variableIdentifers ) : List
variableIdentifers List
return List

ValidateRow() public method

Validate a row
public ValidateRow ( List row, int indexOfRow ) : List
row List List of strings
indexOfRow int Index of row
return List

Property Details

DataStructureVariableIndentifiers protected_oe property

VariableIndentifiers from DataStructure
protected List DataStructureVariableIndentifiers
return List

DataTuples protected_oe property

protected List DataTuples
return List

DatasetId protected_oe property

protected long DatasetId
return long

DatasetManager protected_oe property

protected DatasetManager,BExIS.Dlm.Services.Data DatasetManager
return BExIS.Dlm.Services.Data.DatasetManager

SubmitedVariableIdentifiers protected_oe property

VariableIndentifiers from FileStream
protected List SubmitedVariableIdentifiers
return List

ValueValidationManagerDic protected_oe property

Dictionary with variable id as key and and a ValueValidationManager for each variable
protected Dictionary ValueValidationManagerDic
return ValueValidationManager>.Dictionary

VariableIdentifierRows protected_oe property

protected List> VariableIdentifierRows
return List>