Example #1
0
        internal static string GetOpenAspectHeaderLabel(Xbrl.Table.Layout.Axis axis, Xbrl.Table.AspectNode openAspectNode, int row)
        {
            string openAspectLabel = GetLabel(openAspectNode, false);

            if (openAspectLabel == null)
            {
                // Use breakdown label if the aspect node is the only child
                var breakdown = axis.GetDefinitionBreakdown((uint)row);
                if (breakdown != null && breakdown.TreeRelationships.Count == 1)
                {
                    openAspectLabel = GetLabel(breakdown, false);
                }
            }
            if (openAspectLabel == null)
            {
                var aspect = openAspectNode.ParticipatingAspects.FirstOrDefault();
                if (aspect != null)
                {
                    openAspectLabel = GetLabel(aspect.Dimension, true);
                }
            }
            // Fallback to the id
            if (openAspectLabel == null)
            {
                openAspectLabel = openAspectNode.Id;
            }
            return(openAspectLabel);
        }
Example #2
0
        internal static string GetHeaderLabel(Xbrl.Table.Layout.Axis axis, Xbrl.Table.Layout.AxisHeader header, int row)
        {
            string label = GetLabel(header, false);

            if (label == null)
            {
                label = GetLabel(axis.GetDefinitionBreakdown((uint)row), false);
            }
            return(label);
        }
Example #3
0
        internal static string GetOpenAspectRCCode(Xbrl.Table.Layout.Axis axis, Xbrl.Table.AspectNode openAspectNode, int row)
        {
            string openAspectRC = GetRCCode(openAspectNode);

            if (openAspectRC == null)
            {
                openAspectRC = GetRCCode(axis.GetDefinitionBreakdown((uint)row));
            }
            return(openAspectRC);
        }