GetDmCln

Syntax

GetDmClnResult GetDmCln(DmId tDim, GetDmClnArg tArg)

Parameters

tDim. Moniker of opened calendar dictionary instance.

tArg. Operation execution parameters.

Description

The GetDmCln operation gets calendar dictionary metadata.

Comments

This operation enables the user to get information about calendar dictionary structure: hierarchy in use, levels, custom attributes, calendar limits and other settings that affect dictionary work. To execute the operation, in the tDim field specify calendar dictionary instance moniker, and in the tArg field specify parameters for getting information. The moniker can be obtained on executing the OpenDim operation. In the tArg.pattern field specify the pattern that will be used to get information. The operation results in the requested metadata.

Example

Below is the example of using the GetDmCln operation about calendar dictionary structure. The request contains dictionary moniker and the pattern that determines which metadata should be obtained. The response contains 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">
<GetDmCln xmlns="http://www.fsight.ru/PP.SOM.Som">
<tDim xmlns="">
  <id>S1!M!S!DM2</id>
  </tDim>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <attrs>Get</attrs>
  </pattern>
  </tArg>
  </GetDmCln>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetDmClnResult 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!DM2</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="9" hf="0">
  <i>CALENDAR</i>
  <n>Calendar</n>
  <k>112</k>
  <c>1026</c>
  <p>103</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>0</dirty>
  <startYear>2000</startYear>
  <endYear>2003</endYear>
  <startYearAsParam>0</startYearAsParam>
  <endYearAsParam>0</endYearAsParam>
  <hierarchy>0</hierarchy>
  <attrCount>9</attrCount>
  <levelCount>6</levelCount>
  <reverseOrder>0</reverseOrder>
  <shiftForward>0</shiftForward>
  <hierarchyCorrection>0</hierarchyCorrection>
  <lastLevelNameAsDay>0</lastLevelNameAsDay>
  <defaultOpenType>Hierarchical</defaultOpenType>
  <isDynamicAttrs>1</isDynamicAttrs>
<attrs>
<its>
<it>
  <k>1</k>
  <id>BLOCK_TYPE</id>
  <n>Calendar block type</n>
  <vis>0</vis>
  <dt>2</dt>
  <dataDomain>0</dataDomain>
  <nullable>0</nullable>
  <hasHierarchy>0</hasHierarchy>
  <isSystem>1</isSystem>
  </it>
<it>
  <k>2</k>
  <id>START_DATE</id>
  <n>Period start date</n>
  <vis>1</vis>
  <dt>4</dt>
  <dataDomain>0</dataDomain>
  <nullable>0</nullable>
  <hasHierarchy>0</hasHierarchy>
  <isSystem>1</isSystem>
  </it>
<it>
  <k>3</k>
  <id>NAME</id>
  <n>Calendar element name</n>
  <vis>1</vis>
  <dt>1</dt>
  <predefined>Name</predefined>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  <isSystem>1</isSystem>
  </it>
<it>
  <k>4</k>
  <id>ID</id>
  <n>Identifier</n>
  <vis>0</vis>
  <dt>1</dt>
  <predefined>Ident</predefined>
  <dataDomain>0</dataDomain>
  <nullable>0</nullable>
  <hasHierarchy>0</hasHierarchy>
  <isSystem>1</isSystem>
  </it>
<it>
  <k>5</k>
  <id>ORDER</id>
  <n>Order</n>
  <vis>0</vis>
  <dt>2</dt>
  <uniqueIndex>INDEX_ORDER</uniqueIndex>
  <predefined>Order</predefined>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  <isSystem>1</isSystem>
  </it>
<it>
  <k>6</k>
  <id>PERIOD</id>
  <n>Period</n>
  <vis>0</vis>
  <dt>4</dt>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  <isSystem>1</isSystem>
  </it>
<it>
  <k>7</k>
  <id>YEAR</id>
  <n>Year number</n>
  <vis>0</vis>
  <dt>2</dt>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  <isSystem>1</isSystem>
  </it>
