コード例 #1
0
        /// ------------------------------------------------------------------------------------
        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;
            }
        }
コード例 #2
0
ファイル: Session.cs プロジェクト: konaken73/saymore
        /// ------------------------------------------------------------------------------------
        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");
        }
コード例 #3
0
 public void SetContributors_Null_ThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() => _helper.SetContributors(null));
 }