当前位置: 首页>>代码示例>>C#>>正文


C# BriefItemInfo.Add_Description方法代码示例

本文整理汇总了C#中SobekCM.Core.BriefItem.BriefItemInfo.Add_Description方法的典型用法代码示例。如果您正苦于以下问题:C# BriefItemInfo.Add_Description方法的具体用法?C# BriefItemInfo.Add_Description怎么用?C# BriefItemInfo.Add_Description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SobekCM.Core.BriefItem.BriefItemInfo的用法示例。


在下文中一共展示了BriefItemInfo.Add_Description方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the IDENTIFIERS
            if (Original.Bib_Info.Identifiers_Count > 0)
            {
                foreach (Identifier_Info thisIdentifier in Original.Bib_Info.Identifiers)
                {
                    // Add this identifier
                    if (!String.IsNullOrWhiteSpace(thisIdentifier.Type))
                    {
                        New.Add_Description("Resource Identifier", thisIdentifier.Identifier).Authority = thisIdentifier.Type;

                        // Special code for accession number
                        if (thisIdentifier.Type.IndexOf("ACCESSION", StringComparison.OrdinalIgnoreCase) >= 0)
                            New.Add_Description("Accession Number", thisIdentifier.Identifier).Authority = thisIdentifier.Type;
                    }
                    else
                    {
                        New.Add_Description("Resource Identifier", thisIdentifier.Identifier);
                    }
                }
            }

            return true;
        }
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:30,代码来源:Identifiers_BriefItemMapper.cs

示例2: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add each language
            if (Original.Bib_Info.Languages_Count > 0)
            {
                foreach (Language_Info thisLanguage in Original.Bib_Info.Languages)
                {
                    if (!String.IsNullOrWhiteSpace(thisLanguage.Language_Text))
                    {
                        string language_text = thisLanguage.Language_Text;
                        string from_possible_code = thisLanguage.Get_Language_By_Code(language_text);
                        if (from_possible_code.Length > 0)
                            language_text = from_possible_code;
                        New.Add_Description("Language", language_text);
                    }
                    else
                    {
                        if (!String.IsNullOrWhiteSpace(thisLanguage.Language_ISO_Code))
                        {
                            string language_text = thisLanguage.Get_Language_By_Code(thisLanguage.Language_ISO_Code);
                            if (language_text.Length > 0)
                            {
                                New.Add_Description("Language", language_text);
                            }
                        }
                    }
                }
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:36,代码来源:Languages_BriefItemMapper.cs

示例3: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add all the origination information, primarily dates )
            if (Original.Bib_Info.Origin_Info != null)
            {
                // Add the creation date
                if ((!String.IsNullOrWhiteSpace(Original.Bib_Info.Origin_Info.Date_Created)) && (Original.Bib_Info.Origin_Info.Date_Created.Trim() != "-1"))
                {
                    New.Add_Description("Creation Date", Original.Bib_Info.Origin_Info.Date_Created);
                }

                // Add the publication date, looking under DATE ISSUED, or under MARC DATE ISSUED
                if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Origin_Info.Date_Issued))
                {
                    if (Original.Bib_Info.Origin_Info.Date_Issued.Trim() != "-1")
                    {
                        New.Add_Description("Publication Date", Original.Bib_Info.Origin_Info.Date_Issued);
                    }
                }
                else if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Origin_Info.MARC_DateIssued))
                {
                    New.Add_Description("Publication Date", Original.Bib_Info.Origin_Info.MARC_DateIssued);
                }

                // Add the copyright date
                if ((!String.IsNullOrWhiteSpace(Original.Bib_Info.Origin_Info.Date_Copyrighted)) && (Original.Bib_Info.Origin_Info.Date_Copyrighted.Trim() != "-1"))
                {
                    New.Add_Description("Copyright Date", Original.Bib_Info.Origin_Info.Date_Copyrighted);
                }
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:38,代码来源:Dates_BriefItemMapper.cs

示例4: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the publisher, and place of publications
            if (Original.Bib_Info.Publishers_Count > 0)
            {
                // Keep track of place of publications alreadyadded
                Dictionary<string, string> pub_places = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

                // Step through each publisher
                foreach (Publisher_Info thisPublisher in Original.Bib_Info.Publishers)
                {
                    // Add the name
                    New.Add_Description("Publisher", thisPublisher.Name);

                    // Add the places of publication
                    foreach (Origin_Info_Place thisPubPlace in thisPublisher.Places)
                    {
                        if (!pub_places.ContainsKey(thisPubPlace.Place_Text))
                        {
                            New.Add_Description("Place of Publication", thisPubPlace.Place_Text);
                            pub_places.Add(thisPubPlace.Place_Text, thisPubPlace.Place_Text);
                        }
                    }
                }
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:33,代码来源:Publisher_BriefItemMapper.cs

示例5: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the aggregations
            if ((Original.Behaviors.Aggregation_Count > 0) && (Engine_ApplicationCache_Gateway.Codes != null))
            {
                foreach (Aggregation_Info thisAggr in Original.Behaviors.Aggregations)
                {
                    // Look for the aggregation in the current aggregation codes
                    Item_Aggregation_Related_Aggregations aggrObj = Engine_ApplicationCache_Gateway.Codes[thisAggr.Code];

                    // If the aggregation is NULL, as it may have been deleted, skip it
                    if (aggrObj == null) continue;

                    // If active, add with the URL, otherwise just add the short name
                    if (aggrObj.Active)
                    {
                        New.Add_Description("Aggregations", aggrObj.ShortName).Add_URI("[%BASEURL%]" + aggrObj.Code + "[%URLOPTS%]");
                    }
                    else
                    {
                        New.Add_Description("Aggregations", aggrObj.ShortName);
                    }
                }
            }

            return true;
        }
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:32,代码来源:Aggregations_BriefItemMapper.cs

示例6: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Attempt to pull the top-level geo-spatial data from the source object
            GeoSpatial_Information geoInfo = Original.Get_Metadata_Module(GlobalVar.GEOSPATIAL_METADATA_MODULE_KEY) as GeoSpatial_Information;

            // If there was geo-spatial data here, add it to the new item
            if ((geoInfo != null) && (geoInfo.hasData) && ((geoInfo.Point_Count > 0) || (geoInfo.Polygon_Count > 0)))
            {
                // Add each point first
                for (int i = 0; i < geoInfo.Point_Count; i++)
                {
                    if ( !String.IsNullOrEmpty(geoInfo.Points[i].Label))
                    {
                        New.Add_Description("Coordinates", geoInfo.Points[i].Latitude + " x " + geoInfo.Points[i].Longitude + " ( " + geoInfo.Points[i].Label + " )");
                    }
                    else
                    {
                        New.Add_Description("Coordinates", geoInfo.Points[i].Latitude + " x " + geoInfo.Points[i].Longitude );
                    }
                }

                // Add the polygons
                if (geoInfo.Polygon_Count == 1)
                {
                    for (int i = 0; i < geoInfo.Polygon_Count; i++)
                    {
                        Coordinate_Polygon polygon = geoInfo.Get_Polygon(i);
                        StringBuilder polygonBuilder = new StringBuilder();
                        foreach (Coordinate_Point thisPoint in polygon.Edge_Points)
                        {
                            if (polygonBuilder.Length > 0)
                            {
                                polygonBuilder.Append(", " + thisPoint.Latitude + " x " + thisPoint.Longitude);
                            }
                            else
                            {
                                polygonBuilder.Append(thisPoint.Latitude + " x " + thisPoint.Longitude);
                            }
                        }

                        if (polygon.Label.Length > 0)
                        {
                            polygonBuilder.Append(" ( " + polygon.Label + " )");
                        }
                        if (polygonBuilder.ToString().Trim().Length > 0)
                        {
                            New.Add_Description("Polygon", polygonBuilder.ToString());
                        }
                    }
                }
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:59,代码来源:GeoSpatial_BriefItemMapper.cs

示例7: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the SOURCE INSTITUTION information
            if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Source.Statement))
            {
                // Add the source institution
                BriefItem_DescTermValue sourceValue = New.Add_Description("Source Institution", Original.Bib_Info.Source.Statement);

                // Was the code present, and active?
                if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Source.Code))
                {
                    if ((Engine_ApplicationCache_Gateway.Codes != null) && (Engine_ApplicationCache_Gateway.Codes.isValidCode("i" + Original.Bib_Info.Source.Code)))
                    {
                        Item_Aggregation_Related_Aggregations sourceAggr = Engine_ApplicationCache_Gateway.Codes["i" + Original.Bib_Info.Source.Code];
                        if (sourceAggr.Active)
                        {
                            sourceValue.Add_URI("[%BASEURL%]" + "i" + Original.Bib_Info.Source.Code + "[%URLOPTS%]");
                        }

                        // Was there an external link on this agggreation?
                        if (!String.IsNullOrWhiteSpace(sourceAggr.External_Link))
                        {
                            sourceValue.Add_URI(sourceAggr.External_Link);
                        }
                    }
                }
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:35,代码来源:Source_Institution_BriefItemMapper.cs

示例8: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // If there is an External link, PURL EAD link, or EAD Name, add them
            if (Original.Bib_Info.hasLocationInformation)
            {
                New.Add_Description("External Link", Original.Bib_Info.Location.Other_URL);
                New.Add_Description("Permanent Link", Original.Bib_Info.Location.PURL);

                // Add the EAD, with the URL if it exists
                if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Location.EAD_URL))
                    New.Add_Description("Finding Guide Name", Original.Bib_Info.Location.EAD_Name).Add_URI(Original.Bib_Info.Location.EAD_URL);
                else
                    New.Add_Description("Finding Guide Name", Original.Bib_Info.Location.EAD_Name);
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:22,代码来源:Links_BriefItemMapper.cs

示例9: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Try to get the VRA Core metadata
            VRACore_Info vraInfo = Original.Get_Metadata_Module(GlobalVar.VRACORE_METADATA_MODULE_KEY) as VRACore_Info;

            // Add the learning object metadata if it exists
            if ((vraInfo != null) && (vraInfo.hasData))
            {
                // Collect the state/edition information
                if (vraInfo.State_Edition_Count > 0)
                {
                    New.Add_Description("State / Edition", vraInfo.State_Editions);
                }

                // Collect and display all the material information
                if (vraInfo.Material_Count > 0)
                {
                    foreach (VRACore_Materials_Info materials in vraInfo.Materials)
                    {
                        New.Add_Description("Materials", materials.Materials);
                    }
                }

                // Collect and display all the measurements information
                if (vraInfo.Measurement_Count > 0)
                {
                    foreach (VRACore_Measurement_Info measurement in vraInfo.Measurements)
                    {
                        New.Add_Description("Measurements", measurement.Measurements);
                    }
                }

                // Display all cultural context information
                if (vraInfo.Cultural_Context_Count > 0)
                {
                    New.Add_Description("Cultural Context", vraInfo.Cultural_Contexts );
                }

                // Display all style/period information
                if (vraInfo.Style_Period_Count > 0)
                {
                    New.Add_Description("Style/Period", vraInfo.Style_Periods);
                }

                // Display all technique information
                if (vraInfo.Technique_Count > 0)
                {
                    New.Add_Description("Technique", vraInfo.Techniques);
                }

                // Add the inscriptions
                if (vraInfo.Inscription_Count > 0)
                {
                    New.Add_Description("Inscription", vraInfo.Inscriptions);
                }
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:64,代码来源:VRACore_BriefItemMapper.cs

示例10: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the physical description
            if ((Original.Bib_Info.Original_Description != null) && (!String.IsNullOrWhiteSpace(Original.Bib_Info.Original_Description.Extent)))
            {
                New.Add_Description("Physical Description", Original.Bib_Info.Original_Description.Extent);
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:15,代码来源:Physical_Description_BriefItemMapper.cs

示例11: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the donor
            if ((Original.Bib_Info.hasDonor) && (!String.IsNullOrWhiteSpace(Original.Bib_Info.Donor.Full_Name)))
            {
                New.Add_Description("Donor", Original.Bib_Info.Donor.ToString());
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:15,代码来源:Donor_BriefItemMapper.cs

示例12: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the notes
            if (Original.Bib_Info.Notes_Count > 0)
            {
                Note_Info statementOfResponsibility = null;
                foreach (Note_Info thisNote in Original.Bib_Info.Notes)
                {
                    if (thisNote.Note_Type != Note_Type_Enum.NONE)
                    {
                        // Statement of responsibilty will be printed at the very end
                        if (thisNote.Note_Type == Note_Type_Enum.StatementOfResponsibility)
                        {
                            statementOfResponsibility = thisNote;
                        }
                        else
                        {
                            if (thisNote.Note_Type != Note_Type_Enum.InternalComments)
                            {
                                BriefItem_DescTermValue newAbstract = New.Add_Description("Note", thisNote.Note);
                                newAbstract.SubTerm = thisNote.Note_Type_Display_String;

                                if (!String.IsNullOrWhiteSpace(thisNote.Display_Label))
                                    newAbstract.SubTerm = thisNote.Display_Label;
                            }
                        }
                    }
                    else
                    {
                        New.Add_Description("Note", thisNote.Note);
                    }
                }

                // If there was a statement of responsibility, add it now
                if (statementOfResponsibility != null )
                {
                    New.Add_Description("Note", statementOfResponsibility.Note).SubTerm = statementOfResponsibility.Note_Type_Display_String;
                }
            }

            return true;
        }
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:47,代码来源:Notes_BriefItemMapper.cs

示例13: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the genres
            if (Original.Bib_Info.Genres_Count > 0)
            {
                foreach (Genre_Info thisGenre in Original.Bib_Info.Genres)
                {
                    if (!String.IsNullOrWhiteSpace(thisGenre.Authority))
                    {
                        New.Add_Description("Genre", thisGenre.Genre_Term).Authority = thisGenre.Authority;
                    }
                    else
                    {
                        New.Add_Description("Genre", thisGenre.Genre_Term);
                    }
                }
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:25,代码来源:Genres_BriefItemMapper.cs

示例14: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the IDENTIFIERS
            if (Original.Bib_Info.Identifiers_Count > 0)
            {
                foreach (Identifier_Info thisIdentifier in Original.Bib_Info.Identifiers)
                {
                    if (!String.IsNullOrWhiteSpace(thisIdentifier.Type))
                    {
                        New.Add_Description("Resource Identifier", thisIdentifier.Identifier).Authority = thisIdentifier.Type;
                    }
                    else
                    {
                        New.Add_Description("Resource Identifier", thisIdentifier.Identifier);
                    }
                }
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:25,代码来源:Identifiers_BriefItemMapper.cs

示例15: MapToBriefItem

        /// <summary> Map one or more data elements from the original METS-based object to the
        /// BriefItem object </summary>
        /// <param name="Original"> Original METS-based object </param>
        /// <param name="New"> New object to populate some data from the original </param>
        /// <returns> TRUE if successful, FALSE if an exception is encountered </returns>
        public bool MapToBriefItem(SobekCM_Item Original, BriefItemInfo New)
        {
            // Add the target audiences
            if (Original.Bib_Info.Target_Audiences_Count > 0)
            {
                foreach (TargetAudience_Info thisAudience in Original.Bib_Info.Target_Audiences)
                {
                    if (!String.IsNullOrWhiteSpace(thisAudience.Authority))
                    {
                        New.Add_Description("Target Audience", thisAudience.Audience).Authority = thisAudience.Authority;
                    }
                    else
                    {
                        New.Add_Description("Target Audience", thisAudience.Audience).Authority = thisAudience.Authority;
                    }
                }
            }

            return true;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:25,代码来源:Target_Audience_BriefItemMapper.cs


注:本文中的SobekCM.Core.BriefItem.BriefItemInfo.Add_Description方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。