Esempio n. 1
0
        internal TaxonomyItem CloneTaxonomyItem()
        {
            TaxonomyItem clone = new TaxonomyItem();

            clone.AucentExtendedTaxonomy = this.AucentExtendedTaxonomy;
            clone.Namespace      = this.Namespace;
            clone.WebLocation    = this.WebLocation;
            clone.Location       = this.Location;
            clone.HasCustomTypes = this.HasCustomTypes;


            return(clone);
        }
Esempio n. 2
0
        private void WriteDimensionInfo(XmlElement parent, ContextDimensionInfo cdi,
                                        XmlElement root, XmlDocument doc, Taxonomy[] taxonomies)
        {
            if (taxonomies != null)
            {
                root.SetAttribute(string.Format(DocumentBase.NAME_FORMAT, DocumentBase.XMLNS, DocumentBase.XBRLDI_PREFIX), DocumentBase.XBRLDI_URI);

                //Add the dimension TI to the root attributes...
                Element      dimensionEle;
                TaxonomyItem dimensionTI = GetMemberTaxonomyItem(cdi.dimensionId,
                                                                 taxonomies, out dimensionEle);
                if (dimensionTI != null)
                {
                    root.SetAttribute(string.Format(DocumentBase.NAME_FORMAT, DocumentBase.XMLNS, dimensionTI.Namespace), dimensionTI.WebLocation);
                }
                else
                {
                    //error
                    return;
                }
                Element      memberEle;
                TaxonomyItem memberTI = GetMemberTaxonomyItem(cdi.Id,
                                                              taxonomies, out memberEle);
                if (memberTI != null)
                {
                    root.SetAttribute(string.Format(DocumentBase.NAME_FORMAT, DocumentBase.XMLNS, memberTI.Namespace), memberTI.WebLocation);
                }
                else
                {
                    //error
                    return;
                }
                //need to find the member taxonomy item
                XmlElement innerEle = doc.CreateElement(DocumentBase.XBRLDI_PREFIX, EXPLICITMEMBER, DocumentBase.XBRLDI_URI);
                innerEle.SetAttribute(DIMENSION, string.Format(DocumentBase.NAME_FORMAT, dimensionTI.Namespace, dimensionEle.Name));
                parent.AppendChild(innerEle);
                innerEle.InnerText = string.Format(DocumentBase.NAME_FORMAT, memberTI.Namespace, memberEle.Name);
            }
            else
            {
                //error
            }
        }
Esempio n. 3
0
        internal TaxonomyItem CloneTaxonomyItem()
        {
            TaxonomyItem clone = new TaxonomyItem();
            clone.AucentExtendedTaxonomy = this.AucentExtendedTaxonomy;
            clone.Namespace = this.Namespace;
            clone.WebLocation = this.WebLocation;
            clone.Location = this.Location;
            clone.HasCustomTypes = this.HasCustomTypes;

            return clone;
        }
Esempio n. 4
0
        /// <summary>
        /// Returns a list of all the file names and locations of the dependent taxonomies 
        /// that this taxonomy imports.
        /// </summary>
        /// <param name="numErrors"></param>
        /// <returns></returns>
        public ArrayList FindAllImports( out int numErrors )
        {
            ArrayList allImports = new ArrayList();
            numErrors = 0;

            if ( dependantTaxonomies.Count == 0 )
            {
                numErrors += LoadDependantTaxonomies(this.schemaPath);
            }

            // put ourselves first (0th index)
            TaxonomyItem tItem = new TaxonomyItem( GetTargetNamespace(),
                schemaFile, GetNSPrefix(), this.IsAucentExtension, false );
            allImports.Add( tItem.Location );

            for ( int i = 0; i < dependantTaxonomies.Count; ++i )
            {
                Taxonomy t = (Taxonomy)dependantTaxonomies[i];
                TaxonomyItem depTItem = new TaxonomyItem( t.GetTargetNamespace(),
                    t.schemaFile, t.GetNSPrefix(), t.IsAucentExtension, t.DefinesCustomTypes);
                allImports.Add(t.schemaFile);
            }

            return allImports;
        }
Esempio n. 5
0
 public TaxonomyItemMap(TaxonomyItem f, TaxonomyItem t)
 {
     FromItem = f;
     ToItem   = t;
 }
Esempio n. 6
0
 public TaxonomyItemMap(TaxonomyItem f , TaxonomyItem t)
 {
     FromItem = f;
     ToItem = t;
 }