/// ------------------------------------------------------------------------------------
        /// <summary>Constructor</summary>
        /// <param name="appName">The application name</param>
        /// <param name="title">Title of the submission.</param>
        /// <param name="id">Identifier for the package being created. Used as the CORPUS name.</param>
        /// <param name="appSpecificArchivalProcessInfo">Application can use this to pass
        /// additional information that will be displayed to the user in the dialog to explain
        /// any application-specific details about the archival process.</param>
        /// <param name="corpus">Indicates whether this is for an entire project corpus or a
        /// single session</param>
        /// <param name="setFilesToArchive">Delegate to request client to call methods to set
        /// which files should be archived (this is deferred to allow display of progress message)</param>
        /// <param name="outputFolder">Base folder where IMDI file structure is to be created</param>
        /// ------------------------------------------------------------------------------------
        public IMDIArchivingDlgViewModel(string appName, string title, string id,
                                         string appSpecificArchivalProcessInfo, bool corpus,
                                         Action <ArchivingDlgViewModel> setFilesToArchive, string outputFolder)
            : base(appName, title, id, appSpecificArchivalProcessInfo, setFilesToArchive)
        {
            OutputFolder = outputFolder;

            _imdiData = new IMDIPackage(corpus, PackagePath)
            {
                Title = _titles[_id],
                Name  = _id
            };
        }
예제 #2
0
		public void AddDocumentLanguge_AddDuplicate_DuplicateNotAdded()
		{
			IMDIPackage proj = new IMDIPackage(false, string.Empty);

			proj.MetadataIso3Languages.Add(new ArchivingLanguage("fra"));
			proj.MetadataIso3Languages.Add(new ArchivingLanguage("spa"));
			proj.MetadataIso3Languages.Add(new ArchivingLanguage("spa"));
			proj.MetadataIso3Languages.Add(new ArchivingLanguage("fra"));

			Assert.AreEqual(2, proj.MetadataIso3Languages.Count);
			Assert.IsTrue(proj.MetadataIso3Languages.Contains(new ArchivingLanguage("fra")));
			Assert.IsTrue(proj.MetadataIso3Languages.Contains(new ArchivingLanguage("spa")));
		}
		/// ------------------------------------------------------------------------------------
		/// <summary>Constructor</summary>
		/// <param name="appName">The application name</param>
		/// <param name="title">Title of the submission.</param>
		/// <param name="id">Identifier for the package being created. Used as the CORPUS name.</param>
		/// <param name="appSpecificArchivalProcessInfo">Application can use this to pass
		/// additional information that will be displayed to the user in the dialog to explain
		/// any application-specific details about the archival process.</param>
		/// <param name="corpus">Indicates whether this is for an entire project corpus or a
		/// single session</param>
		/// <param name="setFilesToArchive">Delegate to request client to call methods to set
		/// which files should be archived (this is deferred to allow display of progress message)</param>
		/// <param name="outputFolder">Base folder where IMDI file structure is to be created</param>
		/// ------------------------------------------------------------------------------------
		public IMDIArchivingDlgViewModel(string appName, string title, string id,
			string appSpecificArchivalProcessInfo, bool corpus,
			Action<ArchivingDlgViewModel> setFilesToArchive, string outputFolder)
			: base(appName, title, id, appSpecificArchivalProcessInfo, setFilesToArchive)
		{
			OutputFolder = outputFolder;

			PackagePath = Path.Combine(OutputFolder, CorpusDirectoryName);

			_imdiData = new IMDIPackage(corpus, PackagePath)
			{
				Title = _titles[_id],
				Name = _id
			};
		}