OpenSemanticLayer

Syntax

SemanticLayerMetaResult OpenSemanticLayer(OdId tObject, OpenSemanticLayerMetaArg tArg)

Parameters

tObject. Moniker of repository object that is data model.

tArg. Operation execution parameters.

Description

The OpenSemanticLayer operation opens data model.

Comments

To execute the operation, in the tObject field specify moniker of object that is a data model, and in the tArg field specify opening parameters. In the tArg.args field specify data model opening mode. In the tArg.meta field specify empty values or default values for the fields with metadata, which values should be obtained.

The operation results in the moniker of opened data model instance and obtained metadata if the appropriate fields were defined.

Further work with data model is executed using the GetSemanticLayerMeta, SetSemanticLayerMeta operations and other specific operations used for executing specific actions. To close the opened instance of information panel, use the CloseSemanticLayer operation.

Example

Below is the example of opening data model for edit. The request contains moniker of the repository object that is a data model. The response contains moniker of opened data model instance. Any additional metadata is not obtained.

The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier article.

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">
<OpenSemanticLayer xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>OBNIHFAHPABDGOAEGDPOIOEEEEFKFMOEBLJPNILDEGIADEAK!M!358178</id>
  </tObject>
<tArg xmlns="">
<args>
  <openForEdit>true</openForEdit>
  </args>
  </tArg>
  </OpenSemanticLayer>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OpenSemanticLayerResult 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">
<id xmlns="">
  <id>OBNIHFAHPABDGOAEGDPOIOEEEEFKFMOEBLJPNILDEGIADEAK!M!S!POFIOKJAHPABDGOAEHEMNLOGBNPHIANDECKECPPGGIBIEIJCA</id>
  </id>
  </OpenSemanticLayerResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"OpenSemanticLayer" :
{
"tObject" :
{
"id" : "OBNIHFAHPABDGOAEGDPOIOEEEEFKFMOEBLJPNILDEGIADEAK!M!358178"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
}
}
}
}

JSON response:

{
"OpenSemanticLayerResult" :
{
"id" :
{
"id" : "OBNIHFAHPABDGOAEGDPOIOEEEEFKFMOEBLJPNILDEGIADEAK!M!S!POFIOKJAHPABDGOAEHEMNLOGBNPHIANDECKECPPGGIBIEIJCA"
}
}
}
public static SemanticLayerMetaResult OpenSemanticLayer(MbId mb, string objectId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tOpen = new OpenSemanticLayer()
{
tArg = new OpenSemanticLayerMetaArg()
{
args = new SemanticLayerMetaOpenArgs()
{
openForEdit = true
}
},
// Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, objectId).k }
};
// Open data model
var result = somClient.OpenSemanticLayer(tOpen);
return result;
}

See also:

Working with Data Models