public Add_Description ( string Term, string Value ) : |
||
Term | string | Normalized term for this metadata element, as employed by the SobekCM system |
Value | string | String version of this single value for a metadata term/type |
리턴 |
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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 abstracts if (Original.Bib_Info.Abstracts_Count > 0) { foreach (Abstract_Info thisAbstract in Original.Bib_Info.Abstracts) { if (!String.IsNullOrWhiteSpace(thisAbstract.Display_Label)) { New.Add_Description("Abstract", thisAbstract.Abstract_Text).SubTerm = thisAbstract.Display_Label; } else { New.Add_Description("Abstract", thisAbstract.Abstract_Text); } } } return true; }
/// <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 CLASSIFICATIONS if (Original.Bib_Info.Classifications_Count > 0) { foreach (Classification_Info thisClassification in Original.Bib_Info.Classifications) { if (!String.IsNullOrWhiteSpace(thisClassification.Authority)) { New.Add_Description("Classification", thisClassification.Classification).Authority = thisClassification.Authority; } else { New.Add_Description("Classification", thisClassification.Classification); } } } return true; }
/// <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) { Item_Aggregation_Related_Aggregations aggrObj = Engine_ApplicationCache_Gateway.Codes[thisAggr.Code]; if (aggrObj.Active) { New.Add_Description("Aggregations", aggrObj.ShortName).Add_URI("[%BASEURL%]" + aggrObj.Code + "[%URLOPTS%]"); } else { New.Add_Description("Aggregations", aggrObj.ShortName); } } } return true; }
/// <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 (author) affiliations if (Original.Bib_Info.Affiliations_Count > 0) { foreach (Affiliation_Info thisAffiliation in Original.Bib_Info.Affiliations) { New.Add_Description("Affiliation", thisAffiliation.ToString()); } } return true; }
/// <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 zoological taxonomy data Zoological_Taxonomy_Info taxonInfo = Original.Get_Metadata_Module(GlobalVar.ZOOLOGICAL_TAXONOMY_METADATA_MODULE_KEY) as Zoological_Taxonomy_Info; // Add the taxonomic data if it exists if ((taxonInfo != null) && (taxonInfo.hasData)) { New.Add_Description("Scientific Name", taxonInfo.Scientific_Name); New.Add_Description("Kingdom", taxonInfo.Kingdom); New.Add_Description("Phylum", taxonInfo.Phylum); New.Add_Description("Class", taxonInfo.Class); New.Add_Description("Order", taxonInfo.Order); New.Add_Description("Family", taxonInfo.Family); New.Add_Description("Genus", taxonInfo.Genus); New.Add_Description("Species", taxonInfo.Specific_Epithet); New.Add_Description("Taxonomic Rank", taxonInfo.Taxonomic_Rank); New.Add_Description("Common Name", taxonInfo.Common_Name); } return true; }
/// <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 desciption user tags if (Original.Behaviors.User_Tags_Count > 0) { foreach (Descriptive_Tag tag in Original.Behaviors.User_Tags) { New.Add_Description("User Description", tag.Description_Tag).Authority = tag.UserName + "|" + tag.Date_Added.ToShortDateString(); } } return true; }
/// <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 containers if (Original.Bib_Info.Containers_Count > 0) { foreach (Finding_Guide_Container thisContainer in Original.Bib_Info.Containers) { New.Add_Description("Physical Location", thisContainer.Name).SubTerm = thisContainer.Type; } } return true; }
/// <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 RIGHTS STATEMENT if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Access_Condition.Text)) { string value = Original.Bib_Info.Access_Condition.Text; string uri = String.Empty; if (value.IndexOf("[cc by-nc-nd]") >= 0) { value = value.Replace("[cc by-nc-nd]", String.Empty); uri = "http://creativecommons.org/licenses/by-nc-nd/3.0/"; } if (value.IndexOf("[cc by-nc-sa]") >= 0) { value = value.Replace("[cc by-nc-sa]", String.Empty); uri = "http://creativecommons.org/licenses/by-nc-sa/3.0/"; } if (value.IndexOf("[cc by-nc]") >= 0) { value = value.Replace("[cc by-nc]", String.Empty); uri = "http://creativecommons.org/licenses/by-nc/3.0/"; } if (value.IndexOf("[cc by-nd]") >= 0) { value = value.Replace("[cc by-nd]", String.Empty); uri = "http://creativecommons.org/licenses/by-nd/3.0/"; } if (value.IndexOf("[cc by-sa]") >= 0) { value = value.Replace("[cc by-sa]", String.Empty); uri = "http://creativecommons.org/licenses/by-sa/3.0/"; } if (value.IndexOf("[cc by]") >= 0) { value = value.Replace("[cc by]", String.Empty); uri = "http://creativecommons.org/licenses/by/3.0/"; } if (value.IndexOf("[cc0]") >= 0) { value = value.Replace("[cc0]", String.Empty); uri = "http://creativecommons.org/publicdomain/zero/1.0/"; } BriefItem_DescTermValue rightsVal = New.Add_Description("Rights Management", value); if (uri.Length > 0) rightsVal.Add_URI(uri); } return true; }
/// <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 manufacturers if (Original.Bib_Info.Manufacturers_Count > 0) { foreach (Publisher_Info thisPublisher in Original.Bib_Info.Manufacturers) { // Add the name New.Add_Description("Manufacturer", thisPublisher.Name); } } return true; }
/// <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) { // Collect the state/edition information if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Origin_Info.Edition)) { New.Add_Description("Edition", Original.Bib_Info.Origin_Info.Edition); } } return true; }
/// <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 (Original.Bib_Info.Subjects_Count > 0) { int spatial_count = 1; foreach (Subject_Info thisSubject in Original.Bib_Info.Subjects) { if (thisSubject.Class_Type == Subject_Info_Type.Hierarchical_Spatial) { // Determine the term to use string term = "Hierarchical Spatial"; if (spatial_count > 1) term = term + " (" + spatial_count + ")"; // Start to build this BriefItem_DescriptiveTerm thisTerm = new BriefItem_DescriptiveTerm(term); // Cast to the hierarchical geographic subject Subject_Info_HierarchicalGeographic hieroSubj = (Subject_Info_HierarchicalGeographic)thisSubject; // Now, step through and add each subterm if (!String.IsNullOrWhiteSpace(hieroSubj.Continent)) thisTerm.Add_Value(hieroSubj.Continent, "Continent"); if (!String.IsNullOrWhiteSpace(hieroSubj.Country)) thisTerm.Add_Value(hieroSubj.Country, "Country"); if (!String.IsNullOrWhiteSpace(hieroSubj.Province)) thisTerm.Add_Value(hieroSubj.Province, "Province"); if (!String.IsNullOrWhiteSpace(hieroSubj.Region)) thisTerm.Add_Value(hieroSubj.Region, "Region"); if (!String.IsNullOrWhiteSpace(hieroSubj.State)) thisTerm.Add_Value(hieroSubj.State, "State"); if (!String.IsNullOrWhiteSpace(hieroSubj.Territory)) thisTerm.Add_Value(hieroSubj.Territory, "Territory"); if (!String.IsNullOrWhiteSpace(hieroSubj.County)) thisTerm.Add_Value(hieroSubj.County, "County"); if (!String.IsNullOrWhiteSpace(hieroSubj.City)) thisTerm.Add_Value(hieroSubj.City, "City"); if (!String.IsNullOrWhiteSpace(hieroSubj.CitySection)) thisTerm.Add_Value(hieroSubj.CitySection, "City Section"); if (!String.IsNullOrWhiteSpace(hieroSubj.Island)) thisTerm.Add_Value(hieroSubj.Island, "Island"); if (!String.IsNullOrWhiteSpace(hieroSubj.Area)) thisTerm.Add_Value(hieroSubj.Area, "Area"); // Were some values found? if ((thisTerm.Values != null) && (thisTerm.Values.Count > 0)) { New.Add_Description(thisTerm); spatial_count++; } } } } return true; }
/// <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 ticklers if (Original.Behaviors.Ticklers_Count > 0) { New.Add_Description("Ticklers", Original.Behaviors.Ticklers); } // Add some internal values (usually not displayed for non-internal users) New.Add_Description("Format", Original.Bib_Info.SobekCM_Type_String); New.Add_Description("Creation Date", Original.METS_Header.Create_Date.ToShortDateString()); New.Add_Description("Last Modified", Original.METS_Header.Modify_Date.ToShortDateString()); New.Add_Description("Last Type", Original.METS_Header.RecordStatus); New.Add_Description("Last User", Original.METS_Header.Creator_Individual); New.Add_Description("System Folder", Original.Web.AssocFilePath.Replace("/", "\\")); return true; }
/// <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 main title New.Add_Description("Title", (Original.Bib_Info.Main_Title.NonSort + " " + Original.Bib_Info.Main_Title.Title + " " + Original.Bib_Info.Main_Title.Subtitle).Trim()); // Add all the "other titles" if (Original.Bib_Info.Other_Titles_Count > 0) { foreach (Title_Info thisTitle in Original.Bib_Info.Other_Titles) { switch (thisTitle.Title_Type) { case Title_Type_Enum.UNSPECIFIED: case Title_Type_Enum.Alternative: string titleType = thisTitle.Display_Label; if ((!String.IsNullOrWhiteSpace(titleType)) && ( String.Compare(titleType, "OTHER TITLE", StringComparison.InvariantCultureIgnoreCase ) != 0 )) New.Add_Description("Alternate Title", (thisTitle.NonSort + " " + thisTitle.Title + " " + thisTitle.Subtitle).Trim()).SubTerm = titleType; else New.Add_Description("Alternate Title", (thisTitle.NonSort + " " + thisTitle.Title + " " + thisTitle.Subtitle).Trim()); break; case Title_Type_Enum.Uniform: New.Add_Description("Uniform Title", (thisTitle.NonSort + " " + thisTitle.Title + " " + thisTitle.Subtitle).Trim()); break; case Title_Type_Enum.Translated: New.Add_Description("Translated Title", (thisTitle.NonSort + " " + thisTitle.Title + " " + thisTitle.Subtitle).Trim()).Language = thisTitle.Language; break; case Title_Type_Enum.Abbreviated: New.Add_Description("Abbreviated Title", (thisTitle.NonSort + " " + thisTitle.Title + " " + thisTitle.Subtitle).Trim()); break; } } } // Add the series title if (Original.Bib_Info.hasSeriesTitle) New.Add_Description("Series Title", (Original.Bib_Info.SeriesTitle.NonSort + " " + Original.Bib_Info.SeriesTitle.Title + " " + Original.Bib_Info.SeriesTitle.Subtitle).Trim()); return true; }
/// <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 frequency if (Original.Bib_Info.Origin_Info.Frequencies_Count > 0) { Dictionary<string, string> frequencies = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); foreach (Origin_Info_Frequency thisFrequency in Original.Bib_Info.Origin_Info.Frequencies) { if (!frequencies.ContainsKey(thisFrequency.Term)) { frequencies.Add(thisFrequency.Term, thisFrequency.Term); New.Add_Description("Frequency", thisFrequency.Term); } } } } return true; }
/// <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 subjects and coordinate information if that exists if (Original.Bib_Info.TemporalSubjects_Count > 0) { foreach (Temporal_Info thisTemporal in Original.Bib_Info.TemporalSubjects) { if (thisTemporal.TimePeriod.Length > 0) { if ((thisTemporal.Start_Year > 0) && (thisTemporal.End_Year > 0)) { New.Add_Description("Temporal Coverage", thisTemporal.TimePeriod + " ( " + thisTemporal.Start_Year + " - " + thisTemporal.End_Year + " )"); } if ((thisTemporal.Start_Year > 0) && (thisTemporal.End_Year <= 0)) { New.Add_Description("Temporal Coverage", thisTemporal.TimePeriod + " ( " + thisTemporal.Start_Year + " - )"); } if ((thisTemporal.Start_Year <= 0) && (thisTemporal.End_Year > 0)) { New.Add_Description("Temporal Coverage", thisTemporal.TimePeriod + " ( - " + thisTemporal.End_Year + " )"); } } else { if ((thisTemporal.Start_Year > 0) && (thisTemporal.End_Year > 0)) { New.Add_Description("Temporal Coverage", thisTemporal.Start_Year + " - " + thisTemporal.End_Year); } if ((thisTemporal.Start_Year > 0) && (thisTemporal.End_Year <= 0)) { New.Add_Description("Temporal Coverage", thisTemporal.Start_Year + " - "); } if ((thisTemporal.Start_Year <= 0) && (thisTemporal.End_Year > 0)) { New.Add_Description("Temporal Coverage", " - " + thisTemporal.End_Year); } } } } return true; }