SetHieMd

Syntax

SetHieMdResult SetHieMd(HieId tHie, SetHieMdArg tArg)

Parameters

tHie. Moniker of opened indicators hierarchy instance.

tArg. Operation execution parameters.

Description

The SetHieMd operation changes metadata of the time series database indicators hierarchy.

Comments

To execute the operation, in the tHie parameter specify moniker of the indicators hierarchy instance, and in the tArg parameter specify data change parameters. The moniker can be obtained on executing the OpenHie operation. The operation results in the updated metadata if the tArg.metaGet field was defined on operation execution.

Example

Below is the example of setting the list of levels that are used on creating indicator names. The request contains the list of levels. The response contains updated information about levels and properties of indicators hierarchy.

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">
<SetHieMd xmlns="http://www.fsight.ru/PP.SOM.Som">
<tHie xmlns="">
  <id>S1!M!S!H2</id>
  </tHie>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <levs>true</levs>
  </pattern>
<meta>
<levs>
<its>
<it>
  <k>2</k>
  <id>LEVEL1</id>
  <n>Country</n>
  <vis>true</vis>
<atts>
<its>
<it>
  <k>9</k>
  <id>COUNTRY</id>
  <n>Country</n>
  <vis>true</vis>
<dim>
  <k>208</k>
  <id>COUNTRIES</id>
  <n>Countries</n>
  <vis>true</vis>
  </dim>
  <includeSelectedOnly>false</includeSelectedOnly>
  <namingFormat />
  <isLeaf>true</isLeaf>
  <levKey>2</levKey>
<orderBy>
  <isActive>false</isActive>
  </orderBy>
  <orderInDefaultHie>-1</orderInDefaultHie>
  </it>
  </its>
  </atts>
  <isLeaf>true</isLeaf>
  </it>
<it>
  <k>1</k>
  <id>LEVEL</id>
  <n>Period</n>
  <vis>true</vis>
<atts>
<its>
<it>
  <k>4</k>
  <id>DL</id>
  <n>Period</n>
  <vis>true</vis>
<dim>
  <k>5482</k>
  <id>CALENDAR_LEVELS</id>
  <n>Frequencies</n>
  <vis>true</vis>
  </dim>
  <includeSelectedOnly>false</includeSelectedOnly>
  <namingFormat />
  <isLeaf>false</isLeaf>
  <levKey>1</levKey>
<orderBy>
  <isActive>false</isActive>
  </orderBy>
  <orderInDefaultHie>-1</orderInDefaultHie>
  </it>
  </its>
  </atts>
  <isLeaf>false</isLeaf>
  </it>
  </its>
  </levs>
  </meta>
<metaGet>
  <obInst>true</obInst>
  <levs>true</levs>
  <props>true</props>
  </metaGet>
  </tArg>
  </SetHieMd>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetHieMdResult 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>
<levs>
<its>
<it>
  <k>1</k>
  <id>LEVEL</id>
  <n>Period</n>
  <vis>1</vis>
<atts>
<its>
<it>
  <k>4</k>
  <id>DL</id>
  <n>Period</n>
  <vis>1</vis>
<dim>
  <k>5482</k>
  <id>CALENDAR_LEVELS</id>
  <n>Frequencies</n>
  <vis>1</vis>
  </dim>
  <includeSelectedOnly>0</includeSelectedOnly>
  <namingFormat />
  <isLeaf>0</isLeaf>
  <levKey>1</levKey>
<orderBy>
  <isActive>0</isActive>
  </orderBy>
  <orderInDefaultHie>-1</orderInDefaultHie>
  </it>
  </its>
  </atts>
  <isLeaf>0</isLeaf>
  </it>
<it>
  <k>2</k>
  <id>LEVEL1</id>
  <n>Country</n>
  <vis>1</vis>
<atts>
<its>
<it>
  <k>9</k>
  <id>COUNTRY</id>
  <n>Country</n>
  <vis>1</vis>
<dim>
  <k>208</k>
  <id>COUNTRIES</id>
  <n>Countries</n>
  <vis>1</vis>
  </dim>
  <includeSelectedOnly>0</includeSelectedOnly>
  <namingFormat />
  <isLeaf>1</isLeaf>
  <levKey>2</levKey>
