SemanticLayerDeletePattern

Syntax

bool SemanticLayerDeletePattern(string mon, SemanticLayerPatternArg tArg)

Parameters

mon. Moniker for working with preconfigured DBMS connection templates.

tArg. Settings of deleted preconfigured DBMS connection template.

Description

The SemanticLayerDeletePattern operation deletes preconfigured DBMS connection template.

Comments

To execute the operation, in the mon field specify moniker of opened data model instance with the !Patterns postfix, and in the tArg.index field specify key of deleted template. The moniker can be obtained on executing the OpenSemanticLayer operation. Template key will be available in results of the SemanticLayerGetPatterns operation.

The operation results in the logical true if preconfigured template was deleted successfully.

Example

Below is the example of deleting preconfigured DVMS connection template. The request contains moniker for working with preconfigured templates and template key. The response contains whether removal was successful.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SemanticLayerDeletePattern xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">KPACNCCOCDBDGOAEFDJDAIBAMJFFBCDEDJLPICPCMCFDIKCG!M!S!PLDNOFGCOCDBDGOAEMEKOCGKLAEFDMALEOIGKKCECKAAGLFHC!Patterns</mon>
<tArg xmlns="">
  <index>358700</index>
  </tArg>
  </SemanticLayerDeletePattern>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SemanticLayerDeletePatternResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SemanticLayerDeletePatternResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SemanticLayerDeletePattern" :
{
"mon" : "KPACNCCOCDBDGOAEFDJDAIBAMJFFBCDEDJLPICPCMCFDIKCG!M!S!PLDNOFGCOCDBDGOAEMEKOCGKLAEFDMALEOIGKKCECKAAGLFHC!Patterns",
"tArg" :
{
"index" : "358700"
}
}
}

JSON response:

{
"SemanticLayerDeletePatternResult" : "1"
}
public static bool SemanticLayerDeletePattern(string moniker, int? patternIndex)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tDel = new SemanticLayerDeletePattern()
{
tArg = new SemanticLayerPatternArg()
{
index = patternIndex
},
// Moniker for working with preconfigured templates
mon = moniker + "!Patterns"
};
// Delete preconfigured template
var result = somClient.SemanticLayerDeletePattern(tDel);
return result;
}

See also:

Working with Data Models