OpenHie

Syntax

OpenHieResult OpenHie(RubId tRub, OpenHieArg tArg)

Parameters

tRub. Repository object moniker that is a time series database.

tArg. Parameters of opening the indicators hierarchy.

Description

The OpenHie operation builds a time series hierarchy of the time series database.

Comments

To execute the operation, set the time series database, for which you want to build a indicators hierarchy. There two available options: if there is an opened DBMS instance, specify its moniker in the tRub parameter (the moniker can be obtained on executing the OpenRub operation); if there is no opened DBMS instance, specify moniker of the corresponding repository object in the tArg.args.rubObj field (the repository object moniker can be obtained on executing the GetObjects operation).

The tArg.metaGet field may also contain a pattern to be used to get indicators metadata, and the tArg.loadXml field may be used to define parameters of indicators loading from XML structure.

The operation results in the indicators hierarchy moniker, and also the metadata if the tArg.metaGet pattern was defined on executing the operation. Use the GetHieMd and SetHieMd operation for further work. The moniker obtained on opening is also used in the GetHieMembers operation.

Example

Below is the example of opening indicators hierarchy. The request contains the time series database moniker and the pattern that will be used to get information about indicators hierarchy. The response contains the moniker of opened indicators hierarchy instance and the obtained information.

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">
<OpenHie xmlns="http://www.fsight.ru/PP.SOM.Som">
<tRub xmlns="">
  <id>S1!M!S!R1</id>
  </tRub>
<tArg xmlns="">
  <args />
<metaGet>
  <obInst>true</obInst>
  <props>true</props>
  <asXml>true</asXml>
  </metaGet>
  </tArg>
  </OpenHie>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OpenHieResult 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>S1!M!S!H2</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="1" hf="0">
  <i>TS_DB</i>
  <n>Time series database</n>
  <k>2147483646</k>
  <c>2829</c>
  <p>5472</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>0</isPermanent>
  <isTemp>1</isTemp>
  </obDesc>
  </obInst>
  <dirty>0</dirty>
<props>
  <whereIsEmpty>0</whereIsEmpty>
  <leafLoadExtent>0</leafLoadExtent>
  <filterMode>All</filterMode>
  </props>
<asXml>
  <data><ITEMS VER="1" SEF="FALSE" EMPTY="0"><ITEM ATTR="4" INA="TRUE" NAMINGS=""><SELECTION MULTISELECT="1" NEW="" ALLOWCEG="TRUE" SELSCHONCE="0" SELSCHONRBLD="0" ISA="FALSE"/></ITEM><ITEM ATTR="9" INA="FALSE" NAMINGS=""><SELECTION MULTISELECT="1" NEW="" ALLOWCEG="TRUE" SELSCHONCE="0" SELSCHONRBLD="0" ISA="FALSE"/></ITEM></ITEMS></data>
  </asXml>
  </meta>
  </OpenHieResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"OpenHie" :
{
"tRub" :
{
"id" : "S1!M!S!R1"
},
"tArg" :
{
"args" : "",
"metaGet" :
{
"obInst" : "true",
"props" : "true",
"asXml" : "true"
}
}
}
}

JSON response:

{
"OpenHieResult" :
{
"id" :
{
"id" : "S1!M!S!H2"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "1",
"@hf" : "0",
"i" : "TS_DB",
"n" : "Time series database",
"k" : "2147483646",
"c" : "2829",
"p" : "5472",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "0",
"isTemp" : "1"
}
},
"dirty" : "0",
"props" :
{
"whereIsEmpty" : "0",
"leafLoadExtent" : "0",
"filterMode" : "All"
},
"asXml" :
{
"data" : "<ITEMS VER="1" SEF="FALSE" EMPTY="0"><ITEM ATTR="4" INA="TRUE" NAMINGS=""><SELECTION MULTISELECT="1" NEW="" ALLOWCEG="TRUE" SELSCHONCE="0" SELSCHONRBLD="0" ISA="FALSE"\/><\/ITEM><ITEM ATTR="9" INA="FALSE" NAMINGS=""><SELECTION MULTISELECT="1" NEW="" ALLOWCEG="TRUE" SELSCHONCE="0" SELSCHONRBLD="0" ISA="FALSE"\/><\/ITEM><\/ITEMS>"
}
}
}
}
public static OpenHieResult OpenHierarchy(RubId rub)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tHie = new OpenHie()
{
tArg = new OpenHieArg()
{
args = new HieOpenArgs(),
//Metadata that should be obtained on opening hierarchy
metaGet = new HieMdPattern()
{
props = true,
asXml = true
}
},
tRub = rub
};
//Open indicators hierarchy
var result = somClient.OpenHie(tHie);
return result;
}

See also:

Working with Time Series Database