C# Класс BExIS.Dlm.Services.DataStructure.DataStructureManager

DataStructureManager class is responsible for CRUD (Create, Read, Update, Delete) operations on the aggregate area of the data structure. The data structure aggregate area is a set of entities like DataStructure, VariableUsage, and ParameterUsage that in cooperation together can materialize the formal specification of the structure of group of datasets.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddDataView ( BExIS dataStructure, DataView view ) : void

Adds a spanning view to the passed structured data structure. Spanning views are available and applicable to all datasets associated with the data structure.

AddParameterUsage ( Variable variableUsage, DataAttribute dataAttribute, bool isValueOptional, string label, string defaultValue, string missingValue, string description ) : Parameter

The method functions in a similar way to the AddVariableUsage method, but operates on a Parameter

AddVariableUsage ( StructuredDataStructure dataStructure, DataAttribute dataAttribute, bool isValueOptional, string label, string defaultValue, string missingValue, string description, Unit variableUnit = null ) : Variable

Creates a link between a StructuredDataStructure and DataAttribute. This link is known as Variable. In addition to what a variable inherits from the associated data attribute, it can have its own label, default and missing values, and optionality of its value.

CreateStructuredDataStructure ( string name, string description, string xsdFileName, string xslFileName, DataStructureCategory indexerType, Variable indexer = null ) : StructuredDataStructure

Creates a structured data structure StructuredDataStructure and persists the entity in the database.

CreateUnStructuredDataStructure ( string name, string description ) : UnStructuredDataStructure

Creates an unstructured data structure UnStructuredDataStructure and persists it in the database.

DataStructureManager ( ) : System
DeleteStructuredDataStructure ( IEnumerable entities ) : bool

If non of the entities are associated to any Dateset entity, the method deletes them from the database.

If any of the data structure objects is used by any dataset, the whole transaction will be roll backed, so that the other entities are also not deleted.
Database exceptions are not handled intentionally, so that if the data structure is related to some datasets, a proper exception will be thrown.

DeleteStructuredDataStructure ( StructuredDataStructure entity ) : bool

If the entity is not associated to any Dateset, the method deletes it from the database.

Database exceptions are not handled intentionally, so that if the data structure is related to some datasets, a proper exception will be thrown.

DeleteUnStructuredDataStructure ( IEnumerable entities ) : bool

If non of the entities are associated to any Dateset entity, the method deletes them from the database.

If any of the data structure objects is used by any dataset, the whole transaction will be roll backed, so that the other entities are also not deleted.
Database exceptions are not handled intentionally, so that if the data structure is related to some datasets, a proper exception will be thrown.

DeleteUnStructuredDataStructure ( UnStructuredDataStructure entity ) : bool

If the entity is not associated to any Dateset, the method deletes it from the database.

Database exceptions are not handled intentionally, so that if the data structure is related to some datasets, a proper exception will be thrown.

RemoveDataView ( BExIS dataStructure, DataView view ) : void

Removes the relationship between the structured data structure and the view, neither the data structure nor the view.

RemoveParameterUsage ( Parameter usage ) : void

The method functions in a similar way to the RemoveVariableUsage method, but operates on a Parameter

RemoveVariableUsage ( Variable usage ) : void

Detaches the data attribute and the data structure that were linked by the variable and then deletes the variable from the database.

If the variable is referenced by any DataValue the method fails to delete the variable. Also, all the parameters associated to the variable will be deleted.

UpdateStructuredDataStructure ( StructuredDataStructure entity ) : StructuredDataStructure

Applies changes to the data structure and persists them in the database.

UpdateUnStructuredDataStructure ( UnStructuredDataStructure entity ) : UnStructuredDataStructure

Applies changes to the data structure and persists them in the database.

Описание методов

AddDataView() публичный Метод

Adds a spanning view to the passed structured data structure. Spanning views are available and applicable to all datasets associated with the data structure.
public AddDataView ( BExIS dataStructure, DataView view ) : void
dataStructure BExIS The structured data structure to add the data view to.
view BExIS.Dlm.Entities.DataStructure.DataView The data view to be linked to the data structure as a spanning view.
Результат void

AddParameterUsage() публичный Метод

The method functions in a similar way to the AddVariableUsage method, but operates on a Parameter
public AddParameterUsage ( Variable variableUsage, DataAttribute dataAttribute, bool isValueOptional, string label, string defaultValue, string missingValue, string description ) : Parameter
variableUsage BExIS.Dlm.Entities.DataStructure.Variable
dataAttribute BExIS.Dlm.Entities.DataStructure.DataAttribute
isValueOptional bool
label string
defaultValue string
missingValue string
description string
Результат BExIS.Dlm.Entities.DataStructure.Parameter

AddVariableUsage() публичный Метод

Creates a link between a StructuredDataStructure and DataAttribute. This link is known as Variable. In addition to what a variable inherits from the associated data attribute, it can have its own label, default and missing values, and optionality of its value.
public AddVariableUsage ( StructuredDataStructure dataStructure, DataAttribute dataAttribute, bool isValueOptional, string label, string defaultValue, string missingValue, string description, Unit variableUnit = null ) : Variable
dataStructure BExIS.Dlm.Entities.DataStructure.StructuredDataStructure The structured data structure to be linked to the data attribute
dataAttribute BExIS.Dlm.Entities.DataStructure.DataAttribute The data attribute to be used in a data structure as a variable
isValueOptional bool Indicates whether the associated to the variable is optional or not. This allows dataset to not provide data values for optional variables.
label string The display name of the variable. It may differ from the associated data attribute name. The variable label usually indicates the role of the data attribute in the structure. /// Its possible for a data structure to use a data attribute more than once by creating more than one variables, hence having different labels.
defaultValue string The default value of the associated variable values. Mainly considered for user interface purposes.
missingValue string A specific sentinel value that when is put into the variable values, means those values are missing and should not be considered data.
description string
variableUnit BExIS.Dlm.Entities.DataStructure.Unit A specific unit for the variable. If not provided the unit of the is used. /// If provided, its dimension must be equal to the dimension of the 's unit.
Результат BExIS.Dlm.Entities.DataStructure.Variable