<orderBy>
  <isActive>0</isActive>
  </orderBy>
  <orderInDefaultHie>-1</orderInDefaultHie>
  </it>
  </its>
  </atts>
  <isLeaf>1</isLeaf>
  </it>
  </its>
  </levs>
<props>
  <whereIsEmpty>0</whereIsEmpty>
  <leafLoadExtent>0</leafLoadExtent>
  <filterMode>All</filterMode>
  </props>
  </meta>
  </SetHieMdResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetHieMd" :
{
"tHie" :
{
"id" : "S1!M!S!H2"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"levs" : "true"
},
"meta" :
{
"levs" :
{
"its" :
{
"it" :
[
{
"k" : "2",
"id" : "LEVEL1",
"n" : "Country",
"vis" : "true",
"atts" :
{
"its" :
{
"it" :
[
{
"k" : "9",
"id" : "COUNTRY",
"n" : "Country",
"vis" : "true",
"dim" :
{
"k" : "208",
"id" : "COUNTRIES",
"n" : "Countries",
"vis" : "true"
},
"includeSelectedOnly" : "false",
"namingFormat" : "",
"isLeaf" : "true",
"levKey" : "2",
"orderBy" :
{
"isActive" : "false"
},
"orderInDefaultHie" : "-1"
}
]
}
},
"isLeaf" : "true"
},
{
"k" : "1",
"id" : "LEVEL",
"n" : "Period",
"vis" : "true",
"atts" :
{
"its" :
{
"it" :
[
{
"k" : "4",
"id" : "DL",
"n" : "Period",
"vis" : "true",
"dim" :
{
"k" : "5482",
"id" : "CALENDAR_LEVELS",
"n" : "Frequencies",
"vis" : "true"
},
"includeSelectedOnly" : "false",
"namingFormat" : "",
"isLeaf" : "false",
"levKey" : "1",
"orderBy" :
{
"isActive" : "false"
},
"orderInDefaultHie" : "-1"
}
]
}
},
"isLeaf" : "false"
}
]
}
}
},
"metaGet" :
{
"obInst" : "true",
"levs" : "true",
"props" : "true"
}
}
}
}

JSON response:

{
"SetHieMdResult" :
{
"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",
"levs" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "LEVEL",
"n" : "Period",
"vis" : "1",
"atts" :
{
"its" :
{
"it" :
[
{
"k" : "4",
"id" : "DL",
"n" : "Period",
"vis" : "1",
"dim" :
{
"k" : "5482",
"id" : "CALENDAR_LEVELS",
"n" : "Frequencies",
"vis" : "1"
},
"includeSelectedOnly" : "0",
"namingFormat" : "",
"isLeaf" : "0",
"levKey" : "1",
"orderBy" :
{
"isActive" : "0"
},
"orderInDefaultHie" : "-1"
}
]
}
},
"isLeaf" : "0"
},
{
"k" : "2",
"id" : "LEVEL1",
"n" : "Country",
"vis" : "1",
"atts" :
{
"its" :
{
"it" :
[
{
"k" : "9",
"id" : "COUNTRY",
"n" : "Country",
"vis" : "1",
"dim" :
{
"k" : "208",
"id" : "COUNTRIES",
"n" : "Countries",
"vis" : "1"
},
"includeSelectedOnly" : "0",
"namingFormat" : "",
"isLeaf" : "1",
"levKey" : "2",
"orderBy" :
{
"isActive" : "0"
},
"orderInDefaultHie" : "-1"
}
]
}
},
"isLeaf" : "1"
}
]
}
},
"props" :
{
"whereIsEmpty" : "0",
"leafLoadExtent" : "0",
"filterMode" : "All"
}
}
}
}
public static SetHieMdResult SetHieMetadata(HieId moniker, HieLevs levels)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new SetHieMd()
{
tArg = new SetHieMdArg()
{
//Pattern that will be used to change metadata
pattern = new HieMdPattern()
{
levs = true
},
//Updated metadata
meta = new HieMd()
{
levs = levels
},
metaGet = new HieMdPattern()
{
levs = true,
props = true
}
},
tHie = moniker
};
//Make changes
var result = somClient.SetHieMd(tGet);
return result;
}

See also:

Working with Time Series Database