Beispiel #1
0
        static void DisplayDtsStatistics(Taxonomy.Dts dts)
        {
            System.Console.WriteLine(String.Format("DTS contains {0} documents.", dts.Documents.Count));
            System.Console.WriteLine(String.Format("DTS contains {0} taxonomy schemas.", dts.TaxonomySchemas.Count));
            System.Console.WriteLine(String.Format("DTS contains {0} linkbases.", dts.Linkbases.Count));
            System.Console.WriteLine();

            System.Console.WriteLine(String.Format("DTS contains {0} concepts.", dts.Concepts.Count));
            System.Console.WriteLine(String.Format("DTS contains {0} tuples.", dts.Tuples.Count));
            System.Console.WriteLine(String.Format("DTS contains {0} non-xdt items.", dts.Items.Count - dts.Hypercubes.Count - dts.Dimensions.Count));
            System.Console.WriteLine(String.Format("DTS contains {0} hypercubes.", dts.Hypercubes.Count));
            System.Console.WriteLine(String.Format("DTS contains {0} dimensions.", dts.Dimensions.Count));
            System.Console.WriteLine();

            System.Console.WriteLine(String.Format("DTS contains {0} parameters.", dts.Parameters.Count));
            System.Console.WriteLine(String.Format("DTS contains {0} assertions.", dts.Assertions.Count));
            System.Console.WriteLine(String.Format("DTS contains {0} formulas.", dts.Formulas.Count));
            System.Console.WriteLine(String.Format("DTS contains {0} tables.", dts.Tables.Count));
            System.Console.WriteLine();

            System.Console.WriteLine(String.Format("DTS contains {0} definition linkroles.", dts.GetDefinitionLinkRoles().Count));
            System.Console.WriteLine(String.Format("DTS contains {0} presentation linkroles.", dts.GetPresentationLinkRoles().Count));
            System.Console.WriteLine(String.Format("DTS contains {0} calculation linkroles.", dts.GetCalculationLinkRoles().Count));
            System.Console.WriteLine(String.Format("DTS contains {0} label linkroles.", dts.GetLabelLinkRoles().Count));
            System.Console.WriteLine(String.Format("DTS contains {0} reference linkroles.", dts.GetReferenceLinkRoles().Count));
            System.Console.WriteLine();
        }
Beispiel #2
0
        static string GetDefinition(Taxonomy.Dts dts, string roleUri)
        {
            var roleType = dts.GetRoleType(roleUri);

            if (roleType != null)
            {
                var definition = roleType.Definition;
                if (definition != null)
                {
                    return(definition.Value);
                }
            }
            return(roleUri);
        }
Beispiel #3
0
        static Taxonomy.Concept GetUsGaapConcept(Taxonomy.Dts dts, string name)
        {
            // Find the us-gaap namespace referenced within the DTS
            string usgaap_namespace = null;

            foreach (var taxonomy in dts.TaxonomySchemas)
            {
                if (taxonomy.TargetNamespace.StartsWith("http://fasb.org/us-gaap/"))
                {
                    usgaap_namespace = taxonomy.TargetNamespace;
                    break;
                }
            }
            if (usgaap_namespace == null)
            {
                return(null);
            }

            // Find the us-gaap concept wihtin the DTS
            return(dts.ResolveConcept(name, usgaap_namespace));
        }