<it>
  <k>8</k>
  <id>HALF_OF_YEAR</id>
  <n>Half-year number</n>
  <vis>0</vis>
  <dt>2</dt>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  <isSystem>1</isSystem>
  </it>
<it>
  <k>9</k>
  <id>QUARTER</id>
  <n>Quarter number</n>
  <vis>0</vis>
  <dt>2</dt>
  <dataDomain>0</dataDomain>
  <nullable>1</nullable>
  <hasHierarchy>0</hasHierarchy>
  <isSystem>1</isSystem>
  </it>
  </its>
  </attrs>
  </meta>
  </GetDmClnResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetDmCln" :
{
"tDim" :
{
"id" : "S1!M!S!DM2"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"attrs" : "Get"
}
}
}
}

JSON response:

{
"GetDmClnResult" :
{
"id" :
{
"id" : "S1!M!S!DM2"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "9",
"@hf" : "0",
"i" : "CALENDAR",
"n" : "Calendar",
"k" : "112",
"c" : "1026",
"p" : "103",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"startYear" : "2000",
"endYear" : "2003",
"startYearAsParam" : "0",
"endYearAsParam" : "0",
"hierarchy" : "0",
"attrCount" : "9",
"levelCount" : "6",
"reverseOrder" : "0",
"shiftForward" : "0",
"hierarchyCorrection" : "0",
"lastLevelNameAsDay" : "0",
"defaultOpenType" : "Hierarchical",
"isDynamicAttrs" : "1",
"attrs" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "BLOCK_TYPE",
"n" : "Calendar block type",
"vis" : "0",
"dt" : "2",
"dataDomain" : "0",
"nullable" : "0",
"hasHierarchy" : "0",
"isSystem" : "1"
},
{
"k" : "2",
"id" : "START_DATE",
"n" : "Period start date",
"vis" : "1",
"dt" : "4",
"dataDomain" : "0",
"nullable" : "0",
"hasHierarchy" : "0",
"isSystem" : "1"
},
{
"k" : "3",
"id" : "NAME",
"n" : "Calendar element name",
"vis" : "1",
"dt" : "1",
"predefined" : "Name",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0",
"isSystem" : "1"
},
{
"k" : "4",
"id" : "ID",
"n" : "Identifier",
"vis" : "0",
"dt" : "1",
"predefined" : "Ident",
"dataDomain" : "0",
"nullable" : "0",
"hasHierarchy" : "0",
"isSystem" : "1"
},
{
"k" : "5",
"id" : "ORDER",
"n" : "Order",
"vis" : "0",
"dt" : "2",
"uniqueIndex" : "INDEX_ORDER",
"predefined" : "Order",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0",
"isSystem" : "1"
},
{
"k" : "6",
"id" : "PERIOD",
"n" : "Period",
"vis" : "0",
"dt" : "4",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0",
"isSystem" : "1"
},
{
"k" : "7",
"id" : "YEAR",
"n" : "Year number",
"vis" : "0",
"dt" : "2",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0",
"isSystem" : "1"
},
{
"k" : "8",
"id" : "HALF_OF_YEAR",
"n" : "Half-year number",
"vis" : "0",
"dt" : "2",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0",
"isSystem" : "1"
},
{
"k" : "9",
"id" : "QUARTER",
"n" : "Quarter number",
"vis" : "0",
"dt" : "2",
"dataDomain" : "0",
"nullable" : "1",
"hasHierarchy" : "0",
"isSystem" : "1"
}
]
}
}
}
}
}
public static GetDmClnResult GetCalendar(DmId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetDmCln()
{
tArg = new GetDmClnArg()
{
pattern = new DmClnMdPattern()
{
attrs = ListOperation.Get
}
},
tDim = moniker
};
//Get information about calendar dictionary
var result = somClient.GetDmCln(tGet);
return result;
}

See also:

Working with Dictionaries