Beispiel #1
0
        public void CreatePackage(TestSession testSession, PackageType packageType)
        {
            _metadataFilesCreator.Create(testSession.Archive, testSession.ArchiveMetadata);

            if (packageType == PackageType.SubmissionInformationPackage)
            {
                _informationPackageCreator.CreateSip(testSession.Archive);
            }
            else
            {
                _informationPackageCreator.CreateAip(testSession.Archive);
            }

            new InfoXmlCreator().CreateAndSaveFile(testSession.Archive, testSession.ArchiveMetadata);
        }
Beispiel #2
0
        public string CreatePackage(TestSession testSession, PackageType packageType, string outputDirectory)
        {
            _metadataFilesCreator.Create(testSession.Archive, testSession.ArchiveMetadata, packageType);

            string packageFilePath;

            if (packageType == PackageType.SubmissionInformationPackage)
            {
                packageFilePath = _informationPackageCreator.CreateSip(
                    testSession.Archive, testSession.ArchiveMetadata, outputDirectory
                    );
            }
            else // ArchivalInformationPackage
            {
                packageFilePath = _informationPackageCreator.CreateAip(
                    testSession.Archive, testSession.ArchiveMetadata, outputDirectory
                    );
            }

            return(packageFilePath);
        }