Ejemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        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));
        }
Ejemplo n.º 2
0
        /// ------------------------------------------------------------------------------------
        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);
        }
Ejemplo n.º 3
0
        /// ------------------------------------------------------------------------------------
        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");
        }
Ejemplo n.º 4
0
        /// ------------------------------------------------------------------------------------
        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));
        }