C# Class Azavea.NijPredictivePolicing.ACSAlchemistLibrary.FileFormats.DesiredColumnsReader

Input should be a csv list of (CENSUS_TABLE_ID, Name) pairs, where: CENSUS_TABLE_ID: is a foreign key into columnMappings.CENSUS_TABLE_ID Name: is an optional alias
Inheritance: CommaSeparatedValueReader
Datei anzeigen Open project: azavea/acs-alchemist Class Usage Examples

Public Properties

Property Type Description
tempTableName string

Public Methods

Method Description
ImportDesiredVariables ( DbConnection conn, IDataClient client, string filename, string tablename ) : bool

RemoveTemporaryTable ( DbConnection conn, IDataClient client ) : void

Protected Methods

Method Description
ReadVariablesFile ( string filename, DataTable dt ) : DataTable
SaveTable ( DbConnection conn, IDataClient client, DataTable dt ) : bool
SetupTable ( DbConnection conn, IDataClient client, string tablename ) : DataTable

Private Methods

Method Description
AddIntToDict ( Dictionary dict, int line ) : void

Helper function for ImportDesiredVariables

CheckForDuplicates ( DataTable dt ) : string
CheckForMOEDuplicates ( DataTable dt ) : string

Generates an error if a generated column conflicts with another generated column, or a real column.

CheckForMaxColumns ( DataTable dt ) : string

To keep things simple, lets say the max # of columns in a shapefile is 256, so 100 vars * 2 (var + error margin) == 200 columns, we don't need to test for room for the extra "AREA/PERIMETER/CENTROID" mode, unless we change our max from 100 columns. The extra room is to try and avoid running out of memory during an export.

CheckForMinColumns ( DataTable dt ) : string
CheckForReserved ( DataTable dt ) : string
IfSetAddIntToDict ( HashSet set, Dictionary dict, int line ) : void

Helper function for ImportDesiredVariables

Method Details

ImportDesiredVariables() public method

public ImportDesiredVariables ( DbConnection conn, IDataClient client, string filename, string tablename ) : bool
conn System.Data.Common.DbConnection
client IDataClient
filename string
tablename string
return bool

ReadVariablesFile() protected method

protected ReadVariablesFile ( string filename, DataTable dt ) : DataTable
filename string
dt System.Data.DataTable
return System.Data.DataTable

RemoveTemporaryTable() public method

public RemoveTemporaryTable ( DbConnection conn, IDataClient client ) : void
conn System.Data.Common.DbConnection
client IDataClient
return void

SaveTable() protected method

protected SaveTable ( DbConnection conn, IDataClient client, DataTable dt ) : bool
conn System.Data.Common.DbConnection
client IDataClient
dt System.Data.DataTable
return bool

SetupTable() protected method

protected SetupTable ( DbConnection conn, IDataClient client, string tablename ) : DataTable
conn System.Data.Common.DbConnection
client IDataClient
tablename string
return System.Data.DataTable

Property Details

tempTableName public_oe property

Holds onto the name for the variables table
public string tempTableName
return string