first commit
This commit is contained in:
99
DCIT.Core/Models/AutoExtractModels.cs
Normal file
99
DCIT.Core/Models/AutoExtractModels.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace DCIT.Core.Models
|
||||
{
|
||||
public class ExtractionProgress
|
||||
{
|
||||
public int Current { get; set; }
|
||||
|
||||
public int Total { get; set; }
|
||||
|
||||
public string Message { get; set; }
|
||||
}
|
||||
|
||||
public class ExtractedDocumentText
|
||||
{
|
||||
public string FilePath { get; set; }
|
||||
|
||||
public string VisibleText { get; set; }
|
||||
}
|
||||
|
||||
public class ExtractionCandidate : INotifyPropertyChanged
|
||||
{
|
||||
private bool _append = true;
|
||||
private AutoExtractCategory _primaryCategory;
|
||||
private string _categoryDisplay;
|
||||
private string _originalText;
|
||||
private string _statisticDisplay;
|
||||
private string _firstDocumentPath;
|
||||
private int _firstOccurrenceOrder;
|
||||
|
||||
public bool Append
|
||||
{
|
||||
get { return _append; }
|
||||
set { SetField(ref _append, value); }
|
||||
}
|
||||
|
||||
public AutoExtractCategory PrimaryCategory
|
||||
{
|
||||
get { return _primaryCategory; }
|
||||
set { SetField(ref _primaryCategory, value); }
|
||||
}
|
||||
|
||||
public string CategoryDisplay
|
||||
{
|
||||
get { return _categoryDisplay; }
|
||||
set { SetField(ref _categoryDisplay, value); }
|
||||
}
|
||||
|
||||
public string OriginalText
|
||||
{
|
||||
get { return _originalText; }
|
||||
set { SetField(ref _originalText, value); }
|
||||
}
|
||||
|
||||
public string StatisticDisplay
|
||||
{
|
||||
get { return _statisticDisplay; }
|
||||
set { SetField(ref _statisticDisplay, value); }
|
||||
}
|
||||
|
||||
public string FirstDocumentPath
|
||||
{
|
||||
get { return _firstDocumentPath; }
|
||||
set { SetField(ref _firstDocumentPath, value); }
|
||||
}
|
||||
|
||||
public int FirstOccurrenceOrder
|
||||
{
|
||||
get { return _firstOccurrenceOrder; }
|
||||
set { SetField(ref _firstOccurrenceOrder, value); }
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected void SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null)
|
||||
{
|
||||
if (EqualityComparer<T>.Default.Equals(field, value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
field = value;
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
public class AutoExtractResult
|
||||
{
|
||||
public List<ExtractionCandidate> Candidates { get; } = new List<ExtractionCandidate>();
|
||||
|
||||
public List<string> Warnings { get; } = new List<string>();
|
||||
|
||||
public int DocumentsProcessed { get; set; }
|
||||
|
||||
public int DocumentsSkipped { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user