GetTreeElementsResult GetTreeElements(TreeId tTree, GetTreeElementsArg tArg)
tTree. Moniker of the metadata tree, for which the operation is executed.
tArg. Parameters of getting metadata tree.
The GetTreeElements operation gets express report metadata tree.
This operation enables the user to get information about structure of the sources, on which express report is based, as a tree of elements. Information stored in the elements can be further used to create formulas. To execute the operation, specify the created tree moniker in tTree and parameters of metadata elements extraction in tArg. The obtained elements are available after executing the operation in the els field.
Below is the example of using the GetTreeElements operation to get metadata tree for the specified express report sheet. The request contains express report moniker and sheet key. The response contains a set of metadata elements.
{ "GetTreeElements" : { "tTree" : { "id" : "S1!M!S!E1!Sheets!189!MtdTree" }, "tArg" : { "parent" : { "key" : "" }, "filter" : { "text" : { "text" : "Element", "searchName" : "true", "searchId" : "false" }, "includeParents" : "false" }, "pattern" : { "getParentKey" : "true", "getHasChildren" : "true", "getLevel" : "true", "getChildIndex" : "true", "getChildrenCount" : "true", "getTerm" : "true", "getClsIdDataType" : "true" }, "range" : { "start" : "0", "count" : "100" }, "filteredCount" : "true" } } } :
{ "GetTreeElementsResult" : { "els" : { "e" : [ { "@c" : "1", "@h" : "0", "@i" : "0", "@hc" : "1", "@l" : "1", "k" : "3", "n" : "Cube (elements)", "id" : "OBJ183", "p" : "2", "classId" : "1287", "tag" : "eax.src" }, { "@c" : "2", "@h" : "2", "@i" : "0", "@hc" : "1", "@l" : "4", "k" : "7", "n" : "Elements", "id" : "", "p" : "5", "tag" : "eax.des" }, { "@c" : "1", "@h" : "1", "@i" : "0", "@hc" : "1", "@l" : "5", "k" : "13", "n" : "Element 1", "id" : "1", "p" : "7", "tag" : "eax.de", "term" : { "it" : [ { "n" : "tag", "v" : "eax.de" }, { "n" : "key", "v" : "116" }, { "n" : "elKey", "v" : "1" } ] } }, { "@c" : "1", "@h" : "1", "@i" : "0", "@hc" : "1", "@l" : "6", "k" : "15", "n" : "Element 2", "id" : "2", "p" : "13", "tag" : "eax.de", "term" : { "it" : [ { "n" : "tag", "v" : "eax.de" }, { "n" : "key", "v" : "116" }, { "n" : "elKey", "v" : "2" } ] } }, { "@c" : "0", "@h" : "0", "@i" : "0", "@hc" : "0", "@l" : "7", "k" : "16", "n" : "Element 3", "id" : "3", "p" : "15", "tag" : "eax.de", "term" : { "it" : [ { "n" : "tag", "v" : "eax.de" }, { "n" : "key", "v" : "116" }, { "n" : "elKey", "v" : "3" } ] } }, { "@c" : "0", "@h" : "0", "@i" : "1", "@hc" : "0", "@l" : "5", "k" : "14", "n" : "Element 4", "id" : "4", "p" : "7", "tag" : "eax.de", "term" : { "it" : [ { "n" : "tag", "v" : "eax.de" }, { "n" : "key", "v" : "116" }, { "n" : "elKey", "v" : "4" } ] } } ] }, "filteredCount" : "6", "id" : { "id" : "S1!M!S!E1!Sheets!189!MtdTree" } } },
public static GetTreeElementsResult GetSheetMetadata(EaxId moniker, ulong sheetKey) { var somClient = new SomPortTypeClient(); //Proxy object for operation execution //Operation execution parameters var tGet = new GetTreeElements() { tArg = new GetTreeElementsArg() { parent = new ElKey() { key = "" }, filter = new TreeElsFilter() { includeParents = false, text = new TreeTextFilter() { searchId = false, searchName = true, text = "Element" } }, filteredCount = true, pattern = new TreeElsPattern() { getChildIndex = true, getChildrenCount = true, getClsIdDataType = true, getHasChildren = true, getLevel = true, getParentKey = true, getTerm = true }, range = new ListRange() { start = 0, count = 100 } }, tTree = new TreeId() { id = moniker.id + "!Sheets!" + sheetKey.ToString() + "!MtdTree" } }; //Get information var result = somClient.GetTreeElements(tGet); return result; },
See also: