OpenSegCont

Syntax

OpenSegContResult OpenSegCont(OdId tOb, OpenSegContArg tArg)

Parameters

tOb. Moniker of repository object that is a cube segment container.

tArg. Operation execution parameters.

Description

The OpenSegCont operation opens a cube segment container.

Comments

To execute the operation, in the tOb field specify moniker of the object that is a segment container, and in the tArg field specify opening parameters. The object moniker can be obtained on executing the GetObjects operation. In the tArg field one can specify opening mode (view or edit) and a pattern to get metadata. The pattern indicates the information to be obtained on opening.

The operation results in the moniker of opened segment container instance, and also metadata if the tArg.metaGet field was defined on executing the operation.

Further work is executed using the GetSegCont and SetSegCont operations. To save changes, use the SaveObject operation.

To close the opened object instance, use the CloseSegCont operation.

Example

Below is the example of opening a segment container for edit. The request contains moniker of repository object that is a segment container. The response contains the obtained moniker of opened segment container instance.

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">
<OpenSegCont xmlns="http://www.fsight.ru/PP.SOM.Som">
<tOb xmlns="">
  <id>FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!317162</id>
  </tOb>
<tArg xmlns="">
<args>
  <bind>true</bind>
  <openForEdit>true</openForEdit>
  </args>
  </tArg>
  </OpenSegCont>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OpenSegContResult 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>FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNIKPLJBOCLDPFOAEJGOHDKFEFEEPOCLEFIAOPAACCEOBKNOG</id>
  </id>
  <readOnly xmlns="">0</readOnly>
  </OpenSegContResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"OpenSegCont" :
{
"tOb" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!317162"
},
"tArg" :
{
"args" :
{
"bind" : "true",
"openForEdit" : "true"
}
}
}
}

JSON response:

{
"OpenSegContResult" :
{
"id" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNIKPLJBOCLDPFOAEJGOHDKFEFEEPOCLEFIAOPAACCEOBKNOG"
},
"readOnly" : "0"
}
}
public static OpenSegContResult OpenSegCont(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tOpen = new OpenSegCont()
{
tArg = new OpenSegContArg()
{
args = new SegContOpenArgs()
{
openForEdit = true
}
},
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
// Open segment container
var tResult = somClient.OpenSegCont(tOpen);
return tResult;
}

See also:

Working with Cubes