/// ------------------------------------------------------------------------------------ public virtual IEnumerable <string> GetAllParticipants() { var contributions = MetaDataFile.GetValue(SessionFileType.kContributionsFieldName, null) as ContributionCollection; if (contributions == null) { return(new string[0]); // don't just use ? to return null, that isn't enumerable, callers will fail. } return(contributions.Select(c => c.ContributorName)); }
/// ------------------------------------------------------------------------------------ private bool GetShouldReportHaveConsent() { var contributions = MetaDataFile.GetValue(SessionFileType.kContributionsFieldName, null) as ContributionCollection; var personNames = contributions?.Select(c => c.ContributorName).ToArray(); if (personNames == null) { return(false); } bool allContributorsHaveConsent = personNames.Length > 0; return(personNames.All(name => _personInformant.GetHasInformedConsent(name)) && allContributorsHaveConsent); }
/// ------------------------------------------------------------------------------------ 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"); }
/// ------------------------------------------------------------------------------------ public override void Load() { base.Load(); StageCompletedControlValues = ComponentRoles.ToDictionary(role => role.Id, role => (StageCompleteType)Enum.Parse(typeof(StageCompleteType), MetaDataFile.GetValue(SessionFileType.kStageFieldPrefix + role.Id, StageCompleteType.Auto.ToString()) as string)); }