Table of Contents

Class FileState

Namespace
Cognite.Simulator.Utils
Assembly
Cognite.Simulator.Utils.dll

Represents the state of a simulator file

public class FileState : IExtractionState
Inheritance
FileState
Implements
IExtractionState
Derived
Inherited Members

Constructors

FileState()

Creates a new file state with the provided id

public FileState()

Properties

CdfId

Internal (numeric) id of the file in CDF

public long CdfId { get; set; }

Property Value

long

CreatedTime

Time the file was created in CDF

public long CreatedTime { get; set; }

Property Value

long

DataSetId

Dataset id that contains the file in CDF

public long? DataSetId { get; set; }

Property Value

long?

ExternalId

External ID of the entity that is represented by this object.

public string ExternalId { get; set; }

Property Value

string

FileExtension

Model version

public string FileExtension { get; set; }

Property Value

string

FilePath

Path of the file in the local disk. This is only available once the file has been downloaded from CDF and saved locally.

public string FilePath { get; }

Property Value

string

Id

File id. Typically CDF external id

public string Id { get; set; }

Property Value

string

IsInDirectory

If the file is stored in a directory, or as a single file

public bool IsInDirectory { get; set; }

Property Value

bool

LastTimeModified

Last time this state was modified

public DateTime? LastTimeModified { get; protected set; }

Property Value

DateTime?

LogId

Model revision logId

public long LogId { get; set; }

Property Value

long

ModelExternalId

External ID of the model associated with this file. The model is typically the object being simulated. Each model can have multiple revisions, where each revision is stored in a CDF file.

public string ModelExternalId { get; set; }

Property Value

string

Source

Source of this file. Typically the name of the simulator

public string Source { get; set; }

Property Value

string

UpdatedTime

Last time the file was updated in CDF

public long UpdatedTime { get; set; }

Property Value

long

Version

Model version

public int Version { get; set; }

Property Value

int

Methods

GetPoco()

Get the data object with the state properties to be persisted by the state store

public virtual FileStatePoco GetPoco()

Returns

FileStatePoco

Init(FileStatePoco)

Initialize this state using a data object from the state store

public virtual void Init(FileStatePoco poco)

Parameters

poco FileStatePoco

Data object