CreateStructuredDataStructure() публичный Метод

Creates a structured data structure StructuredDataStructure and persists the entity in the database.
public CreateStructuredDataStructure ( string name, string description, string xsdFileName, string xslFileName, DataStructureCategory indexerType, Variable indexer = null ) : StructuredDataStructure
name string The name of the data structure
description string A free text describing the purpose, usage, and/or the domain of the data structure usage.
xsdFileName string Not in use.
xslFileName string Not in use.
indexerType DataStructureCategory If the data structure is used as a matrix, The indexer type show what kind of column would be represented by the indexer variable.
indexer BExIS.Dlm.Entities.DataStructure.Variable The variable indicating the first indexing column of the matrix, if the data structure is representing a matrix.
Результат BExIS.Dlm.Entities.DataStructure.StructuredDataStructure

CreateUnStructuredDataStructure() публичный Метод

Creates an unstructured data structure UnStructuredDataStructure and persists it in the database.
public CreateUnStructuredDataStructure ( string name, string description ) : UnStructuredDataStructure
name string The name of the data structure
description string A free text describing the purpose, usage, and/or the domain of the data structure usage.
Результат BExIS.Dlm.Entities.DataStructure.UnStructuredDataStructure

DataStructureManager() публичный Метод

public DataStructureManager ( ) : System
Результат System

DeleteStructuredDataStructure() публичный Метод

If non of the entities are associated to any Dateset entity, the method deletes them from the database.
If any of the data structure objects is used by any dataset, the whole transaction will be roll backed, so that the other entities are also not deleted.
Database exceptions are not handled intentionally, so that if the data structure is related to some datasets, a proper exception will be thrown.
public DeleteStructuredDataStructure ( IEnumerable entities ) : bool
entities IEnumerable The data structure objects to be deleted in a all or none approach.
Результат bool

DeleteStructuredDataStructure() публичный Метод

If the entity is not associated to any Dateset, the method deletes it from the database.
Database exceptions are not handled intentionally, so that if the data structure is related to some datasets, a proper exception will be thrown.
public DeleteStructuredDataStructure ( StructuredDataStructure entity ) : bool
entity BExIS.Dlm.Entities.DataStructure.StructuredDataStructure The data structure object to be deleted.
Результат bool

DeleteUnStructuredDataStructure() публичный Метод

If non of the entities are associated to any Dateset entity, the method deletes them from the database.
If any of the data structure objects is used by any dataset, the whole transaction will be roll backed, so that the other entities are also not deleted.
Database exceptions are not handled intentionally, so that if the data structure is related to some datasets, a proper exception will be thrown.
public DeleteUnStructuredDataStructure ( IEnumerable entities ) : bool
entities IEnumerable The data structure objects to be deleted in a all or none approach.
Результат bool

DeleteUnStructuredDataStructure() публичный Метод

If the entity is not associated to any Dateset, the method deletes it from the database.
Database exceptions are not handled intentionally, so that if the data structure is related to some datasets, a proper exception will be thrown.
public DeleteUnStructuredDataStructure ( UnStructuredDataStructure entity ) : bool
entity BExIS.Dlm.Entities.DataStructure.UnStructuredDataStructure The data structure object to be deleted.
Результат bool

RemoveDataView() публичный Метод

Removes the relationship between the structured data structure and the view, neither the data structure nor the view.
public RemoveDataView ( BExIS dataStructure, DataView view ) : void
dataStructure BExIS The data structure to be release from the relationship.
view BExIS.Dlm.Entities.DataStructure.DataView The view to be release from the relationship.
Результат void

RemoveParameterUsage() публичный Метод

The method functions in a similar way to the RemoveVariableUsage method, but operates on a Parameter
public RemoveParameterUsage ( Parameter usage ) : void
usage BExIS.Dlm.Entities.DataStructure.Parameter
Результат void

RemoveVariableUsage() публичный Метод

Detaches the data attribute and the data structure that were linked by the variable and then deletes the variable from the database.
If the variable is referenced by any DataValue the method fails to delete the variable. Also, all the parameters associated to the variable will be deleted.
public RemoveVariableUsage ( Variable usage ) : void
usage BExIS.Dlm.Entities.DataStructure.Variable The variable object to be deleted.
Результат void

UpdateStructuredDataStructure() публичный Метод

Applies changes to the data structure and persists them in the database.
public UpdateStructuredDataStructure ( StructuredDataStructure entity ) : StructuredDataStructure
entity BExIS.Dlm.Entities.DataStructure.StructuredDataStructure The entity containing the changes.
Результат BExIS.Dlm.Entities.DataStructure.StructuredDataStructure

UpdateUnStructuredDataStructure() публичный Метод

Applies changes to the data structure and persists them in the database.
public UpdateUnStructuredDataStructure ( UnStructuredDataStructure entity ) : UnStructuredDataStructure
entity BExIS.Dlm.Entities.DataStructure.UnStructuredDataStructure The entity containing the changes.
Результат BExIS.Dlm.Entities.DataStructure.UnStructuredDataStructure