C# Class BExIS.IO.Transform.Output.DataWriter

DataWriter is an abstract class that has basic functions for storing file.
Show file Open project: BEXIS2/Core Class Usage Examples

Protected Properties

Property Type Description
DatasetManager BExIS.Dlm.Services.Data.DatasetManager
VariableIdentifierRows List>
VariableIdentifiers List
dataStructure BExIS.Dlm.Entities.DataStructure.StructuredDataStructure

Public Methods

Method Description
CreateFile ( string filepath ) : string
CreateFile ( string path, string filename ) : string
DataWriter ( ) : System

GetDataStructureTemplatePath ( long dataStructureId, string extention ) : string

GetDynamicStorePath ( long datasetId, long datasetVersionOrderNr, string title, string extention ) : string

GetDynamicStorePathOriginalFile ( long datasetId, long datasetVersionOrderNr, string filename ) : string

GetFullStorePath ( long datasetId, long datasetVersionOrderNr, string title, string extention ) : string

Create the general store path under AppConfiguration.DataPath with filename

GetFullStorePathOriginalFile ( long datasetId, long datasetVersionOrderNr, string filename ) : string

GetNewTitle ( long datasetId, long datasetVersionOrderNr, string title, string extention ) : string

Returns a Title based on incoming parameters

GetStorePath ( long datasetId, long datasetVersionOrderNr ) : string

Generate the gernal store path based on AppConfiguration.DataPath without filename

GetTitle ( long id ) : String

Open ( string fileName ) : FileStream

If file exist open a FileStream

Protected Methods

Method Description
GetDataStructure ( ) : StructuredDataStructure
GetDataStructure ( long id ) : StructuredDataStructure

GetFormatedValue ( object value, Dlm datatype, string format ) : string
GetStringFormat ( Dlm datatype ) : string
GetSubsetOfVariableValues ( List source, String selected ) : List

select a subset of the variables from a datastructure based on a list of variablenames

GetSubsetOfVariables ( List source, String selected ) : List

select a subset of the variables from a datastructure based on a list of variablenames

createDicrectoriesIfNotExist ( string path ) : void

Method Details

CreateFile() public method

public CreateFile ( string filepath ) : string
filepath string
return string

CreateFile() public method

public CreateFile ( string path, string filename ) : string
path string
filename string
return string

DataWriter() public method

public DataWriter ( ) : System
return System

GetDataStructure() protected method

protected GetDataStructure ( ) : StructuredDataStructure
return BExIS.Dlm.Entities.DataStructure.StructuredDataStructure

GetDataStructure() protected method

protected GetDataStructure ( long id ) : StructuredDataStructure
id long
return BExIS.Dlm.Entities.DataStructure.StructuredDataStructure

GetDataStructureTemplatePath() public method

public GetDataStructureTemplatePath ( long dataStructureId, string extention ) : string
dataStructureId long
extention string
return string

GetDynamicStorePath() public method

public GetDynamicStorePath ( long datasetId, long datasetVersionOrderNr, string title, string extention ) : string
datasetId long
datasetVersionOrderNr long
title string
extention string
return string

GetDynamicStorePathOriginalFile() public method

public GetDynamicStorePathOriginalFile ( long datasetId, long datasetVersionOrderNr, string filename ) : string
datasetId long
datasetVersionOrderNr long
filename string
return string

GetFormatedValue() protected method

protected GetFormatedValue ( object value, Dlm datatype, string format ) : string
value object
datatype Dlm
format string
return string

GetFullStorePath() public method

Create the general store path under AppConfiguration.DataPath with filename
public GetFullStorePath ( long datasetId, long datasetVersionOrderNr, string title, string extention ) : string
datasetId long
datasetVersionOrderNr long
title string
extention string
return string

GetFullStorePathOriginalFile() public method

public GetFullStorePathOriginalFile ( long datasetId, long datasetVersionOrderNr, string filename ) : string
datasetId long
datasetVersionOrderNr long
filename string
return string

GetNewTitle() public method

Returns a Title based on incoming parameters
public GetNewTitle ( long datasetId, long datasetVersionOrderNr, string title, string extention ) : string
datasetId long
datasetVersionOrderNr long
title string
extention string
return string

GetStorePath() public method

Generate the gernal store path based on AppConfiguration.DataPath without filename
public GetStorePath ( long datasetId, long datasetVersionOrderNr ) : string
datasetId long
datasetVersionOrderNr long
return string

GetStringFormat() protected method

protected GetStringFormat ( Dlm datatype ) : string
datatype Dlm
return string

GetSubsetOfVariableValues() protected method

select a subset of the variables from a datastructure based on a list of variablenames
protected GetSubsetOfVariableValues ( List source, String selected ) : List
source List full list of variables
selected String variablenames
return List

GetSubsetOfVariables() protected method

select a subset of the variables from a datastructure based on a list of variablenames
protected GetSubsetOfVariables ( List source, String selected ) : List
source List full list of variables
selected String variablenames
return List

GetTitle() public method

public GetTitle ( long id ) : String
id long
return String

Open() public static method

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

createDicrectoriesIfNotExist() protected method

protected createDicrectoriesIfNotExist ( string path ) : void
path string
return void

Property Details

DatasetManager protected property

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

VariableIdentifierRows protected property

protected List> VariableIdentifierRows
return List>

VariableIdentifiers protected property

List of VariableIdentifiers with VariableName and VariableID
protected List VariableIdentifiers
return List

dataStructure protected property

protected StructuredDataStructure,BExIS.Dlm.Entities.DataStructure dataStructure
return BExIS.Dlm.Entities.DataStructure.StructuredDataStructure