CompoundDictionarySourceResult CreateCompoundDictionarySource(RdsId tRds, CreateCompoundDictionarySourceArg tArg)
tRds. Moniker of opened composite MDM dictionary instance.
tArg. Operation execution parameters.
The CreateCompoundDictionarySource operation creates a new data source in a composite MDM dictionary.
To execute the operation, in the tRds field specify moniker of opened composite MDM dictionary instance, and in the tArg field specify the pattern that will be used to get metadata of the created data source. The moniker can be obtained on executing the OpenRds operation.
The operation results in the metadata of the created style data source.
Further work with the data source is executed using the following operations: GetCompoundDictionarySource, SetCompoundDictionarySource, SaveCompoundDictionarySource. To close the data source, use the CloseCopmpoundDictionarySource operation.
Below is the example of creating a composite MDM dictionary data source. The request contains moniker of composite dictionary instance. The response contains general metadata of the created data source.
{
"CreateCompoundDictionarySource" :
{
"tRds" :
{
"id" : "LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO"
},
"tArg" :
{
"metaGet" :
{
"all" : "true"
}
}
}
}
{
"CreateCompoundDictionarySourceResult" :
{
"id" :
{
"id" : "LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO!Sources!2"
},
"meta" :
{
"k" : "2",
"id" : "COMPOUNDDICTIONARYSOURCE1",
"n" : "Source1",
"vis" : "1",
"mappings" : ""
}
}
}
public static CompoundDictionarySourceResult CreateCompoundDictionarySource(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tCreate = new CreateCompoundDictionarySource()
{
tArg = new CreateCompoundDictionarySourceArg()
{
metaGet = new RdsCompoundDictSourcePattern()
{
all = true
}
},
tRds = new RdsId() { id = moniker }
};
// Create a data source in composite MDM dictionary
var tResult = somClient.CreateCompoundDictionarySource(tCreate);
return tResult;
}
See also: