<PackageReference Include="Relativity.Server.Import.SDK" Version="2.9.2" />

FullTextLoadFileEntryFactory

using Castle.Windsor; using kCura.WinEDDS; using Relativity.DataExchange.Export.VolumeManagerV2.Metadata.Text; using Relativity.Logging; using System; namespace Relativity.DataExchange.Export.VolumeManagerV2.Metadata.Images.Lines { public class FullTextLoadFileEntryFactory { private readonly LongTextHelper _longTextHelper; private readonly ILog _logger; public FullTextLoadFileEntryFactory(LongTextHelper longTextHelper, ILog logger) { _longTextHelper = longTextHelper; _logger = logger; } public IFullTextLoadFileEntry Create(ExportFile exportSettings, IWindsorContainer container) { if (exportSettings.ArtifactTypeID != 10) { _logger.LogVerbose("Created {type} for handling artifact type different than Document - {type}.", new object[2] { "NoFullTextLoadFileEntry", exportSettings.ArtifactTypeID }); return container.Resolve<NoFullTextLoadFileEntry>(); } LoadFileType.FileFormat? logFileFormat = exportSettings.LogFileFormat; LoadFileType.FileFormat fileFormat = LoadFileType.FileFormat.IPRO_FullText; if ((logFileFormat.GetValueOrDefault() == fileFormat) & logFileFormat.HasValue) { if (_longTextHelper.IsTextPrecedenceSet()) { _logger.LogVerbose("Created {type} for handling Full Text precedence in IPRO.", new object[1] { "IproFullTextWithPrecedenceLoadFileEntry" }); return container.Resolve<IproFullTextWithPrecedenceLoadFileEntry>(); } _logger.LogVerbose("Created {type} for handling Full Text without precedence in IPRO.", new object[1] { "IproFullTextWithoutPrecedenceLoadFileEntry" }); return container.Resolve<IproFullTextWithoutPrecedenceLoadFileEntry>(); } logFileFormat = exportSettings.LogFileFormat; fileFormat = LoadFileType.FileFormat.IPRO; if (!((logFileFormat.GetValueOrDefault() == fileFormat) & logFileFormat.HasValue)) { logFileFormat = exportSettings.LogFileFormat; fileFormat = LoadFileType.FileFormat.Opticon; if (!((logFileFormat.GetValueOrDefault() == fileFormat) & logFileFormat.HasValue)) { _logger.LogError("Unknown image load file type {type}.", new object[1] { exportSettings.LogFileFormat }); throw new ArgumentException($"""{exportSettings.LogFileFormat}"""); } } _logger.LogVerbose("Created {type} for Opticon or IPRO without Full Text.", new object[1] { "NoFullTextLoadFileEntry" }); return container.Resolve<NoFullTextLoadFileEntry>(); } } }