The MDEX Engine returns information about why a precedence rule
fired as a
DGraph.WhyPrecedenceRuleFired
property on each root
dimension value.
The following code samples show how to extract and display the
DGraph.WhyPrecedenceRuleFired
property from a root
dimension value.
Example 104. Java example
// Retrieve the results object. Navigation result = results.getNavigation(); // Retrieve the refinements. DimensionList l = result.getRefinementDimensions(); // Retrieve the dimension with ID 80000. Dimension d = l.getDimension(800000); // Retrieve the root dval for the dimension. DimVal root = d.getRoot(); PropertyMap propsMap = root.getProperties(); // Get the WhyPrecedenceRuleFired property value String wprf = (String) propsMap.get("DGraph.WhyPrecedenceRuleFired"); // Display the value if one exists if (wprf != null) { //Do something }
Example 105. .NET example
// Retrieve the results object. Navigation result = results.Navigation; // Retrieve the refinements. DimensionList l = result.RefinementDimensions; // Retrieve the dimension with ID 80000. Dimension d = l.GetDimension(800000); // Retrieve the root dval for the dimension. DimVal root = d.Root; PropertyMap propsMap = root.Properties; // Get the WhyPrecedenceRuleFired property value String wprf = propsMap["DGraph.WhyPrecedenceRuleFired"].ToString(); // Display the value if one exists if (wprf != null) { //Do something }