SetSegCont

Syntax

SetSegContResult SetSegCont(SegContId tSegCont, SetSegContArg tArg)

Parameters

tSegCont. Segment container instance moniker.

tArg. Operation execution parameters.

Description

The SetSegCont operation changes segment container metadata.

Comments

To execute the operation,, in the tAlg field specify moniker of segment container instance, and in the tArg.pattern field specify the pattern that will be used to change metadata, and in the tArg.meta field specify metadata to be set. One can also determine the tArg.metaGet pattern to get metadata after it was changed. The moniker can be obtained after executing the OpenSegCont operation.

To save changes, use the SaveObject operation.

The operation results in the updated metadata if the tArg.metaGet field was defined.

Example

Below is the example of changing database for segment container. The request contains moniker of opened instance of segment container and database key. The response contains updated information about the database used by the segment container.

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">
<SetSegCont xmlns="http://www.fsight.ru/PP.SOM.Som">
<tSegCont xmlns="">
  <id>FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNIKPLJBOCLDPFOAEJGOHDKFEFEEPOCLEFIAOPAACCEOBKNOG</id>
  </tSegCont>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <database>true</database>
  </pattern>
<meta>
<data>
<database>
  <k>144693</k>
  </database>
  </data>
  </meta>
<metaGet>
  <obInst>true</obInst>
  <database>true</database>
  </metaGet>
  </tArg>
  </SetSegCont>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetSegContResult 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>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="27" hf="0">
  <i>SEG_CONTAINER</i>
  <n>Cube segment container</n>
  <k>317162</k>
  <c>1296</c>
  <p>317056</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>1</dirty>
<data>
<database>
  <id>BD_1</id>
  <k>144693</k>
  <n>Database</n>
  <classId>513</classId>
  </database>
  </data>
  </meta>
  </SetSegContResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetSegCont" :
{
"tSegCont" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNIKPLJBOCLDPFOAEJGOHDKFEFEEPOCLEFIAOPAACCEOBKNOG"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"database" : "true"
},
"meta" :
{
"data" :
{
"database" :
{
"k" : "144693"
}
}
},
"metaGet" :
{
"obInst" : "true",
"database" : "true"
}
}
}
}

JSON response:

{
"SetSegContResult" :
{
"id" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNIKPLJBOCLDPFOAEJGOHDKFEFEEPOCLEFIAOPAACCEOBKNOG"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "27",
"@hf" : "0",
"i" : "SEG_CONTAINER",
"n" : "Cube segment container",
"k" : "317162",
"c" : "1296",
"p" : "317056",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "1",
"data" :
{
"database" :
{
"id" : "BD_1",
"k" : "144693",
"n" : "Database",
"classId" : "513"
}
}
}
}
}
public static SetSegContResult SetSegCont(string moniker, uint bdKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetSegCont()
{
tArg = new SetSegContArg()
{
pattern = new SegContMdPattern()
{
database = true,
},
meta = new SegContMd()
{
data = new SegContData()
{
database = new SimpleMbObject() { k = bdKey }
}
},
metaGet = new SegContMdPattern()
{
database = true
}
},
tSegCont = new SegContId() { id = moniker }
};
// Change segment container settings
var result = somClient.SetSegCont(tSet);
return result;
}

See also:

Working with Cubes