/// <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) { // 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 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 the HOLDING LOCATION information if ((Original.Bib_Info.hasLocationInformation) && (!String.IsNullOrWhiteSpace(Original.Bib_Info.Location.Holding_Name))) { // Add the source institution BriefItem_DescTermValue sourceValue = New.Add_Description("Holding Location", Original.Bib_Info.Location.Holding_Name); // Was the code present, and active? if (!String.IsNullOrWhiteSpace(Original.Bib_Info.Location.Holding_Code)) { if ((Engine_ApplicationCache_Gateway.Codes != null) && (Engine_ApplicationCache_Gateway.Codes.isValidCode("i" + Original.Bib_Info.Location.Holding_Code))) { Item_Aggregation_Related_Aggregations sourceAggr = Engine_ApplicationCache_Gateway.Codes["i" + Original.Bib_Info.Location.Holding_Code]; if (sourceAggr.Active) { sourceValue.Add_URI("[%BASEURL%]" + "i" + Original.Bib_Info.Location.Holding_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 not URL, jsut return if (String.IsNullOrEmpty(Original.Bib_Info.Location.Other_URL)) { return(true); } string mainEntry = Original.Bib_Info.Location.Other_URL; if (!String.IsNullOrEmpty(Original.Bib_Info.Location.Other_URL_Note)) { mainEntry = Original.Bib_Info.Location.Other_URL_Note; } // Add this other URL BriefItem_DescTermValue otherUrlObj = New.Add_Description("Other Item", mainEntry); otherUrlObj.Add_URI(Original.Bib_Info.Location.Other_URL); // Add display label, if one exists if (!String.IsNullOrEmpty(Original.Bib_Info.Location.Other_URL_Display_Label)) { otherUrlObj.SubTerm = Original.Bib_Info.Location.Other_URL_Display_Label; } 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 TYPE New.Add_Description("Type", Original.Bib_Info.SobekCM_Type_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) { // 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 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 donor if ((Original.Bib_Info.hasDonor) && (!String.IsNullOrWhiteSpace(Original.Bib_Info.Donor.Full_Name))) { New.Add_Description("Donor", Original.Bib_Info.Donor.ToString(false)).SubTerm = "donor"; } 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 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 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 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) { // 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) { // 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) { // Keep track of place of publications alreadyadded Dictionary <string, string> pub_places = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); // Add the publisher, and place of publications if (Original.Bib_Info.Publishers_Count > 0) { // 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); } } } } if ((Original.Bib_Info.Origin_Info != null) && (Original.Bib_Info.Origin_Info.Places_Count > 0)) { foreach (Origin_Info_Place thisPlace in Original.Bib_Info.Origin_Info.Places) { if (!pub_places.ContainsKey(thisPlace.Place_Text)) { New.Add_Description("Place of Publication", thisPlace.Place_Text); pub_places.Add(thisPlace.Place_Text, thisPlace.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) { // 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 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) { // 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) { // Try to get the rights information from the object RightsMD_Info rightsInfo = Original.Get_Metadata_Module(GlobalVar.PALMM_RIGHTSMD_METADATA_MODULE_KEY) as RightsMD_Info; // Add eembargo date, if there is one if ((rightsInfo != null) && (rightsInfo.Has_Embargo_End)) { New.Add_Description("Embargo Date", rightsInfo.Embargo_End.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 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) { // 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 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 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("Digital Resource 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 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 abstracts if (Original.Bib_Info.Abstracts_Count > 0) { foreach (Abstract_Info thisAbstract in Original.Bib_Info.Abstracts) { BriefItem_DescTermValue newAbstract = New.Add_Description("Abstract", thisAbstract.Abstract_Text); if (!String.IsNullOrWhiteSpace(thisAbstract.Display_Label)) { newAbstract.SubTerm = thisAbstract.Display_Label; } if (!String.IsNullOrWhiteSpace(thisAbstract.Language)) { newAbstract.Language = thisAbstract.Language; } } } 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); }
/// <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 learning object metadata LearningObjectMetadata lomInfo = Original.Get_Metadata_Module(GlobalVar.IEEE_LOM_METADATA_MODULE_KEY) as LearningObjectMetadata; // Add the learning object metadata if it exists if ((lomInfo != null) && (lomInfo.hasData)) { // Add the LOM Aggregation level if (lomInfo.AggregationLevel != AggregationLevelEnum.UNDEFINED) { string lom_temp = String.Empty; switch (lomInfo.AggregationLevel) { case AggregationLevelEnum.level1: lom_temp = "Level 1 - a single, atomic object"; break; case AggregationLevelEnum.level2: lom_temp = "Level 2 - a lesson plan"; break; case AggregationLevelEnum.level3: lom_temp = "Level 3 - a course, or set of lesson plans"; break; case AggregationLevelEnum.level4: lom_temp = "Level 4 - a set of courses"; break; } New.Add_Description("Aggregation Level", lom_temp); } // Add the LOM Learning resource type if (lomInfo.LearningResourceTypes.Count > 0) { foreach (LOM_VocabularyState thisState in lomInfo.LearningResourceTypes) { New.Add_Description("Learning Resource Type", thisState.Value); } } // Add the LOM Status if (lomInfo.Status != StatusEnum.UNDEFINED) { string lom_temp = String.Empty; switch (lomInfo.Status) { case StatusEnum.draft: lom_temp = "Draft"; break; case StatusEnum.final: lom_temp = "Final"; break; case StatusEnum.revised: lom_temp = "Revised"; break; case StatusEnum.unavailable: lom_temp = "Unavailable"; break; } New.Add_Description("Status", lom_temp); } // Add the LOM Interactivity Type if (lomInfo.InteractivityType != InteractivityTypeEnum.UNDEFINED) { string lom_temp = String.Empty; switch (lomInfo.InteractivityType) { case InteractivityTypeEnum.active: lom_temp = "Active"; break; case InteractivityTypeEnum.expositive: lom_temp = "Expositive"; break; case InteractivityTypeEnum.mixed: lom_temp = "Mixed"; break; } New.Add_Description("Interactivity Type", lom_temp); } // Add the LOM Interactivity Level if (lomInfo.InteractivityLevel != InteractivityLevelEnum.UNDEFINED) { string lom_temp = String.Empty; switch (lomInfo.InteractivityLevel) { case InteractivityLevelEnum.very_low: lom_temp = "Very low"; break; case InteractivityLevelEnum.low: lom_temp = "Low"; break; case InteractivityLevelEnum.medium: lom_temp = "Mediuim"; break; case InteractivityLevelEnum.high: lom_temp = "High"; break; case InteractivityLevelEnum.very_high: lom_temp = "Very high"; break; } New.Add_Description("Interactivity Level", lom_temp); } // Add the LOM Difficulty Level if (lomInfo.DifficultyLevel != DifficultyLevelEnum.UNDEFINED) { string lom_temp = String.Empty; switch (lomInfo.DifficultyLevel) { case DifficultyLevelEnum.very_easy: lom_temp = "Very easy"; break; case DifficultyLevelEnum.easy: lom_temp = "Easy"; break; case DifficultyLevelEnum.medium: lom_temp = "Mediuim"; break; case DifficultyLevelEnum.difficult: lom_temp = "Difficult"; break; case DifficultyLevelEnum.very_difficult: lom_temp = "Very difficult"; break; } New.Add_Description("Difficulty Level", lom_temp); } // Add the LOM Intended End User Role if (lomInfo.IntendedEndUserRoles.Count > 0) { foreach (IntendedEndUserRoleEnum thisUser in lomInfo.IntendedEndUserRoles) { switch (thisUser) { case IntendedEndUserRoleEnum.teacher: New.Add_Description("Intended User Roles", "Teacher"); break; case IntendedEndUserRoleEnum.learner: New.Add_Description("Intended User Roles", "Learner"); break; case IntendedEndUserRoleEnum.author: New.Add_Description("Intended User Roles", "Author"); break; case IntendedEndUserRoleEnum.manager: New.Add_Description("Intended User Roles", "Manager"); break; } } } // Add the LOM Context if (lomInfo.Contexts.Count > 0) { foreach (LOM_VocabularyState thisContext in lomInfo.Contexts) { if (thisContext.Source.Length > 0) { New.Add_Description("Context", thisContext.Source + " " + thisContext.Value); } else { New.Add_Description("Context", thisContext.Value); } } } // Add the LOM Typical Age Range if (lomInfo.TypicalAgeRanges.Count > 0) { foreach (LOM_LanguageString languageString in lomInfo.TypicalAgeRanges) { New.Add_Description("Typical Age Range", languageString.Value); } } // Add the typical learning time New.Add_Description("Typical Learning Time", lomInfo.TypicalLearningTime); // Add the system requirements if (lomInfo.SystemRequirements.Count > 0) { foreach (LOM_System_Requirements thisContext in lomInfo.SystemRequirements) { string start = String.Empty; switch (thisContext.RequirementType) { case RequirementTypeEnum.operating_system: start = "Operating System: " + thisContext.Name; break; case RequirementTypeEnum.browser: start = "Browser: " + thisContext.Name; break; case RequirementTypeEnum.hardware: start = "Hardware: " + thisContext.Name; break; case RequirementTypeEnum.software: start = "Software: " + thisContext.Name; break; } // Add with version, if included if (thisContext.MinimumVersion.Length == 0) { if (thisContext.MaximumVersion.Length > 0) { New.Add_Description("System Requirements", start + " ( - " + thisContext.MaximumVersion + " )"); } else { New.Add_Description("System Requirements", start); } } else { if (thisContext.MaximumVersion.Length > 0) { New.Add_Description("System Requirements", start + " ( " + thisContext.MinimumVersion + " - " + thisContext.MaximumVersion + " )"); } else { New.Add_Description("System Requirements", start + " ( " + thisContext.MinimumVersion + " - )"); } } } } } return(true); }