public void SetAbstract_SetSingleAbstractWithoutLanguage_IncludedInMetsData() { _helper.SetAbstract("SayMore doesn't let the user specify the language explicitly.", string.Empty); var data = _helper.GetMetadata(); Assert.AreEqual("{\"dc.title\":\"Test Title\"," + "\"description.abstract.has\":\"Y\",\"dc.description.abstract\":{" + "\"0\":{\" \":\"SayMore doesn't let the user specify the language explicitly.\"}}}", data); //"{\"dc.title\":\"what\",\"broad_type\":\"wider_audience\",\"dc.type.mode\":[\"Text\"],\"dc.description.stage\":\"rough_draft\"," + // "\"version.type\":\"first\",\"dc.type.scholarlyWork\":\"Data set\",\"dc.subject.subjectLanguage\":{\"0\":{\"dialect\":\"\"}}," + // "\"dc.language.iso\":{\"0\":{\"dialect\":\"\"}},\"dc.subject.silDomain\":[\"LING:Linguistics\"],\"sil.sensitivity.metadata\":\"Public\"," + // "\"files\":{\"0\":{\" \":\"gmreadme.txt\",\"description\":\"junk\"}},\"status\":\"ready\"," + // "\"description.abstract.has\":\"Y\",\"dc.description.abstract\":{\"0\":{\" \":\"\"SayMore doesn't let the use specify the language explicitly.\"}}}" }
/// ------------------------------------------------------------------------------------ public void SetAdditionalMetsData(RampArchivingDlgViewModel model) { foreach (var session in GetAllSessions()) { model.SetScholarlyWorkType(ScholarlyWorkType.PrimaryData); model.SetDomains(SilDomain.Ling_LanguageDocumentation); var value = session.MetaDataFile.GetStringValue(SessionFileType.kDateFieldName, null); if (!string.IsNullOrEmpty(value)) { model.SetCreationDate(value); } // Return the session's note as the abstract portion of the package's description. value = session.MetaDataFile.GetStringValue(SessionFileType.kSynopsisFieldName, null); if (!string.IsNullOrEmpty(value)) { model.SetAbstract(value, string.Empty); } // Set contributors var contributions = session.MetaDataFile.GetValue("contributions", null) as ContributionCollection; if (contributions != null && contributions.Count > 0) { model.SetContributors(contributions); } // Return total duration of source audio/video recordings. TimeSpan totalDuration = session.GetTotalDurationOfSourceMedia(); if (totalDuration.Ticks > 0) { model.SetAudioVideoExtent(string.Format("Total Length of Source Recordings: {0}", totalDuration.ToString())); } //First session details are enough for "Archive RAMP (SIL)..." from Project menu break; } }
/// ------------------------------------------------------------------------------------ public void SetAdditionalMetsData(RampArchivingDlgViewModel model) { model.SetScholarlyWorkType(ScholarlyWorkType.PrimaryData); model.SetDomains(SilDomain.Ling_LanguageDocumentation); var value = MetaDataFile.GetStringValue(SessionFileType.kDateFieldName, null); if (!string.IsNullOrEmpty(value)) { model.SetCreationDate(value); } // Return the session's note as the abstract portion of the package's description. value = MetaDataFile.GetStringValue(SessionFileType.kSynopsisFieldName, null); if (!string.IsNullOrEmpty(value)) { model.SetAbstract(value, string.Empty); } // Set contributors var contributions = MetaDataFile.GetValue(SessionFileType.kContributionsFieldName, null) as ContributionCollection; if (contributions != null && contributions.Count > 0) { model.SetContributors(contributions); } // Return total duration of source audio/video recordings. TimeSpan totalDuration = GetTotalDurationOfSourceMedia(); if (totalDuration.Ticks > 0) { model.SetAudioVideoExtent(string.Format("Total Length of Source Recordings: {0}", totalDuration.ToString())); } //model.SetSoftwareRequirements("SayMore"); }