public void SetAudioVideoExtent_FreeFormString_IncludedInMetsData()
        {
            _helper.SetAudioVideoExtent("6 and a half seconds");
            var data = _helper.GetMetadata();

            Assert.AreEqual("{\"dc.title\":\"Test Title\",\"" +
                            RampArchivingDlgViewModel.kRecordingExtent + "\":\"6 and a half seconds\"}",
                            data);
        }
Beispiel #2
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;
            }
        }
Beispiel #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");
        }