Class MauroDataMapperClient
Inheritance
Inherited Members
Namespace: mdmapidotnetrestful
Assembly: mdm-api-dotnet-restful.dll
Syntax
public class MauroDataMapperClient
Constructors
| Improve this Doc View SourceMauroDataMapperClient()
Declaration
public MauroDataMapperClient()
MauroDataMapperClient(Properties)
MauroDataMapperClient - API Client Constructor
Declaration
public MauroDataMapperClient(Properties properties)
Parameters
Type | Name | Description |
---|---|---|
Properties | properties | Properties Object |
MauroDataMapperClient(String, Properties)
MauroDataMapperClient - API Client Constructor
Declaration
public MauroDataMapperClient(string connectionName, Properties properties)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionName | Mauro instance name |
Properties | properties | Properties object |
MauroDataMapperClient(String, String, String)
MauroDataMapperClient - API Client Constructor
Declaration
public MauroDataMapperClient(string baseUrl, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseUrl | BaseUrl - Mauro instance Url |
System.String | username | Username |
System.String | password | Password |
MauroDataMapperClient(String, String, String, String)
MauroDataMapperClient - API Client Constructor
Declaration
public MauroDataMapperClient(string connectionName, string baseUrl, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionName | Mauro instance name |
System.String | baseUrl | BaseUrl - Mauro instance Url |
System.String | username | Username |
System.String | password | Password |
Methods
| Improve this Doc View SourceAddMetadata(Guid, Metadata, String)
AddMetadata - Add Properties with Namespace, Key, Value
Declaration
public Guid? AddMetadata(Guid catalogueItemId, Metadata metadata, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | catalogueItemId | DataModelId or DataClassId to add properties |
Metadata | metadata | Metadata Object |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> |
AddSummaryMetadata(Nullable<Guid>, SummaryMetadata, String)
AddSummaryMetadata - Summary Metadata to plot graphs for DataElement and its values based on DataType
Declaration
public Guid? AddSummaryMetadata(Guid? catalogueItemId, SummaryMetadata summaryMetadata, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | catalogueItemId | DataModelId or DataClassId to add Summary Metadata |
SummaryMetadata | summaryMetadata | SummaryMetadata Object |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> | Return SummarymetadataId |
CopyDataModel(Guid, String, Nullable<Guid>, Boolean, String)
CopyDataModel - Copies DataModel from one Mauro instance to another
Declaration
public void CopyDataModel(Guid dataModelId, string targetConnectionName, Guid? targetFolder, bool importAsNewDocumentationVersion, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | dataModelId | DataModelId |
System.String | targetConnectionName | TargetConnectionName - Target instance |
System.Nullable<System.Guid> | targetFolder | Copy DataModel in the Target instance folder |
System.Boolean | importAsNewDocumentationVersion | A mandatory boolean value. If this option is selected, then any models with the same name will be superseded. If this option is not set, then the importer will produce an error if there are existing models with the same label. |
System.String | connectionName | Server connection name. Default value is _default |
CopyFolder(Guid, String, Boolean, Nullable<Guid>, String)
CopyFolder - Copies Folder from one instance to another instance
Declaration
public void CopyFolder(Guid folderId, string targetConnectionName, bool importAsNewDocumentationVersion, Guid? parentFolderId = default(Guid? ), string sourceConnectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderId | Source FolderId |
System.String | targetConnectionName | Target Mauro instance Connection name |
System.Boolean | importAsNewDocumentationVersion | A mandatory boolean value. If this option is selected, then any models with the same name will be superseded. If this option is not set, then the importer will produce an error if there are existing models with the same label. |
System.Nullable<System.Guid> | parentFolderId | Target FolderId |
System.String | sourceConnectionName | Mauro instance name. Default value is _default |
CreateFolder(String, Nullable<Guid>, String)
CreateFolder - Create Folder by name
Declaration
public Guid? CreateFolder(string folderName, Guid? parentFolder = default(Guid? ), string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | folderName | Folder Name |
System.Nullable<System.Guid> | parentFolder | If not set as null, new folder will be created in Parent FolderId |
System.String | connectionName | Maura instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> | Returns Created Folder GUID |
DeleteAllDataModelsInFolder(Guid, Boolean, String)
DeleteAllDataModelsInFolder - Delete All DataModels in a folder
Declaration
public void DeleteAllDataModelsInFolder(Guid folderId, bool permanent = true, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderId | Parent folderId to delete DataModels |
System.Boolean | permanent | If set True, it deletes all DataModels permanently |
System.String | connectionName | Mauro instance name. Default value is _default |
DeleteAllSubFoldersInFolder(Guid, Boolean, String)
DeleteAllSubFoldersInFolder - Delete All Sub Folders in a folder
Declaration
public bool DeleteAllSubFoldersInFolder(Guid folderId, bool permanent = true, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderId | Parent folderId to delete sub folders in it |
System.Boolean | permanent | If set True, it deletes all sub folders permanently |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Boolean | Returns True or False |
DeleteAllSummaryMetadata(Guid, String)
DeleteAllSummaryMetadata - Delete All Summary Metadata in DataModel or DataClass
Declaration
public void DeleteAllSummaryMetadata(Guid catalogueItemId, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | catalogueItemId | DataModelId or DataClassId |
System.String | connectionName | Mauro instance name. Default value is _default |
DeleteCodeSet(Guid, Boolean, String)
DeleteCodeSet - DeleteCodeSet by CodesetId
Declaration
public void DeleteCodeSet(Guid codeSetId, bool permanent = true, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | codeSetId | CodesetId to Delete |
System.Boolean | permanent | If set True, it deletes CodeSet permanently |
System.String | connectionName | Maura instance name. Default value is _default |
DeleteDataModel(Guid, Boolean, String)
DeleteDataModel - Delete DataModel by DataModelId
Declaration
public void DeleteDataModel(Guid dataModelId, bool permanent = true, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | dataModelId | DataModelId to Delete |
System.Boolean | permanent | If set True, it deletes DataModel permanently |
System.String | connectionName | Maura instance name. Default value is _default |
DeleteFolder(Guid, Boolean, String)
DeleteFolder - Delete folder by FolderId
Declaration
public void DeleteFolder(Guid folderId, bool permanent = true, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderId | FolderId to Delete |
System.Boolean | permanent | If set True, it deletes folder permanently |
System.String | connectionName | Maura instance name. Default value is _default |
DeleteSummaryMetadata(String, Guid, Guid, String)
DeleteSummaryMetadata - Delete Summary Metadata in DataModel or DataClass
Declaration
public void DeleteSummaryMetadata(string catalogueDomainType, Guid catalogueItemId, Guid summaryMetadataId, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | catalogueDomainType | dataclass or datamodel |
System.Guid | catalogueItemId | DataModelId or DataClassId |
System.Guid | summaryMetadataId | SummaryMetadataId |
System.String | connectionName | Mauro instance name. Default value is _default |
DeleteTerminology(Guid, Boolean, String)
DeleteTerminology - Delete Terminology by Id
Declaration
public void DeleteTerminology(Guid terminologyId, bool permanent = true, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | terminologyId | TerminologyId to delete |
System.Boolean | permanent | If set True, it deletes Terminology permanently |
System.String | connectionName | Maura instance name. Default value is _default |
ExportDataModel(String, String, String, Guid, String)
ExportDataModel - Export DataModel to Json or XML formatt
Declaration
public HttpResponseMessage ExportDataModel(string exporterNamespace, string exporterName, string exporterVersion, Guid id, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | exporterNamespace | i.e ox.softeng.metadatacatalogue.core.spi.json, ox.softeng.metadatacatalogue.core.spi.xml |
System.String | exporterName | i.e JsonExporterService, XmlImporterService |
System.String | exporterVersion | i.e 1.1 |
System.Guid | id | DataModelId to export |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
HttpResponseMessage | Returns Http Response Message |
FindDataModelByName(String, String)
FindDataModelByName - Find DataModel ByName
Declaration
public Guid? FindDataModelByName(string name, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | name | DataModel name |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> | Returns DataModelId |
FindOrCreateDataType(Nullable<Guid>, DataType, String)
FindOrCreateDataType - Creates a new DataType in DataModel. If DataType already exists in a DataModel, it returns DataType Guid.
Declaration
public Guid? FindOrCreateDataType(Guid? dataModelId, DataType dataType, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | dataModelId | DataModelId |
DataType | dataType | DataType Class with property: label |
System.String | connectionName | Server connection name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> | Returns DataTypeId |
FindOrCreateFolderByName(String, Nullable<Guid>, String)
FindOrCreateFolderByName - Find or create folder
Declaration
public Guid? FindOrCreateFolderByName(string name, Guid? parentFolder = default(Guid? ), string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Folder Name |
System.Nullable<System.Guid> | parentFolder | If Parent FolderId is not null, find/ create folder inside parent folderId |
System.String | connectionName | Server connection name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> | Returns ceated Folderid |
FindOrCreateFolderByPath(String, Nullable<Guid>, String)
FindOrCreateFolderByPath - Creates Parent and child folders
Declaration
public Guid? FindOrCreateFolderByPath(string folderPath, Guid? parentFolder = default(Guid? ), string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | folderPath | List if folders to create seperated by "." |
System.Nullable<System.Guid> | parentFolder | If Parent FolderId is not null, find/ create folder inside parent folderId |
System.String | connectionName | Server connection name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> |
FindOrCreateFolderByPath(String[], Nullable<Guid>, String)
FindOrCreateFolderByPath - Creates Parent and child folders
Declaration
public Guid? FindOrCreateFolderByPath(string[] folderPathComponents, Guid? parentFolder = default(Guid? ), string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String[] | folderPathComponents | List of folders to create in hierarchy |
System.Nullable<System.Guid> | parentFolder | If Parent FolderId is not null, find/ create folder inside parent folderId |
System.String | connectionName | Server connection name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> | Returns Folder Id |
FindTerminologyByName(String, String)
FindTerminologyByName
Declaration
public Guid? FindTerminologyByName(string name, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Terminology Name |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> |
GetDataModelById(Guid, String)
GetDataModelById - Get DataModel by DataModelId
Declaration
public DataModel GetDataModelById(Guid id, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | DataModelId |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
DataModel | Returns DataModel Object |
GetFolderById(Guid, String)
GetFolderById - Get Folder By FolderId
Declaration
public Folder GetFolderById(Guid folderId, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderId | FolderId |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
Folder | Returns Folder Object |
GetFolderByName(String, Nullable<Guid>, String)
GetFolderByName - Get folder id by name
Declaration
public Guid? GetFolderByName(string folderName, Guid? parentFolder = default(Guid? ), string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | folderName | Folder name |
System.Nullable<System.Guid> | parentFolder | If Parent FolderId is not null, get folder inside parent folderId |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> | Return FolderId |
ImportDataModel(String, String, String, ImporterPluginParameters, String)
ImportDataModel - ImportDataModel , "JsonImporterService", "2.0", importerPluginParameters);
Declaration
public HttpResponseMessage ImportDataModel(string importerNamespace, string importerName, string importerVersion, ImporterPluginParameters parameters, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | importerNamespace | uk.ac.ox.softeng.maurodatamapper.datamodel.provider.importer |
System.String | importerName | JsonImporterService / XMLImporterService |
System.String | importerVersion | i.e 2.0 |
ImporterPluginParameters | parameters | ImporterPluginParameters object |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
HttpResponseMessage | Returns Http Response Message |
ListCodeSetsInFolder(Guid, String)
ListCodeSetsInFolder - Provide paginated lists of Codesets
Declaration
public List<Guid> ListCodeSetsInFolder(Guid folderId, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderId | Get a list of Codesets in a folder |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Guid> | Returns Codeset Items with total Count |
ListDataModelsInFolder(Guid, String)
ListDataModelsInFolder - Provide paginated lists of DataModels
Declaration
public DataModelList ListDataModelsInFolder(Guid folderId, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderId | Get a list of DataModels in a folder |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
DataModelList | Returns Items with total no. of Count |
ListSubFoldersInFolder(Guid, String)
ListSubFoldersInFolder - List Sub folders in Folder
Declaration
public List<Guid> ListSubFoldersInFolder(Guid folderid, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderid | FolderId to get sub folders |
System.String | connectionName | Maura instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Guid> | List of Sub Folders in a Folder |
ListSummaryMetadata(Guid, String)
ListSummaryMetadata - Summary Metadata to plot graphs for DataElement and its values based on DataType
Declaration
public AllSummaryMetadata ListSummaryMetadata(Guid catalogueItemId, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | catalogueItemId | DataModelId or DataClassId to get Summary Metadata |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
AllSummaryMetadata | Returns AllSummaryMetadata Object |
ListTerminologiesInFolder(Guid, String)
ListTerminologiesInFolder - Provide paginated lists of Terminologies
Declaration
public Terminology ListTerminologiesInFolder(Guid folderId, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderId | Get a list of Terminologies in a folder |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
Terminology | Returns Terminology Items with total Count |
ListTopLevelFolders(String)
ListTopLevelFolders - List all Parent Folders
Declaration
public List<Guid> ListTopLevelFolders(string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionName | Maura instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Guid> | Returs a List of Folder Guids |
RunImport(List<String>, out List<String>, String, String, String)
RunImport is to Import DataModel, DataClass, DataElements, DataType from CSV files in a Folder, default Folder formatt to upload CSV from is - FolderName_DataModel. CSVs are created as DataModel or DataClass based on Create Parameter value
Declaration
public bool RunImport(List<string> csvFiles, out List<string> errorList, string folderName = "", string create = "class", string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.String> | csvFiles | List of Folders with CSVs or single CSV |
System.Collections.Generic.List<System.String> | errorList | Returns error list |
System.String | folderName | Folder Name to upload single CSV |
System.String | create | create = 'class' uploads CSV as DataClass, create = 'model' uploads as a DataModel |
System.String | connectionName | Mauro instance name. Default value is "_default" |
Returns
Type | Description |
---|---|
System.Boolean | bool value |
UpdateDataClassDescription(Guid, Guid, Guid, String, String)
UpdateDataClassDescription - Update Data Class Description
Declaration
public HttpResponseMessage UpdateDataClassDescription(Guid dataModelId, Guid parentClassId, Guid dataClassId, string newDescription, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | dataModelId | DataModelId |
System.Guid | parentClassId | Parent DataClassId inside DataModelId |
System.Guid | dataClassId | DataClassId to update description |
System.String | newDescription | New Description |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
HttpResponseMessage | Http Response Message |
UpdateDataElementDescription(Guid, Guid, Guid, String, String)
UpdateDataElementDescription - Update DataElement Description
Declaration
public HttpResponseMessage UpdateDataElementDescription(Guid dataModelId, Guid dataClassId, Guid dataElementId, string newDescription, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | dataModelId | DataModelId |
System.Guid | dataClassId | DataClassId |
System.Guid | dataElementId | DataElementId |
System.String | newDescription | New Description |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
HttpResponseMessage | Returns Http Response Message |
UpdateDataModelDescription(DataModel, String, String)
UpdateDataModelDescription - Update DataModel Description
Declaration
public HttpResponseMessage UpdateDataModelDescription(DataModel dataModel, string newDescription, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
DataModel | dataModel | DataModel Object |
System.String | newDescription | New Description |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
HttpResponseMessage | Returns Http Response Message |
UpdateDataModelDescription(Guid, String, String)
UpdateDataModelDescription - Update DataModel Description
Declaration
public HttpResponseMessage UpdateDataModelDescription(Guid dataModelId, string newDescription, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | dataModelId | DataModelId |
System.String | newDescription | New Description |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
HttpResponseMessage | Returns Http Response Message |
UpdateTermDescription(Guid, Guid, String, String)
UpdateTermDescription - Update Term Description
Declaration
public HttpResponseMessage UpdateTermDescription(Guid terminologyId, Guid termId, string newDescription, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | terminologyId | TerminologyId |
System.Guid | termId | TermId |
System.String | newDescription | New Description |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
HttpResponseMessage | Http Response Message |
UploadDataModel(Guid, String, Boolean, Boolean, UploadDataModel, String)
UploadDataModel - Upload DataModel by DataModel Object
Declaration
public Guid? UploadDataModel(Guid folderId, string dataModelName, bool finalised, bool importAsNewDocumentationVersion, UploadDataModel dataModel, string connectionName = "_default")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | folderId | The GUID identifier for the folder that the new model is to be uploaded to. This is mandatory. |
System.String | dataModelName | Name of the new DataModel |
System.Boolean | finalised | A mandatory boolean value determining whether the new model is to be marked as finalised. This determines whether the resulting model can be further edited within the interface |
System.Boolean | importAsNewDocumentationVersion | A mandatory boolean value. If this option is selected, then any models with the same name will be superseded. If this option is not set, then the importer will produce an error if there are existing models with the same label. |
UploadDataModel | dataModel | DataModel Object |
System.String | connectionName | Mauro instance name. Default value is _default |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> | Returns Nullable GUID |