GetDmClnResult GetDmCln(DmId tDim, GetDmClnArg tArg)
tDim. Moniker of opened calendar dictionary instance.
tArg. Operation execution parameters.
The GetDmCln operation gets calendar dictionary metadata.
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.
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.
{
"GetDmCln" :
{
"tDim" :
{
"id" : "S1!M!S!DM2"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"attrs" : "Get"
}
}
}
}
{
"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: