本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}