Skip to content

Commit c71e197

Browse files
committed
#2353 refactor datastructure .self
1 parent ab953bc commit c71e197

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

Components/DLM/BExIS.Dlm.Entities/Data/VariableValue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public VariableInstance Variable
6161
{
6262
get
6363
{
64-
if (this.Tuple.DatasetVersion.Dataset.DataStructure.Self is StructuredDataStructure)
64+
if (this.Tuple.DatasetVersion.Dataset.DataStructure != null)
6565
{
6666
VariableInstance u = (this.Tuple.DatasetVersion.Dataset.DataStructure.Self as StructuredDataStructure).Variables
6767
.Where(p => p.Id.Equals(this.VariableId))

Components/DLM/BExIS.Dlm.Services/Data/DatasetManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ public DataTable GetLatestDatasetVersionTuples(long datasetId, int pageNumber, i
12541254
// should use the fallback method, but DatasetConvertor class must be merged with OutputDataManager and SearchUIHelper claases first.
12551255
var version = this.GetDatasetLatestVersion(datasetId);
12561256
var tuples = getDatasetVersionEffectiveTuples(version, pageNumber, pageSize, false); // the false, causes the method to use a scoped sesssion and keep it alive further processings that aredone later on the tuples
1257-
if (version.Dataset.DataStructure.Self is StructuredDataStructure)
1257+
if (version.Dataset.DataStructure!=null)
12581258
{
12591259
DataTable table = convertDataTuplesToDataTable(tuples, version, (StructuredDataStructure)version.Dataset.DataStructure.Self);
12601260
return table;
@@ -1268,7 +1268,7 @@ public DataTable GetDatasetVersionTuples(long versionId, int pageNumber, int pag
12681268
// should use the fallback method, but DatasetConvertor class must be merged with OutputDataManager and SearchUIHelper claases first.
12691269
var version = this.GetDatasetVersion(versionId);
12701270
var tuples = getDatasetVersionEffectiveTuples(version, pageNumber, pageSize, false); // the false, causes the method to use a scoped sesssion and keep it alive further processings that aredone later on the tuples
1271-
if (version.Dataset.DataStructure.Self is StructuredDataStructure)
1271+
if (version.Dataset.DataStructure != null)
12721272
{
12731273
DataTable table = convertDataTuplesToDataTable(tuples, version, (StructuredDataStructure)version.Dataset.DataStructure.Self);
12741274
return table;
@@ -3361,7 +3361,7 @@ private void createMaterializedView(long datasetId)
33613361
{
33623362
var datasetRepo = uow.GetReadOnlyRepository<Dataset>();
33633363
Dataset ds = datasetRepo.Get(datasetId);
3364-
if (ds.DataStructure != null && ds.DataStructure.Self is StructuredDataStructure)
3364+
if (ds.DataStructure != null && ds.DataStructure!= null)
33653365
{
33663366
StructuredDataStructure sds = (StructuredDataStructure)ds.DataStructure.Self;
33673367
if (sds.Variables != null && sds.Variables.Count() > 0)

Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Controllers/API/DataOutController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ private HttpResponseMessage getData(long id, long versionId, string token, strin
299299
string title = datasetVersion.Title;
300300

301301
// check the data sturcture type ...
302-
if (datasetVersion.Dataset.DataStructure.Self is StructuredDataStructure)
302+
if (datasetVersion.Dataset.DataStructure != null)
303303
{
304304
// apply selection and projection
305305
long count = datasetManager.GetDataTuplesCount(datasetVersion.Id);
@@ -343,7 +343,7 @@ private HttpResponseMessage getData(long id, long versionId, string token, strin
343343
string title = datasetVersion.Title;
344344

345345
// check the data sturcture type ...
346-
if (datasetVersion.Dataset.DataStructure.Self is StructuredDataStructure)
346+
if (datasetVersion.Dataset.DataStructure!=null)
347347
{
348348
//FilterExpression filter = null;
349349
//OrderByExpression orderBy = null;

Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Controllers/API/DataQualityOutController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public List<int> Get()
4848
foreach (int id in datasetIds)
4949
{
5050
DatasetVersion datasetVersion = dm.GetDatasetLatestVersion(id);
51-
if (datasetVersion.Dataset.DataStructure.Self is StructuredDataStructure)
51+
if (datasetVersion.Dataset.DataStructure!=null)
5252
{
5353
structuredIds.Add(id);
5454
}
@@ -121,7 +121,7 @@ private HttpResponseMessage getData(long id, int variableId, string token)
121121
string title = datasetVersion.Title;
122122

123123
// check the data sturcture type ...
124-
if (datasetVersion.Dataset.DataStructure.Self is StructuredDataStructure)
124+
if (datasetVersion.Dataset.DataStructure!=null)
125125
{
126126
object stats = new object();
127127

Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Controllers/API/DataStatisticOutController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private HttpResponseMessage getData(long id, int variableId, string token)
146146
string title = datasetVersion.Title;
147147

148148
// check the data sturcture type ...
149-
if (datasetVersion.Dataset.DataStructure != null && datasetVersion.Dataset.DataStructure.Self is StructuredDataStructure)
149+
if (datasetVersion.Dataset.DataStructure != null)
150150
{
151151
object stats = new object();
152152

Modules/DIM/BExIS.Dim.Helper/Export/PangaeaDataRepoConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private string generatePrimaryData(long datasetVersionId)
116116
{
117117
DatasetVersion datasetVersion = datasetManager.GetDatasetVersion(datasetVersionId);
118118

119-
if (datasetVersion.Dataset.DataStructure.Self is StructuredDataStructure)
119+
if (datasetVersion.Dataset.DataStructure!=null)
120120
{
121121
OutputDataManager outputDataManager = new OutputDataManager();
122122
SubmissionManager submissionManager = new SubmissionManager();

0 commit comments

Comments
 (0)