mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 01:05:32 +00:00
Indexnumber parsing disabled
This commit is contained in:
@@ -16,7 +16,7 @@ namespace HaDocument.Comparers
|
|||||||
else if (first.Order != second.Order)
|
else if (first.Order != second.Order)
|
||||||
return first.Order.CompareTo(second.Order);
|
return first.Order.CompareTo(second.Order);
|
||||||
else
|
else
|
||||||
return String.Compare(first.Index, second.Index);
|
return String.Compare(first.ID, second.ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ namespace HaDocument.Comparers
|
|||||||
{
|
{
|
||||||
var firstNumber = 0;
|
var firstNumber = 0;
|
||||||
var secondNumber = 0;
|
var secondNumber = 0;
|
||||||
Int32.TryParse(first.Index, out firstNumber);
|
Int32.TryParse(first.ID, out firstNumber);
|
||||||
Int32.TryParse(second.Index, out secondNumber);
|
Int32.TryParse(second.ID, out secondNumber);
|
||||||
return firstNumber.CompareTo(secondNumber);
|
return firstNumber.CompareTo(secondNumber);
|
||||||
|
|
||||||
//var firstIndex = from c in first.Meta.Autopsic
|
//var firstIndex = from c in first.Meta.Autopsic
|
||||||
|
|||||||
25
HaDocumentV6/HaDocumentV6.sln
Normal file
25
HaDocumentV6/HaDocumentV6.sln
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.5.002.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HaDocumentV6", "HaDocumentV6.csproj", "{2D3B1B5C-5E0B-4050-A102-E44F025511BE}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{2D3B1B5C-5E0B-4050-A102-E44F025511BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2D3B1B5C-5E0B-4050-A102-E44F025511BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2D3B1B5C-5E0B-4050-A102-E44F025511BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2D3B1B5C-5E0B-4050-A102-E44F025511BE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {E81F4186-AD0D-41A1-BA1B-93C1C7FEE7C7}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
5
HaDocumentV6/Interfaces/IHaElement.cs
Normal file
5
HaDocumentV6/Interfaces/IHaElement.cs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
|
public interface IHaElement {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ namespace HaDocument.Interfaces {
|
|||||||
ImmutableDictionary<string, Person> Persons { get; }
|
ImmutableDictionary<string, Person> Persons { get; }
|
||||||
ImmutableDictionary<string, Meta> Metas { get; }
|
ImmutableDictionary<string, Meta> Metas { get; }
|
||||||
ImmutableDictionary<string, Meta> ExcludedMetas { get; }
|
ImmutableDictionary<string, Meta> ExcludedMetas { get; }
|
||||||
ImmutableDictionary<string, Marginal> Marginals { get; }
|
ImmutableDictionary<string, List<Marginal>> Marginals { get; }
|
||||||
ImmutableDictionary<string, Location> Locations { get; }
|
ImmutableDictionary<string, Location> Locations { get; }
|
||||||
ImmutableDictionary<string, Letter> Letters { get; }
|
ImmutableDictionary<string, Letter> Letters { get; }
|
||||||
ImmutableDictionary<string, Person> HandPersons { get; }
|
ImmutableDictionary<string, Person> HandPersons { get; }
|
||||||
@@ -24,7 +24,6 @@ namespace HaDocument.Interfaces {
|
|||||||
|
|
||||||
ImmutableDictionary<string, Lookup<string, Comment>> CommentsByCategoryLetter { get; }
|
ImmutableDictionary<string, Lookup<string, Comment>> CommentsByCategoryLetter { get; }
|
||||||
Lookup<string, Comment> CommentsByCategory { get; }
|
Lookup<string, Comment> CommentsByCategory { get; }
|
||||||
Lookup<string, Marginal> MarginalsByLetter { get; }
|
|
||||||
Lookup<string, Editreason> EditreasonsByLetter { get; }
|
Lookup<string, Editreason> EditreasonsByLetter { get; }
|
||||||
ImmutableSortedSet<Meta> MetasByDate { get; }
|
ImmutableSortedSet<Meta> MetasByDate { get; }
|
||||||
ILookup<int, Meta> MetasByYear { get; }
|
ILookup<int, Meta> MetasByYear { get; }
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
namespace HaDocument.Interfaces;
|
|
||||||
|
|
||||||
public interface ISearchable {
|
|
||||||
public string Element { get; }
|
|
||||||
public string Index { get; }
|
|
||||||
}
|
|
||||||
@@ -1,17 +1,34 @@
|
|||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class App {
|
public class App {
|
||||||
public string Index { get; } = "";
|
public string Index { get; } = "";
|
||||||
public string Name { get; } = "";
|
public string Name { get; } = "";
|
||||||
public string Category { get; } = "";
|
public string Category { get; } = "";
|
||||||
|
|
||||||
|
public XElement? XElement { get; }
|
||||||
|
|
||||||
public App(
|
public App(
|
||||||
string index,
|
string index,
|
||||||
string name,
|
string name,
|
||||||
string category
|
string category,
|
||||||
|
XElement? xElement = null
|
||||||
) {
|
) {
|
||||||
Index = index;
|
Index = index;
|
||||||
Name = name;
|
Name = name;
|
||||||
Category = category;
|
Category = category;
|
||||||
|
XElement = xElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static App? FromXElement(XElement element) {
|
||||||
|
if (!element.HasAttributes || element.Name != "appDef") return null;
|
||||||
|
if (element.Attribute("index")?.Value == null || element.Attribute("name")?.Value == null || element.Attribute("category")?.Value == null) return null;
|
||||||
|
return new App(
|
||||||
|
element.Attribute("index")!.Value,
|
||||||
|
element.Attribute("name")!.Value,
|
||||||
|
element.Attribute("category")!.Value,
|
||||||
|
element
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,68 @@
|
|||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class Backlink {
|
public class Backlink {
|
||||||
public string Index { get; } = "";
|
public string Href { get; } = "";
|
||||||
|
|
||||||
public string Letter { get; } = "";
|
public string? Letter { get; } = "";
|
||||||
public string Page { get; } = "";
|
public string? Page { get; } = "";
|
||||||
public string Line { get; } = "";
|
public string? Line { get; } = "";
|
||||||
public string MarginalIndex { get; } = "";
|
public string? Comment { get; }
|
||||||
|
|
||||||
public Backlink(
|
public Backlink(
|
||||||
string index,
|
string href,
|
||||||
string letter,
|
string? letter,
|
||||||
string page,
|
string? page,
|
||||||
string line,
|
string? line,
|
||||||
string marginalindex
|
string? comment = null
|
||||||
) {
|
) {
|
||||||
Index = index;
|
Href = href;
|
||||||
Letter = letter;
|
Letter = letter;
|
||||||
Page = page;
|
Page = page;
|
||||||
Line = line;
|
Line = line;
|
||||||
MarginalIndex = marginalindex;
|
Comment = comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Backlink? FromXElement(XElement element) {
|
||||||
|
if (!element.HasAttributes || element.Name != "link") return null;
|
||||||
|
if (element.Attribute("ref")?.Value == null && element.Attribute("subref")?.Value == null) return null;
|
||||||
|
|
||||||
|
if (element.Ancestors("marginal") == null || !element.Ancestors("marginal").Any()) {
|
||||||
|
var marginal = element.Ancestors("marginal").First();
|
||||||
|
if (Marginal.FromXElement(marginal) == null) return null;
|
||||||
|
return new Backlink(
|
||||||
|
element.Attribute("subref")?.Value ?? element.Attribute("ref")!.Value,
|
||||||
|
marginal.Attribute("letter")!.Value,
|
||||||
|
marginal.Attribute("page")!.Value,
|
||||||
|
marginal.Attribute("line")!.Value
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (element.Ancestors("subsection") != null || !element.Ancestors("subsection").Any()) {
|
||||||
|
var subsection = element.Ancestors("subsection").First();
|
||||||
|
if (subsection.Attribute("id")?.Value == null) return null;
|
||||||
|
return new Backlink(
|
||||||
|
element.Attribute("subref")?.Value ?? element.Attribute("ref")!.Value,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
subsection.Attribute("id")!.Value
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (element.Ancestors("kommentar") != null || !element.Ancestors("kommentar").Any()) {
|
||||||
|
var kommentar = element.Ancestors("kommentar").First();
|
||||||
|
if (kommentar.Attribute("id")?.Value == null) return null;
|
||||||
|
return new Backlink(
|
||||||
|
element.Attribute("subref")?.Value ?? element.Attribute("ref")!.Value,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
kommentar.Attribute("id")!.Value
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
|
|
||||||
namespace HaDocument.Models{
|
namespace HaDocument.Models{
|
||||||
public class Comment : HaDocument.Interfaces.ISearchable {
|
public class Comment {
|
||||||
public string Element { get; } = "";
|
public string Element { get; } = "";
|
||||||
public string Index { get; } = "";
|
public string Index { get; } = "";
|
||||||
public string Type { get; } = "";
|
public string Type { get; } = "";
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class Editreason : HaDocument.Interfaces.ISearchable {
|
public class Editreason {
|
||||||
public string Index { get; } = "";
|
public string Index { get; } = "";
|
||||||
public string Element { get; } = "";
|
public string Element { get; } = "";
|
||||||
public string Letter { get; } = "";
|
public string Letter { get; } = "";
|
||||||
@@ -28,5 +30,9 @@ namespace HaDocument.Models {
|
|||||||
EndLine = endline;
|
EndLine = endline;
|
||||||
Reference = reference;
|
Reference = reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Editreason? FromXElement(XElement element) {
|
||||||
|
throw new NotImplementedException("We need two Elements for editreason");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
using System;
|
|
||||||
using HaXMLReader.EvArgs;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace HaDocument.Models {
|
|
||||||
public abstract class HaModel {
|
|
||||||
protected static List<(Func<Tag, bool>, Action<Tag>)> FieldActions = null;
|
|
||||||
|
|
||||||
internal static void AddAction(Func<Tag, bool> If, Action<Tag> Then) {
|
|
||||||
if (If == null || Then == null) throw new ArgumentNullException();
|
|
||||||
if (FieldActions == null) FieldActions = new List<(Func<Tag, bool>, Action<Tag>)>();
|
|
||||||
FieldActions.Add((If, Then));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class Hand : HaModel {
|
public class Hand {
|
||||||
public string Letter { get; } = "";
|
public string Letter { get; } = "";
|
||||||
public string Person { get; } = "";
|
public string Person { get; } = "";
|
||||||
public string StartPage { get; } = "";
|
public string StartPage { get; } = "";
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace HaDocument.Models
|
|||||||
public Dictionary<string, Person> Persons;
|
public Dictionary<string, Person> Persons;
|
||||||
public Dictionary<string, Meta> Metas;
|
public Dictionary<string, Meta> Metas;
|
||||||
public Dictionary<string, Meta> ExcludedMetas;
|
public Dictionary<string, Meta> ExcludedMetas;
|
||||||
public Dictionary<string, Marginal> Marginals;
|
public Dictionary<string, List<Marginal>> Marginals;
|
||||||
public Dictionary<string, Location> Locations;
|
public Dictionary<string, Location> Locations;
|
||||||
public Dictionary<string, Letter> Letters;
|
public Dictionary<string, Letter> Letters;
|
||||||
public Dictionary<string, Person> HandPersons;
|
public Dictionary<string, Person> HandPersons;
|
||||||
|
|||||||
@@ -1,14 +1,29 @@
|
|||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class Letter : HaModel, HaDocument.Interfaces.ISearchable {
|
public class Letter {
|
||||||
public string Index { get; } = "";
|
public string ID { get; } = "";
|
||||||
public string Element { get; } = "";
|
public string Element { get; } = "";
|
||||||
|
public XElement? XElement { get; }
|
||||||
|
|
||||||
public Letter(
|
public Letter(
|
||||||
string index,
|
string id,
|
||||||
string element
|
string element,
|
||||||
|
XElement? xelement = null
|
||||||
) {
|
) {
|
||||||
Index = index;
|
ID = id;
|
||||||
Element = element;
|
Element = element;
|
||||||
|
XElement = xelement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Letter? FromXElement(XElement element) {
|
||||||
|
if (!element.HasAttributes || element.IsEmpty || element.Name != "letterText") return null;
|
||||||
|
if (element.Attribute("letter")?.Value == null) return null;
|
||||||
|
return new Letter(
|
||||||
|
element.Attribute("letter")!.Value,
|
||||||
|
element.ToString(),
|
||||||
|
element
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace HaDocument.Models
|
|||||||
public ImmutableDictionary<string, Person> Persons { get; }
|
public ImmutableDictionary<string, Person> Persons { get; }
|
||||||
public ImmutableDictionary<string, Meta> Metas { get; }
|
public ImmutableDictionary<string, Meta> Metas { get; }
|
||||||
public ImmutableDictionary<string, Meta> ExcludedMetas { get; }
|
public ImmutableDictionary<string, Meta> ExcludedMetas { get; }
|
||||||
public ImmutableDictionary<string, Marginal> Marginals { get; }
|
public ImmutableDictionary<string, List<Marginal>> Marginals { get; }
|
||||||
public ImmutableDictionary<string, Location> Locations { get; }
|
public ImmutableDictionary<string, Location> Locations { get; }
|
||||||
public ImmutableDictionary<string, Letter> Letters { get; }
|
public ImmutableDictionary<string, Letter> Letters { get; }
|
||||||
public ImmutableDictionary<string, Person> HandPersons { get; }
|
public ImmutableDictionary<string, Person> HandPersons { get; }
|
||||||
@@ -35,8 +35,6 @@ namespace HaDocument.Models
|
|||||||
public Lookup<string, Comment> CommentsByCategory { get; }
|
public Lookup<string, Comment> CommentsByCategory { get; }
|
||||||
// Auswählen von Subkommentaren nach ID
|
// Auswählen von Subkommentaren nach ID
|
||||||
public ImmutableDictionary<string, Comment> SubCommentsByID { get; }
|
public ImmutableDictionary<string, Comment> SubCommentsByID { get; }
|
||||||
// Auswählen von Marginalien nach Briefen
|
|
||||||
public Lookup<string, Marginal> MarginalsByLetter { get; }
|
|
||||||
// Ausw?hlen von Edits nach Briefen
|
// Ausw?hlen von Edits nach Briefen
|
||||||
public Lookup<string, Editreason> EditreasonsByLetter { get; }
|
public Lookup<string, Editreason> EditreasonsByLetter { get; }
|
||||||
// Auswählen von Briefen nach autoptischer Numemr und in zeitlich sortierter Reihenfolge.
|
// Auswählen von Briefen nach autoptischer Numemr und in zeitlich sortierter Reihenfolge.
|
||||||
@@ -51,7 +49,7 @@ namespace HaDocument.Models
|
|||||||
Dictionary<string, Person> persons,
|
Dictionary<string, Person> persons,
|
||||||
Dictionary<string, Meta> meta,
|
Dictionary<string, Meta> meta,
|
||||||
Dictionary<string, Meta> excludedMeta,
|
Dictionary<string, Meta> excludedMeta,
|
||||||
Dictionary<string, Marginal> marginals,
|
Dictionary<string, List<Marginal>> marginals,
|
||||||
Dictionary<string, Location> locations,
|
Dictionary<string, Location> locations,
|
||||||
Dictionary<string, Letter> letters,
|
Dictionary<string, Letter> letters,
|
||||||
Dictionary<string, Person> handPersons,
|
Dictionary<string, Person> handPersons,
|
||||||
@@ -95,7 +93,6 @@ namespace HaDocument.Models
|
|||||||
CommentsByLetter_builder.Add(ts.Key, (Lookup<string, Comment>)ts.ToLookup(x => x.Index.Substring(0, 1).ToUpper()));
|
CommentsByLetter_builder.Add(ts.Key, (Lookup<string, Comment>)ts.ToLookup(x => x.Index.Substring(0, 1).ToUpper()));
|
||||||
}
|
}
|
||||||
CommentsByCategoryLetter = CommentsByLetter_builder.ToImmutableDictionary();
|
CommentsByCategoryLetter = CommentsByLetter_builder.ToImmutableDictionary();
|
||||||
MarginalsByLetter = (Lookup<string, Marginal>)Marginals.Values.ToLookup(x => x.Letter);
|
|
||||||
EditreasonsByLetter = (Lookup<string, Editreason>)Editreasons.Values.ToLookup(x => x.Letter);
|
EditreasonsByLetter = (Lookup<string, Editreason>)Editreasons.Values.ToLookup(x => x.Letter);
|
||||||
MetasByDate = Metas.Values.ToImmutableSortedSet<Meta>(new DefaultComparer());
|
MetasByDate = Metas.Values.ToImmutableSortedSet<Meta>(new DefaultComparer());
|
||||||
MetasByYear = Metas.Values.ToLookup(x => x.Sort.Year);
|
MetasByYear = Metas.Values.ToLookup(x => x.Sort.Year);
|
||||||
|
|||||||
@@ -1,14 +1,33 @@
|
|||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class Location {
|
public class Location {
|
||||||
public string Index { get; } = "";
|
public string Index { get; } = "";
|
||||||
public string Name { get; } = "";
|
public string Name { get; } = "";
|
||||||
|
public string? Reference { get; }
|
||||||
|
public XElement? XElement { get; }
|
||||||
|
|
||||||
public Location(
|
public Location(
|
||||||
string index,
|
string index,
|
||||||
string name
|
string name,
|
||||||
|
string? reference,
|
||||||
|
XElement? xelement = null
|
||||||
) {
|
) {
|
||||||
Index = index;
|
Index = index;
|
||||||
Name = name;
|
Name = name;
|
||||||
|
XElement = xelement;
|
||||||
|
Reference = reference;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Location? FromXElement(XElement element) {
|
||||||
|
if (!element.HasAttributes || element.Name != "locationDef") return null;
|
||||||
|
if (element.Attribute("index")?.Value == null || element.Attribute("name")?.Value == null) return null;
|
||||||
|
return new Location(
|
||||||
|
element.Attribute("index")!.Value,
|
||||||
|
element.Attribute("name")!.Value,
|
||||||
|
element.Attribute("ref")?.Value,
|
||||||
|
element
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,23 +1,41 @@
|
|||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class Marginal : HaDocument.Interfaces.ISearchable {
|
public class Marginal {
|
||||||
public string Index { get; } = "";
|
public string? Sort { get; } = "";
|
||||||
public string Letter { get; } = "";
|
public string Letter { get; } = "";
|
||||||
public string Page { get; } = "";
|
public string Page { get; } = "";
|
||||||
public string Line { get; } = "";
|
public string Line { get; } = "";
|
||||||
public string Element { get; } = "";
|
public string Element { get; } = "";
|
||||||
|
public XElement? XElement { get; }
|
||||||
|
|
||||||
public Marginal(
|
public Marginal(
|
||||||
string index,
|
|
||||||
string letter,
|
string letter,
|
||||||
string page,
|
string page,
|
||||||
string line,
|
string line,
|
||||||
string element
|
string? sort,
|
||||||
|
string element,
|
||||||
|
XElement? xelement = null
|
||||||
) {
|
) {
|
||||||
Index = index;
|
|
||||||
Letter = letter;
|
Letter = letter;
|
||||||
Page = page;
|
Page = page;
|
||||||
Line = line;
|
Line = line;
|
||||||
|
Sort = sort;
|
||||||
Element = element;
|
Element = element;
|
||||||
|
XElement = xelement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Marginal? FromXElement(XElement element) {
|
||||||
|
if (!element.HasAttributes || element.Name != "marginal" || element.IsEmpty) return null;
|
||||||
|
if (element.Attribute("letter")?.Value == null || element.Attribute("page")?.Value == null || element.Attribute("line")?.Value == null) return null;
|
||||||
|
return new Marginal(
|
||||||
|
element.Attribute("letter")!.Value,
|
||||||
|
element.Attribute("page")!.Value,
|
||||||
|
element.Attribute("line")!.Value,
|
||||||
|
element.Attribute("sort")?.Value,
|
||||||
|
element.ToString(),
|
||||||
|
element
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,35 +4,32 @@ using HaXMLReader.EvArgs;
|
|||||||
|
|
||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class Meta {
|
public class Meta {
|
||||||
public string Index { get; } = "";
|
public string ID { get; } = "";
|
||||||
public string Autopsic { get; } = "";
|
|
||||||
public string Date { get; } = "";
|
public string Date { get; } = "";
|
||||||
public DateTime Sort { get; } = new DateTime(1700, 1, 1);
|
public DateTime Sort { get; } = new DateTime(1700, 1, 1);
|
||||||
public int Order { get; } = -1;
|
public int Order { get; } = -1;
|
||||||
public string Location { get; } = "";
|
public string Location { get; } = "";
|
||||||
public List<string> Senders { get; } = null;
|
public List<string> Senders { get; } = null;
|
||||||
public List<string> Receivers { get; } = null;
|
public List<string> Receivers { get; } = null;
|
||||||
public OptionalBool hasOriginal { get; } = OptionalBool.None;
|
public bool? hasOriginal { get; }
|
||||||
public OptionalBool isProofread { get; } = OptionalBool.None;
|
public bool? isProofread { get; }
|
||||||
public OptionalBool isDraft { get; } = OptionalBool.None;
|
public bool? isDraft { get; }
|
||||||
public ZHInfo ZH { get; } = null;
|
public ZHInfo ZH { get; } = null;
|
||||||
|
|
||||||
public Meta(
|
public Meta(
|
||||||
string index,
|
string id,
|
||||||
string autopsic,
|
|
||||||
string date,
|
string date,
|
||||||
DateTime sort,
|
DateTime sort,
|
||||||
int order,
|
int order,
|
||||||
OptionalBool hasOriginal,
|
bool? hasOriginal,
|
||||||
OptionalBool isProofread,
|
bool? isProofread,
|
||||||
OptionalBool isDraft,
|
bool? isDraft,
|
||||||
string location,
|
string location,
|
||||||
List<string> senders,
|
List<string> senders,
|
||||||
List<string> receivers,
|
List<string> receivers,
|
||||||
ZHInfo ZH
|
ZHInfo ZH
|
||||||
) {
|
) {
|
||||||
Index = index;
|
ID = id;
|
||||||
Autopsic = autopsic;
|
|
||||||
Date = date;
|
Date = date;
|
||||||
Sort = sort;
|
Sort = sort;
|
||||||
Order = order;
|
Order = order;
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace HaDocument.Models
|
|
||||||
{
|
|
||||||
public enum OptionalBool
|
|
||||||
{
|
|
||||||
True,
|
|
||||||
False,
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +1,44 @@
|
|||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class Person {
|
public class Person {
|
||||||
public string Index { get; } = "";
|
public string Index { get; } = string.Empty;
|
||||||
public string Name { get; } = "";
|
public string Name { get; } = string.Empty;
|
||||||
public string Prename { get; } = "";
|
public string? Prename { get; }
|
||||||
public string Surname { get; } = "";
|
public string? Surname { get; }
|
||||||
public string? Komm { get; }
|
public string? Komm { get; }
|
||||||
|
public string? Reference { get; }
|
||||||
|
public XElement? XElement { get; }
|
||||||
|
|
||||||
public Person(
|
public Person(
|
||||||
string index,
|
string index,
|
||||||
string name,
|
string name,
|
||||||
string prename,
|
string? prename,
|
||||||
string surname,
|
string? surname,
|
||||||
string? komm
|
string? komm,
|
||||||
|
string? reference,
|
||||||
|
XElement? xElement = null
|
||||||
) {
|
) {
|
||||||
Index = index;
|
Index = index;
|
||||||
Name = name;
|
Name = name;
|
||||||
Prename = prename;
|
Prename = prename;
|
||||||
Surname = surname;
|
Surname = surname;
|
||||||
Komm = komm;
|
Komm = komm;
|
||||||
|
Reference = reference;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Person? FromXElement(XElement element) {
|
||||||
|
if (!element.HasAttributes || (element.Name != "personDef" && element.Name != "handDef")) return null;
|
||||||
|
if (element.Attribute("index")?.Value == null || element.Attribute("name")?.Value == null) return null;
|
||||||
|
return new Person(
|
||||||
|
element.Attribute("index")!.Value,
|
||||||
|
element.Attribute("name")!.Value,
|
||||||
|
element.Attribute("vorname")?.Value,
|
||||||
|
element.Attribute("nachname")?.Value,
|
||||||
|
element.Attribute("komm")?.Value,
|
||||||
|
element.Attribute("ref")?.Value,
|
||||||
|
element
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,30 @@
|
|||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace HaDocument.Models {
|
namespace HaDocument.Models {
|
||||||
public class Tradition : HaDocument.Interfaces.ISearchable {
|
public class Tradition {
|
||||||
public string Index { get; } = "";
|
public string ID { get; } = "";
|
||||||
public string Element { get; } = "";
|
public string Element { get; } = "";
|
||||||
|
|
||||||
|
public XElement? XElement { get; }
|
||||||
|
|
||||||
public Tradition(
|
public Tradition(
|
||||||
string index,
|
string id,
|
||||||
string element
|
string element,
|
||||||
|
XElement? xelement = null
|
||||||
) {
|
) {
|
||||||
Index = index;
|
ID = id;
|
||||||
Element = element;
|
Element = element;
|
||||||
|
XElement = xelement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Tradition? FromXElement(XElement element) {
|
||||||
|
if (!element.HasAttributes || element.IsEmpty || element.Name != "letterTradition") return null;
|
||||||
|
if (element.Attribute("letter")?.Value == null) return null;
|
||||||
|
return new Tradition(
|
||||||
|
element.Attribute("letter")!.Value,
|
||||||
|
element.ToString(),
|
||||||
|
element
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,14 +70,14 @@ namespace HaDocument.Reactors {
|
|||||||
!tag.IsEmpty &&
|
!tag.IsEmpty &&
|
||||||
tag.Name == "letterText"
|
tag.Name == "letterText"
|
||||||
) {
|
) {
|
||||||
letter = tag["index"];
|
letter = tag["letter"];
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
!tag.EndTag &&
|
!tag.EndTag &&
|
||||||
!tag.IsEmpty &&
|
!tag.IsEmpty &&
|
||||||
tag.Name == "letterTradition"
|
tag.Name == "letterTradition"
|
||||||
) {
|
) {
|
||||||
letter = tag["ref"];
|
letter = tag["letter"];
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
!tag.EndTag &&
|
!tag.EndTag &&
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ namespace HaDocument.Reactors {
|
|||||||
// State
|
// State
|
||||||
private string Index;
|
private string Index;
|
||||||
private string Name;
|
private string Name;
|
||||||
private string? Komm;
|
|
||||||
|
|
||||||
internal HandDefsReactor(IReader reader, IntermediateLibrary lib) : base(reader, lib) {
|
internal HandDefsReactor(IReader reader, IntermediateLibrary lib) : base(reader, lib) {
|
||||||
lib.HandPersons = new Dictionary<string, Person>();
|
lib.HandPersons = new Dictionary<string, Person>();
|
||||||
@@ -39,7 +38,6 @@ namespace HaDocument.Reactors {
|
|||||||
_active = true;
|
_active = true;
|
||||||
Index = tag["index"];
|
Index = tag["index"];
|
||||||
Name = tag["name"];
|
Name = tag["name"];
|
||||||
if (!String.IsNullOrWhiteSpace(tag["komm"])) Komm = tag["komm"];
|
|
||||||
Add();
|
Add();
|
||||||
_active = false;
|
_active = false;
|
||||||
}
|
}
|
||||||
@@ -51,7 +49,7 @@ namespace HaDocument.Reactors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void Add() {
|
protected void Add() {
|
||||||
CreatedInstances.Add(Index, new Person(Index, Name, "", "", Komm));
|
CreatedInstances.Add(Index, new Person(Index, Name, null, null, null, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ namespace HaDocument.Reactors
|
|||||||
internal Dictionary<string, Dictionary<string, HashSet<string>>> CreatedStructure;
|
internal Dictionary<string, Dictionary<string, HashSet<string>>> CreatedStructure;
|
||||||
|
|
||||||
// State
|
// State
|
||||||
private string Index = "";
|
private string Letter = "";
|
||||||
private ElementStringBinder _element = null;
|
private ElementStringBinder _element = null;
|
||||||
|
|
||||||
private bool _normalizeWhitespace = false;
|
private bool _normalizeWhitespace = false;
|
||||||
@@ -49,12 +49,12 @@ namespace HaDocument.Reactors
|
|||||||
!tag.EndTag &&
|
!tag.EndTag &&
|
||||||
!tag.IsEmpty &&
|
!tag.IsEmpty &&
|
||||||
tag.Name == "letterText" &&
|
tag.Name == "letterText" &&
|
||||||
!String.IsNullOrWhiteSpace(tag["index"])
|
!String.IsNullOrWhiteSpace(tag["letter"])
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Activate(_reader, tag);
|
Activate(_reader, tag);
|
||||||
if (!CreatedStructure.ContainsKey(tag["index"]))
|
if (!CreatedStructure.ContainsKey(tag["letter"]))
|
||||||
this.CreatedStructure.Add(tag["index"], new Dictionary<string, HashSet<string>>());
|
this.CreatedStructure.Add(tag["letter"], new Dictionary<string, HashSet<string>>());
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
!tag.EndTag &&
|
!tag.EndTag &&
|
||||||
@@ -64,9 +64,9 @@ namespace HaDocument.Reactors
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
_line = tag["index"];
|
_line = tag["index"];
|
||||||
if (!CreatedStructure[Index][_page].Contains(_line))
|
if (!CreatedStructure[Letter][_page].Contains(_line))
|
||||||
{
|
{
|
||||||
CreatedStructure[Index][_page].Add(_line);
|
CreatedStructure[Letter][_page].Add(_line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
@@ -77,8 +77,8 @@ namespace HaDocument.Reactors
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
_page = tag["index"];
|
_page = tag["index"];
|
||||||
if (!CreatedStructure[Index].ContainsKey(_page))
|
if (!CreatedStructure[Letter].ContainsKey(_page))
|
||||||
CreatedStructure[Index].Add(_page, new HashSet<string>());
|
CreatedStructure[Letter].Add(_page, new HashSet<string>());
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
_active &&
|
_active &&
|
||||||
@@ -100,7 +100,7 @@ namespace HaDocument.Reactors
|
|||||||
{
|
{
|
||||||
if (_hands == null)
|
if (_hands == null)
|
||||||
_hands = new List<Hand>();
|
_hands = new List<Hand>();
|
||||||
_hands.Add(new Hand(Index, _person, _handstartpg, _handstartln, _page, _line));
|
_hands.Add(new Hand(Letter, _person, _handstartpg, _handstartln, _page, _line));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ namespace HaDocument.Reactors
|
|||||||
{
|
{
|
||||||
_active = true;
|
_active = true;
|
||||||
_reader = reader;
|
_reader = reader;
|
||||||
Index = tag["index"];
|
Letter = tag["letter"];
|
||||||
_element = new ElementStringBinder(reader, tag, Add, _normalizeWhitespace);
|
_element = new ElementStringBinder(reader, tag, Add, _normalizeWhitespace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,23 +119,23 @@ namespace HaDocument.Reactors
|
|||||||
{
|
{
|
||||||
if (String.IsNullOrWhiteSpace(text)) return;
|
if (String.IsNullOrWhiteSpace(text)) return;
|
||||||
var letter = new Letter(
|
var letter = new Letter(
|
||||||
Index,
|
Letter,
|
||||||
text
|
text
|
||||||
);
|
);
|
||||||
CreatedInstances.TryAdd(Index, letter);
|
CreatedInstances.TryAdd(Letter, letter);
|
||||||
if (_hands != null)
|
if (_hands != null)
|
||||||
{
|
{
|
||||||
if (!CreatedHands.ContainsKey(Index))
|
if (!CreatedHands.ContainsKey(Letter))
|
||||||
CreatedHands.Add(Index, _hands);
|
CreatedHands.Add(Letter, _hands);
|
||||||
else
|
else
|
||||||
CreatedHands[Index].AddRange(_hands);
|
CreatedHands[Letter].AddRange(_hands);
|
||||||
}
|
}
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Reset()
|
protected override void Reset()
|
||||||
{
|
{
|
||||||
Index = "";
|
Letter = "";
|
||||||
_active = false;
|
_active = false;
|
||||||
_element = null;
|
_element = null;
|
||||||
_hands = null;
|
_hands = null;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ namespace HaDocument.Reactors {
|
|||||||
// State
|
// State
|
||||||
private string Index;
|
private string Index;
|
||||||
private string Name;
|
private string Name;
|
||||||
|
private string? Reference;
|
||||||
|
|
||||||
internal LocationDefsReactor(IReader reader, IntermediateLibrary lib) : base(reader, lib) {
|
internal LocationDefsReactor(IReader reader, IntermediateLibrary lib) : base(reader, lib) {
|
||||||
lib.Locations = new Dictionary<string, Location>();
|
lib.Locations = new Dictionary<string, Location>();
|
||||||
@@ -39,6 +40,7 @@ namespace HaDocument.Reactors {
|
|||||||
_active = true;
|
_active = true;
|
||||||
Index = tag["index"];
|
Index = tag["index"];
|
||||||
Name = tag["name"];
|
Name = tag["name"];
|
||||||
|
Reference = String.IsNullOrWhiteSpace(tag["ref"]) ? null : tag["ref"];
|
||||||
Add();
|
Add();
|
||||||
_active = false;
|
_active = false;
|
||||||
}
|
}
|
||||||
@@ -47,10 +49,11 @@ namespace HaDocument.Reactors {
|
|||||||
protected override void Reset() {
|
protected override void Reset() {
|
||||||
Index = "";
|
Index = "";
|
||||||
Name = "";
|
Name = "";
|
||||||
|
Reference = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Add() {
|
protected void Add() {
|
||||||
CreatedInstances.Add(Index, new Location(Index, Name));
|
CreatedInstances.Add(Index, new Location(Index, Name, Reference));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,12 +6,12 @@ using System;
|
|||||||
|
|
||||||
namespace HaDocument.Reactors {
|
namespace HaDocument.Reactors {
|
||||||
class MarginalReactor : Reactor {
|
class MarginalReactor : Reactor {
|
||||||
internal Dictionary<string, Marginal> CreatedInstances;
|
internal Dictionary<string, List<Marginal>> CreatedInstances;
|
||||||
internal Dictionary<string, List<Backlink>> CreatedBacklinks;
|
internal Dictionary<string, List<Backlink>> CreatedBacklinks;
|
||||||
private bool _normalizeWhitespace = false;
|
private bool _normalizeWhitespace = false;
|
||||||
|
|
||||||
// State
|
// State
|
||||||
private string Index = "";
|
private string? Sort = "";
|
||||||
private string Letter = "";
|
private string Letter = "";
|
||||||
private string Page = "";
|
private string Page = "";
|
||||||
private string Line = "";
|
private string Line = "";
|
||||||
@@ -20,8 +20,8 @@ namespace HaDocument.Reactors {
|
|||||||
|
|
||||||
internal MarginalReactor(IReader reader, IntermediateLibrary lib, bool normalizeWhitespace) : base(reader, lib) {
|
internal MarginalReactor(IReader reader, IntermediateLibrary lib, bool normalizeWhitespace) : base(reader, lib) {
|
||||||
_normalizeWhitespace = normalizeWhitespace;
|
_normalizeWhitespace = normalizeWhitespace;
|
||||||
lib.Marginals = new Dictionary<string, Marginal>();
|
lib.Marginals = new ();
|
||||||
lib.Backlinks = new Dictionary<string, List<Backlink>>();
|
lib.Backlinks = new ();
|
||||||
CreatedBacklinks = lib.Backlinks;
|
CreatedBacklinks = lib.Backlinks;
|
||||||
CreatedInstances = lib.Marginals;
|
CreatedInstances = lib.Marginals;
|
||||||
reader.OpenTag += Listen;
|
reader.OpenTag += Listen;
|
||||||
@@ -32,7 +32,6 @@ namespace HaDocument.Reactors {
|
|||||||
!tag.EndTag &&
|
!tag.EndTag &&
|
||||||
!tag.IsEmpty &&
|
!tag.IsEmpty &&
|
||||||
tag.Name == "marginal" &&
|
tag.Name == "marginal" &&
|
||||||
!String.IsNullOrEmpty(tag["index"]) &&
|
|
||||||
!String.IsNullOrWhiteSpace(tag["letter"]) &&
|
!String.IsNullOrWhiteSpace(tag["letter"]) &&
|
||||||
!String.IsNullOrWhiteSpace(tag["page"]) &&
|
!String.IsNullOrWhiteSpace(tag["page"]) &&
|
||||||
!String.IsNullOrWhiteSpace(tag["line"])
|
!String.IsNullOrWhiteSpace(tag["line"])
|
||||||
@@ -45,7 +44,7 @@ namespace HaDocument.Reactors {
|
|||||||
if (!_active && reader != null && tag != null) {
|
if (!_active && reader != null && tag != null) {
|
||||||
_active = true;
|
_active = true;
|
||||||
_reader = reader;
|
_reader = reader;
|
||||||
Index = tag["index"];
|
Sort = tag["sort"];
|
||||||
Letter = tag["letter"];
|
Letter = tag["letter"];
|
||||||
Page = tag["page"];
|
Page = tag["page"];
|
||||||
Line = tag["line"];
|
Line = tag["line"];
|
||||||
@@ -67,7 +66,7 @@ namespace HaDocument.Reactors {
|
|||||||
if (!String.IsNullOrWhiteSpace(id)) {
|
if (!String.IsNullOrWhiteSpace(id)) {
|
||||||
if (!CreatedBacklinks.ContainsKey(id))
|
if (!CreatedBacklinks.ContainsKey(id))
|
||||||
CreatedBacklinks.Add(id, new List<Backlink>());
|
CreatedBacklinks.Add(id, new List<Backlink>());
|
||||||
CreatedBacklinks[id].Add(new Backlink(id, Letter, Page, Line, Index));
|
CreatedBacklinks[id].Add(new Backlink(id, Letter, Page, Line));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,18 +74,19 @@ namespace HaDocument.Reactors {
|
|||||||
private void Add(string element) {
|
private void Add(string element) {
|
||||||
if (String.IsNullOrWhiteSpace(element)) return;
|
if (String.IsNullOrWhiteSpace(element)) return;
|
||||||
var marg = new Marginal(
|
var marg = new Marginal(
|
||||||
Index,
|
|
||||||
Letter,
|
Letter,
|
||||||
Page,
|
Page,
|
||||||
Line,
|
Line,
|
||||||
|
String.IsNullOrWhiteSpace(Sort) ? null : Sort,
|
||||||
element
|
element
|
||||||
);
|
);
|
||||||
CreatedInstances.TryAdd(Index, marg);
|
if (!CreatedInstances.ContainsKey(Letter)) CreatedInstances.Add(Letter, new());
|
||||||
|
CreatedInstances[Letter].Add(marg);
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Reset() {
|
protected override void Reset() {
|
||||||
Index = "";
|
Sort = "";
|
||||||
_active = false;
|
_active = false;
|
||||||
_element = null;
|
_element = null;
|
||||||
_reader.Tag -= OnTag;
|
_reader.Tag -= OnTag;
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ namespace HaDocument.Reactors {
|
|||||||
private (int, int) _availableYearRange;
|
private (int, int) _availableYearRange;
|
||||||
|
|
||||||
// State
|
// State
|
||||||
private string Index { get; set; } = "";
|
private string ID { get; set; } = "";
|
||||||
private string Autopsic { get; set; } = "";
|
|
||||||
private string Volume { get; set; } = "";
|
private string Volume { get; set; } = "";
|
||||||
private string Page { get; set; } = "";
|
private string Page { get; set; } = "";
|
||||||
private string Date { get; set; } = "";
|
private string Date { get; set; } = "";
|
||||||
@@ -23,9 +22,9 @@ namespace HaDocument.Reactors {
|
|||||||
private int Order { get; set; } = -1;
|
private int Order { get; set; } = -1;
|
||||||
private bool AltLineNumbering { get; set; } = false;
|
private bool AltLineNumbering { get; set; } = false;
|
||||||
private bool inZH { get; set; } = false;
|
private bool inZH { get; set; } = false;
|
||||||
private OptionalBool hasOriginal { get; set; } = OptionalBool.None;
|
private bool? hasOriginal { get; set; } = null;
|
||||||
private OptionalBool isProofread { get; set; } = OptionalBool.None;
|
private bool? isProofread { get; set; } = null;
|
||||||
private OptionalBool isDraft { get; set; } = OptionalBool.None;
|
private bool? isDraft { get; set; } = null;
|
||||||
private bool dateChanged {get; set; } = false;
|
private bool dateChanged {get; set; } = false;
|
||||||
private string Location { get; set; } = "";
|
private string Location { get; set; } = "";
|
||||||
private List<string> Senders { get; set; } = null;
|
private List<string> Senders { get; set; } = null;
|
||||||
@@ -46,7 +45,7 @@ namespace HaDocument.Reactors {
|
|||||||
!tag.EndTag &&
|
!tag.EndTag &&
|
||||||
!tag.IsEmpty &&
|
!tag.IsEmpty &&
|
||||||
tag.Name =="letterDesc" &&
|
tag.Name =="letterDesc" &&
|
||||||
!String.IsNullOrWhiteSpace(tag["ref"])
|
!String.IsNullOrWhiteSpace(tag["letter"])
|
||||||
) {
|
) {
|
||||||
Activate(_reader, tag);
|
Activate(_reader, tag);
|
||||||
}
|
}
|
||||||
@@ -56,7 +55,7 @@ namespace HaDocument.Reactors {
|
|||||||
if (!_active && reader != null && tag != null) {
|
if (!_active && reader != null && tag != null) {
|
||||||
Reset();
|
Reset();
|
||||||
_active = true;
|
_active = true;
|
||||||
Index = tag["ref"];
|
ID = tag["letter"];
|
||||||
reader.Tag += OnTag;
|
reader.Tag += OnTag;
|
||||||
_reader = reader;
|
_reader = reader;
|
||||||
}
|
}
|
||||||
@@ -79,10 +78,6 @@ namespace HaDocument.Reactors {
|
|||||||
private void OnTag(object _, Tag tag) {
|
private void OnTag(object _, Tag tag) {
|
||||||
switch (tag.Name)
|
switch (tag.Name)
|
||||||
{
|
{
|
||||||
case "autopsic":
|
|
||||||
Autopsic = tag["value"];
|
|
||||||
if (String.IsNullOrWhiteSpace(Autopsic)) Abort();
|
|
||||||
break;
|
|
||||||
case "begin":
|
case "begin":
|
||||||
Page = tag["page"];
|
Page = tag["page"];
|
||||||
Volume = tag["vol"];
|
Volume = tag["vol"];
|
||||||
@@ -110,29 +105,29 @@ namespace HaDocument.Reactors {
|
|||||||
case "hasOriginal":
|
case "hasOriginal":
|
||||||
var val = tag["value"];
|
var val = tag["value"];
|
||||||
if (val.ToLower() == "true")
|
if (val.ToLower() == "true")
|
||||||
hasOriginal = OptionalBool.True;
|
hasOriginal = true;
|
||||||
else if (val.ToLower() == "false")
|
else if (val.ToLower() == "false")
|
||||||
hasOriginal = OptionalBool.False;
|
hasOriginal = false;
|
||||||
else
|
else
|
||||||
hasOriginal = OptionalBool.None;
|
hasOriginal = null;
|
||||||
break;
|
break;
|
||||||
case "isProofread":
|
case "isProofread":
|
||||||
var val2 = tag["value"];
|
var val2 = tag["value"];
|
||||||
if (val2.ToLower() == "true")
|
if (val2.ToLower() == "true")
|
||||||
isProofread = OptionalBool.True;
|
isProofread = true;
|
||||||
else if (val2.ToLower() == "false")
|
else if (val2.ToLower() == "false")
|
||||||
isProofread = OptionalBool.False;
|
isProofread = false;
|
||||||
else
|
else
|
||||||
isProofread = OptionalBool.None;
|
isProofread = null;
|
||||||
break;
|
break;
|
||||||
case "isDraft":
|
case "isDraft":
|
||||||
var val3 = tag["value"];
|
var val3 = tag["value"];
|
||||||
if (val3.ToLower() == "true")
|
if (val3.ToLower() == "true")
|
||||||
isDraft = OptionalBool.True;
|
isDraft = true;
|
||||||
else if (val3.ToLower() == "false")
|
else if (val3.ToLower() == "false")
|
||||||
isDraft = OptionalBool.False;
|
isDraft = false;
|
||||||
else
|
else
|
||||||
isDraft = OptionalBool.None;
|
isDraft = null;
|
||||||
break;
|
break;
|
||||||
case "ZHInfo":
|
case "ZHInfo":
|
||||||
if (!tag.EndTag) {
|
if (!tag.EndTag) {
|
||||||
@@ -154,8 +149,7 @@ namespace HaDocument.Reactors {
|
|||||||
private void Add() {
|
private void Add() {
|
||||||
var ZHInfo = !inZH ? null : new ZHInfo(AltLineNumbering, dateChanged, Volume, Page);
|
var ZHInfo = !inZH ? null : new ZHInfo(AltLineNumbering, dateChanged, Volume, Page);
|
||||||
var meta = new Meta(
|
var meta = new Meta(
|
||||||
Index,
|
ID,
|
||||||
Autopsic,
|
|
||||||
Date,
|
Date,
|
||||||
Sort,
|
Sort,
|
||||||
Order,
|
Order,
|
||||||
@@ -172,21 +166,20 @@ namespace HaDocument.Reactors {
|
|||||||
(Sort.Year >= _availableYearRange.Item1 && Sort.Year <= _availableYearRange.Item2) ||
|
(Sort.Year >= _availableYearRange.Item1 && Sort.Year <= _availableYearRange.Item2) ||
|
||||||
(_availableVolumes == null && _availableYearRange.Item1 == 0 && _availableYearRange.Item2 == 0)
|
(_availableVolumes == null && _availableYearRange.Item1 == 0 && _availableYearRange.Item2 == 0)
|
||||||
) {
|
) {
|
||||||
CreatedInstances.TryAdd(meta.Index, meta);
|
CreatedInstances.TryAdd(meta.ID, meta);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ExcludedInstances.TryAdd(meta.Index, meta);
|
ExcludedInstances.TryAdd(meta.ID, meta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Reset() {
|
protected override void Reset() {
|
||||||
inZH = true;
|
inZH = true;
|
||||||
hasOriginal = OptionalBool.None;
|
hasOriginal = null;
|
||||||
isProofread = OptionalBool.None;
|
isProofread = null;
|
||||||
isDraft = OptionalBool.None;
|
isDraft = null;
|
||||||
dateChanged = false;
|
dateChanged = false;
|
||||||
Index = "";
|
ID = "";
|
||||||
Autopsic = "";
|
|
||||||
Volume = "";
|
Volume = "";
|
||||||
Page = "";
|
Page = "";
|
||||||
Date = "";
|
Date = "";
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace HaDocument.Reactors {
|
|||||||
private string Name;
|
private string Name;
|
||||||
private string Prename = "";
|
private string Prename = "";
|
||||||
private string Surname = "";
|
private string Surname = "";
|
||||||
|
private string? Reference;
|
||||||
private string? Komm;
|
private string? Komm;
|
||||||
|
|
||||||
internal PersonDefsReactor(IReader reader, IntermediateLibrary lib) : base(reader, lib) {
|
internal PersonDefsReactor(IReader reader, IntermediateLibrary lib) : base(reader, lib) {
|
||||||
@@ -42,6 +43,7 @@ namespace HaDocument.Reactors {
|
|||||||
Name = tag["name"];
|
Name = tag["name"];
|
||||||
Prename = tag["vorname"];
|
Prename = tag["vorname"];
|
||||||
Surname = tag["nachname"];
|
Surname = tag["nachname"];
|
||||||
|
Reference = String.IsNullOrWhiteSpace(tag["ref"]) ? null : tag["ref"];
|
||||||
if (!String.IsNullOrWhiteSpace(tag["komm"])) Komm = tag["komm"];
|
if (!String.IsNullOrWhiteSpace(tag["komm"])) Komm = tag["komm"];
|
||||||
Add();
|
Add();
|
||||||
_active = false;
|
_active = false;
|
||||||
@@ -53,11 +55,12 @@ namespace HaDocument.Reactors {
|
|||||||
Name = "";
|
Name = "";
|
||||||
Prename = "";
|
Prename = "";
|
||||||
Surname = "";
|
Surname = "";
|
||||||
|
Reference = null;
|
||||||
Komm = null;
|
Komm = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Add() {
|
public void Add() {
|
||||||
CreatedInstances.Add(Index, new Person(Index, Name, Prename, Surname, Komm));
|
CreatedInstances.Add(Index, new Person(Index, Name, Prename, Surname, Komm, Reference));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ namespace HaDocument.Reactors
|
|||||||
private bool _normalizeWhitespace = false;
|
private bool _normalizeWhitespace = false;
|
||||||
|
|
||||||
// State
|
// State
|
||||||
private string Index = "";
|
private string ID = "";
|
||||||
|
|
||||||
private string _page = "";
|
private string _page = "";
|
||||||
private string _line = "";
|
private string _line = "";
|
||||||
@@ -46,7 +46,7 @@ namespace HaDocument.Reactors
|
|||||||
if (!tag.EndTag &&
|
if (!tag.EndTag &&
|
||||||
!tag.IsEmpty &&
|
!tag.IsEmpty &&
|
||||||
tag.Name == "letterTradition" &&
|
tag.Name == "letterTradition" &&
|
||||||
!String.IsNullOrWhiteSpace(tag["ref"])
|
!String.IsNullOrWhiteSpace(tag["letter"])
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Activate(_reader, tag);
|
Activate(_reader, tag);
|
||||||
@@ -57,33 +57,33 @@ namespace HaDocument.Reactors
|
|||||||
tag.Name == "ZHText"
|
tag.Name == "ZHText"
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (!CreatedStructure.ContainsKey(tag["index"]))
|
if (!CreatedStructure.ContainsKey(tag["letter"]))
|
||||||
this.CreatedStructure.Add(tag["index"], new Dictionary<string, HashSet<string>>());
|
this.CreatedStructure.Add(tag["letter"], new Dictionary<string, HashSet<string>>());
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
!tag.EndTag &&
|
!tag.EndTag &&
|
||||||
_active &&
|
_active &&
|
||||||
tag.Name == "line" &&
|
tag.Name == "line" &&
|
||||||
!String.IsNullOrWhiteSpace(tag["index"])
|
!String.IsNullOrWhiteSpace(tag["letter"])
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_line = tag["index"];
|
_line = tag["letter"];
|
||||||
if (!CreatedStructure[Index][_page].Contains(_line))
|
if (!CreatedStructure[ID][_page].Contains(_line))
|
||||||
{
|
{
|
||||||
CreatedStructure[Index][_page].Add(_line);
|
CreatedStructure[ID][_page].Add(_line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
!tag.EndTag &&
|
!tag.EndTag &&
|
||||||
_active &&
|
_active &&
|
||||||
tag.Name == "page" &&
|
tag.Name == "page" &&
|
||||||
!String.IsNullOrWhiteSpace(tag["index"])
|
!String.IsNullOrWhiteSpace(tag["letter"])
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_page = tag["index"];
|
_page = tag["letter"];
|
||||||
if (!CreatedStructure[Index].ContainsKey(_page))
|
if (!CreatedStructure[ID].ContainsKey(_page))
|
||||||
{
|
{
|
||||||
CreatedStructure[Index].Add(_page, new HashSet<string>());
|
CreatedStructure[ID].Add(_page, new HashSet<string>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
@@ -106,7 +106,7 @@ namespace HaDocument.Reactors
|
|||||||
{
|
{
|
||||||
if (_hands == null)
|
if (_hands == null)
|
||||||
_hands = new List<Hand>();
|
_hands = new List<Hand>();
|
||||||
_hands.Add(new Hand(Index, _person, _handstartpg, _handstartln, _page, _line));
|
_hands.Add(new Hand(ID, _person, _handstartpg, _handstartln, _page, _line));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ namespace HaDocument.Reactors
|
|||||||
if (!_active && reader != null && tag != null)
|
if (!_active && reader != null && tag != null)
|
||||||
{
|
{
|
||||||
_active = true;
|
_active = true;
|
||||||
Index = tag["ref"];
|
ID = tag["letter"];
|
||||||
_element = new ElementStringBinder(reader, tag, Add, _normalizeWhitespace);
|
_element = new ElementStringBinder(reader, tag, Add, _normalizeWhitespace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,22 +124,22 @@ namespace HaDocument.Reactors
|
|||||||
{
|
{
|
||||||
if (String.IsNullOrWhiteSpace(element)) return;
|
if (String.IsNullOrWhiteSpace(element)) return;
|
||||||
var reason = new Tradition(
|
var reason = new Tradition(
|
||||||
Index,
|
ID,
|
||||||
element);
|
element);
|
||||||
CreatedInstances.TryAdd(Index, reason);
|
CreatedInstances.TryAdd(ID, reason);
|
||||||
if (_hands != null)
|
if (_hands != null)
|
||||||
{
|
{
|
||||||
if (!CreatedHands.ContainsKey(Index))
|
if (!CreatedHands.ContainsKey(ID))
|
||||||
CreatedHands.Add(Index, _hands);
|
CreatedHands.Add(ID, _hands);
|
||||||
else
|
else
|
||||||
CreatedHands[Index].AddRange(_hands);
|
CreatedHands[ID].AddRange(_hands);
|
||||||
}
|
}
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Reset()
|
protected override void Reset()
|
||||||
{
|
{
|
||||||
Index = "";
|
ID = "";
|
||||||
_page = "";
|
_page = "";
|
||||||
_line = "";
|
_line = "";
|
||||||
_active = false;
|
_active = false;
|
||||||
|
|||||||
@@ -33,24 +33,22 @@ public class Briefecontroller : Controller {
|
|||||||
// Normalisation and Validation, (some) data aquisition
|
// Normalisation and Validation, (some) data aquisition
|
||||||
if (id == null) return Redirect(url + defaultID);
|
if (id == null) return Redirect(url + defaultID);
|
||||||
id = id.ToLower();
|
id = id.ToLower();
|
||||||
var preliminarymeta = lib.Metas.Where(x => x.Value.Autopsic == id);
|
Meta? meta;
|
||||||
if (preliminarymeta == null || !preliminarymeta.Any()) return error404();
|
if (!lib.Metas.TryGetValue(id, out meta)) return error404();
|
||||||
|
|
||||||
// Get all neccessary data
|
// Get all neccessary data
|
||||||
var index = preliminarymeta.First().Key;
|
var text = lib.Letters.ContainsKey(id) ? lib.Letters[id] : null;
|
||||||
var meta = preliminarymeta.First().Value;
|
var marginals = lib.Marginals.ContainsKey(id) ? lib.Marginals[id] : null;
|
||||||
var text = lib.Letters.ContainsKey(index) ? lib.Letters[index] : null;
|
var tradition = lib.Traditions.ContainsKey(id) ? lib.Traditions[id] : null;
|
||||||
var marginals = lib.MarginalsByLetter.Contains(index) ? lib.MarginalsByLetter[index] : null;
|
var editreasons = lib.Editreasons.ContainsKey(id) ? lib.EditreasonsByLetter[id] : null; // TODO: Order
|
||||||
var tradition = lib.Traditions.ContainsKey(index) ? lib.Traditions[index] : null;
|
var hands = lib.Hands.ContainsKey(id) ? lib.Hands[id] : null;
|
||||||
var editreasons = lib.Editreasons.ContainsKey(index) ? lib.EditreasonsByLetter[index] : null; // TODO: Order
|
|
||||||
var hands = lib.Hands.ContainsKey(index) ? lib.Hands[index] : null;
|
|
||||||
var nextmeta = meta != lib.MetasByDate.Last() ? lib.MetasByDate.ItemRef(lib.MetasByDate.IndexOf(meta) + 1) : null;
|
var nextmeta = meta != lib.MetasByDate.Last() ? lib.MetasByDate.ItemRef(lib.MetasByDate.IndexOf(meta) + 1) : null;
|
||||||
var prevmeta = meta != lib.MetasByDate.First() ? lib.MetasByDate.ItemRef(lib.MetasByDate.IndexOf(meta) - 1) : null;
|
var prevmeta = meta != lib.MetasByDate.First() ? lib.MetasByDate.ItemRef(lib.MetasByDate.IndexOf(meta) - 1) : null;
|
||||||
|
|
||||||
// More Settings and variables
|
// More Settings and variables
|
||||||
ViewData["Title"] = "HKB – Brief " + id.ToLower();
|
ViewData["Title"] = "HKB – Brief " + id.ToLower();
|
||||||
ViewData["SEODescription"] = "HKB – Brief " + id.ToLower();
|
ViewData["SEODescription"] = "HKB – Brief " + id.ToLower();
|
||||||
ViewData["Filename"] = "HKB_" + meta.Autopsic + ".pdf";
|
ViewData["Filename"] = "HKB_" + meta.ID + ".pdf";
|
||||||
if (!string.IsNullOrWhiteSpace(search)) {
|
if (!string.IsNullOrWhiteSpace(search)) {
|
||||||
ViewData["Mark"] = search;
|
ViewData["Mark"] = search;
|
||||||
}
|
}
|
||||||
@@ -58,9 +56,9 @@ public class Briefecontroller : Controller {
|
|||||||
// Model creation
|
// Model creation
|
||||||
var hasMarginals = false;
|
var hasMarginals = false;
|
||||||
if (marginals != null && marginals.Any()) hasMarginals = true;
|
if (marginals != null && marginals.Any()) hasMarginals = true;
|
||||||
var model = new BriefeViewModel(id, index, GenerateMetaViewModel(lib, meta, true));
|
var model = new BriefeViewModel(id, id, GenerateMetaViewModel(lib, meta, true));
|
||||||
if (nextmeta != null) model.MetaData.Next = (GenerateMetaViewModel(lib, nextmeta, false), url + nextmeta.Autopsic);
|
if (nextmeta != null) model.MetaData.Next = (GenerateMetaViewModel(lib, nextmeta, false), url + nextmeta.ID);
|
||||||
if (prevmeta != null) model.MetaData.Prev = (GenerateMetaViewModel(lib, prevmeta, false), url + prevmeta.Autopsic);
|
if (prevmeta != null) model.MetaData.Prev = (GenerateMetaViewModel(lib, prevmeta, false), url + prevmeta.ID);
|
||||||
if (hands != null && hands.Any()) model.ParsedHands = HaWeb.HTMLHelpers.LetterHelpers.CreateHands(lib, hands);
|
if (hands != null && hands.Any()) model.ParsedHands = HaWeb.HTMLHelpers.LetterHelpers.CreateHands(lib, hands);
|
||||||
if (editreasons != null && editreasons.Any()) model.ParsedEdits = HaWeb.HTMLHelpers.LetterHelpers.CreateEdits(lib, _readerService, editreasons);
|
if (editreasons != null && editreasons.Any()) model.ParsedEdits = HaWeb.HTMLHelpers.LetterHelpers.CreateEdits(lib, _readerService, editreasons);
|
||||||
model.DefaultCategory = lib.Apps.ContainsKey("-1") ? lib.Apps["-1"].Category : null;
|
model.DefaultCategory = lib.Apps.ContainsKey("-1") ? lib.Apps["-1"].Category : null;
|
||||||
@@ -130,8 +128,8 @@ public class Briefecontroller : Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal static BriefeMetaViewModel GenerateMetaViewModel(ILibrary lib, Meta meta, bool generatePersonLinks) {
|
internal static BriefeMetaViewModel GenerateMetaViewModel(ILibrary lib, Meta meta, bool generatePersonLinks) {
|
||||||
var hasText = lib.Letters.ContainsKey(meta.Index) ? true : false;
|
var hasText = lib.Letters.ContainsKey(meta.ID) ? true : false;
|
||||||
var hasMarginals = lib.MarginalsByLetter.Contains(meta.Index) ? true : false;
|
var hasMarginals = lib.Marginals.ContainsKey(meta.ID) ? true : false;
|
||||||
var senders = meta.Senders.Select(x => lib.Persons[x]).ToList() ?? new List<Person>();
|
var senders = meta.Senders.Select(x => lib.Persons[x]).ToList() ?? new List<Person>();
|
||||||
var receivers = meta.Receivers.Select(x => lib.Persons[x]).ToList() ?? new List<Person>();
|
var receivers = meta.Receivers.Select(x => lib.Persons[x]).ToList() ?? new List<Person>();
|
||||||
var zhstring = meta.ZH != null ? HaWeb.HTMLHelpers.LetterHelpers.CreateZHString(meta) : null;
|
var zhstring = meta.ZH != null ? HaWeb.HTMLHelpers.LetterHelpers.CreateZHString(meta) : null;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class IndexController : Controller {
|
|||||||
if (String.IsNullOrWhiteSpace(letterno)) return _error404();
|
if (String.IsNullOrWhiteSpace(letterno)) return _error404();
|
||||||
letterno = letterno.Trim();
|
letterno = letterno.Trim();
|
||||||
var lib = _lib.GetLibrary();
|
var lib = _lib.GetLibrary();
|
||||||
var letter = lib.Metas.Where(x => x.Value.Autopsic == letterno);
|
var letter = lib.Metas.ContainsKey(letterno) ? lib.Metas[letterno] : null;
|
||||||
if (letter != null)
|
if (letter != null)
|
||||||
return RedirectToAction("Index", "Briefe", new { id = letterno });
|
return RedirectToAction("Index", "Briefe", new { id = letterno });
|
||||||
return _error404();
|
return _error404();
|
||||||
@@ -50,7 +50,7 @@ public class IndexController : Controller {
|
|||||||
if (letters != null && letters.Any() && letters.Count == 1) {
|
if (letters != null && letters.Any() && letters.Count == 1) {
|
||||||
string? autopsic = null;
|
string? autopsic = null;
|
||||||
if (lib.Metas.ContainsKey(letters.First())) {
|
if (lib.Metas.ContainsKey(letters.First())) {
|
||||||
autopsic = lib.Metas[letters.First()].Autopsic;
|
autopsic = lib.Metas[letters.First()].ID;
|
||||||
}
|
}
|
||||||
if (autopsic == null) return _error404();
|
if (autopsic == null) return _error404();
|
||||||
return RedirectToAction("Index", "Briefe", new { id = autopsic });
|
return RedirectToAction("Index", "Briefe", new { id = autopsic });
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class SucheController : Controller {
|
|||||||
|
|
||||||
// Letter & comment search and search result creation
|
// Letter & comment search and search result creation
|
||||||
var resletter = _xmlService.SearchCollection("letters", search, _readerService, null);
|
var resletter = _xmlService.SearchCollection("letters", search, _readerService, null);
|
||||||
List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? rescomments = null;
|
List<(CollectedItem, List<(string Page, string Line, string Preview, string Identifier)> Results)>? rescomments = null;
|
||||||
if (comments == true)
|
if (comments == true)
|
||||||
rescomments = _xmlService.SearchCollection("marginals", search, _readerService, lib);
|
rescomments = _xmlService.SearchCollection("marginals", search, _readerService, lib);
|
||||||
|
|
||||||
@@ -54,17 +54,15 @@ public class SucheController : Controller {
|
|||||||
if (resletter != null)
|
if (resletter != null)
|
||||||
metas.AddRange(
|
metas.AddRange(
|
||||||
resletter
|
resletter
|
||||||
.Select(x => x.Index)
|
.Select(x => x.Item.ID)
|
||||||
.Where(x => lib.Metas.ContainsKey(x))
|
.Where(x => lib.Metas.ContainsKey(x))
|
||||||
.Select(x => lib.Metas[x])
|
.Select(x => lib.Metas[x])
|
||||||
);
|
);
|
||||||
if (rescomments != null)
|
if (rescomments != null)
|
||||||
metas.AddRange(
|
metas.AddRange(
|
||||||
rescomments
|
rescomments
|
||||||
.Where(x => lib.Marginals.ContainsKey(x.Index))
|
.Where(x => lib.Metas.ContainsKey(x.Item1.ID.Split('-').First()))
|
||||||
.Select(x => lib.Marginals[x.Index])
|
.Select(x => lib.Metas[x.Item1.ID.Split('-').First()])
|
||||||
.Where(x => lib.Metas.ContainsKey(x.Letter))
|
|
||||||
.Select(x => lib.Metas[x.Letter])
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
@@ -83,14 +81,12 @@ public class SucheController : Controller {
|
|||||||
search = search.Trim();
|
search = search.Trim();
|
||||||
|
|
||||||
// Search
|
// Search
|
||||||
List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? res = null;
|
var res = _xmlService.SearchCollection("register-comments", search, _readerService, lib);
|
||||||
|
|
||||||
res = _xmlService.SearchCollection("register-comments", search, _readerService, lib);
|
|
||||||
if (res == null || !res.Any())
|
if (res == null || !res.Any())
|
||||||
return _paginateSendRegister(lib, search, SearchType.Register, SearchResultType.NotFound, null);
|
return _paginateSendRegister(lib, search, SearchType.Register, SearchResultType.NotFound, null);
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
return _paginateSendRegister(lib, search, SearchType.Register, SearchResultType.Success, _createComments("neuzeit", res.Select((x) => (x.Index, x.Results.Select((y) => y.Identifier).ToList())).OrderBy(x => x.Index).ToList()));
|
return _paginateSendRegister(lib, search, SearchType.Register, SearchResultType.Success, _createComments("neuzeit", res.Select((x) => (x.Item.ID, x.Results.Select((y) => y.Identifier).ToList())).OrderBy(x => x.ID).ToList()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,13 +101,12 @@ public class SucheController : Controller {
|
|||||||
search = search.Trim();
|
search = search.Trim();
|
||||||
|
|
||||||
// Search
|
// Search
|
||||||
List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? res = null;
|
var res = _xmlService.SearchCollection("forschung-comments", search, _readerService, lib);
|
||||||
res = _xmlService.SearchCollection("forschung-comments", search, _readerService, lib);
|
|
||||||
if (res == null || !res.Any())
|
if (res == null || !res.Any())
|
||||||
return _paginateSendRegister(lib, search, SearchType.Science, SearchResultType.NotFound, null);
|
return _paginateSendRegister(lib, search, SearchType.Science, SearchResultType.NotFound, null);
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
return _paginateSendRegister(lib, search, SearchType.Science, SearchResultType.Success, _createComments("neuzeit", res.Select((x) => (x.Index, x.Results.Select((y) => y.Identifier).ToList())).OrderBy(x => x.Index).ToList()));
|
return _paginateSendRegister(lib, search, SearchType.Science, SearchResultType.Success, _createComments("neuzeit", res.Select((x) => (x.Item.ID, x.Results.Select((y) => y.Identifier).ToList())).OrderBy(x => x.ID).ToList()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,8 +117,8 @@ public class SucheController : Controller {
|
|||||||
bool? comments,
|
bool? comments,
|
||||||
SearchResultType SRT,
|
SearchResultType SRT,
|
||||||
List<Meta>? metas,
|
List<Meta>? metas,
|
||||||
List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? resletters,
|
List<(CollectedItem, List<(string Page, string Line, string Preview, string Identifier)> Results)>? resletters,
|
||||||
List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? rescomments
|
List<(CollectedItem, List<(string Page, string Line, string Preview, string Identifier)> Results)>? rescomments
|
||||||
) {
|
) {
|
||||||
// Sorting, get Pages & Error Checking
|
// Sorting, get Pages & Error Checking
|
||||||
var metasbyyear = metas!.Distinct().ToLookup(x => x.Sort.Year).OrderBy(x => x.Key).ToList();
|
var metasbyyear = metas!.Distinct().ToLookup(x => x.Sort.Year).OrderBy(x => x.Key).ToList();
|
||||||
@@ -148,31 +143,31 @@ public class SucheController : Controller {
|
|||||||
Dictionary<string, List<(Marginal, string)>>? parsedMarginals = null;
|
Dictionary<string, List<(Marginal, string)>>? parsedMarginals = null;
|
||||||
if (resletters != null)
|
if (resletters != null)
|
||||||
foreach (var res in resletters) {
|
foreach (var res in resletters) {
|
||||||
if (!searchResults.ContainsKey(res.Index))
|
if (!searchResults.ContainsKey(res.Item1.ID))
|
||||||
searchResults.Add(res.Index, new List<SearchResult>());
|
searchResults.Add(res.Item1.ID, new List<SearchResult>());
|
||||||
foreach (var r in res.Results) {
|
foreach (var r in res.Results) {
|
||||||
if(!searchResults[res.Index].Where(x => x.Page == r.Page && x.Line == r.Line).Any())
|
if(!searchResults[res.Item1.ID].Where(x => x.Page == r.Page && x.Line == r.Line).Any())
|
||||||
searchResults[res.Index].Add(new SearchResult(search, res.Index) { Page = r.Page, Line = r.Line, Preview = r.Preview });
|
searchResults[res.Item1.ID].Add(new SearchResult(search, res.Item1.ID) { Page = r.Page, Line = r.Line, Preview = r.Preview });
|
||||||
}
|
}
|
||||||
if (searchResults[res.Index].Any()) {
|
if (searchResults[res.Item1.ID].Any()) {
|
||||||
searchResults[res.Index] = searchResults[res.Index].OrderBy(x => HaWeb.HTMLHelpers.ConversionHelpers.RomanOrNumberToInt(x.Page)).ThenBy(x => HaWeb.HTMLHelpers.ConversionHelpers.RomanOrNumberToInt(x.Line)).ToList();
|
searchResults[res.Item1.ID] = searchResults[res.Item1.ID].OrderBy(x => HaWeb.HTMLHelpers.ConversionHelpers.RomanOrNumberToInt(x.Page)).ThenBy(x => HaWeb.HTMLHelpers.ConversionHelpers.RomanOrNumberToInt(x.Line)).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rescomments != null) {
|
if (rescomments != null) {
|
||||||
var marginals = rescomments.Where(x => lib.Marginals.ContainsKey(x.Index)).Select(x => lib.Marginals[x.Index]).ToLookup(x => x.Letter);
|
var marginals = rescomments.Select(x => Marginal.FromXElement(x.Item1.Element)).ToLookup(x => x.Letter);
|
||||||
var shownletters = letters!.SelectMany(x => x.LetterList.Select(y => y.Meta.Index)).ToHashSet();
|
var shownletters = letters!.SelectMany(x => x.LetterList.Select(y => y.Meta.ID)).ToHashSet();
|
||||||
var shownmarginals = marginals!.Where(x => shownletters.Contains(x.Key)).Select(x => (x.Key, x.ToList())).ToList();
|
var shownmarginals = marginals!.Where(x => shownletters.Contains(x.Key)).Select(x => (x.Key, x.ToList())).ToList();
|
||||||
var previews = _xmlService != null ? _xmlService.GetPreviews(shownmarginals, _readerService ,lib) : null;
|
var previews = _xmlService != null ? _xmlService.GetPreviews(shownmarginals, _readerService ,lib) : null;
|
||||||
if (previews != null)
|
if (previews != null)
|
||||||
foreach (var p in previews) {
|
foreach (var p in previews) {
|
||||||
if (!searchResults.ContainsKey(p.Index))
|
if (!searchResults.ContainsKey(p.Item.ID))
|
||||||
searchResults.Add(p.Index, new List<SearchResult>());
|
searchResults.Add(p.Item.ID, new List<SearchResult>());
|
||||||
foreach (var res in p.Results) {
|
foreach (var res in p.Results) {
|
||||||
if (!searchResults[p.Index].Where(x => x.Page == res.Page && x.Line == res.Line).Any())
|
if (!searchResults[p.Item.ID].Where(x => x.Page == res.Page && x.Line == res.Line).Any())
|
||||||
searchResults[p.Index].Add(new SearchResult(search, p.Index) { Page = res.Page, Line = res.Line, Preview = res.Preview });
|
searchResults[p.Item.ID].Add(new SearchResult(search, p.Item.ID) { Page = res.Page, Line = res.Line, Preview = res.Preview });
|
||||||
}
|
}
|
||||||
if (searchResults[p.Index].Any()) {
|
if (searchResults[p.Item.ID].Any()) {
|
||||||
searchResults[p.Index] = searchResults[p.Index].OrderBy(x => HaWeb.HTMLHelpers.ConversionHelpers.RomanOrNumberToInt(x.Page)).ThenBy(x => HaWeb.HTMLHelpers.ConversionHelpers.RomanOrNumberToInt(x.Line)).ToList();
|
searchResults[p.Item.ID] = searchResults[p.Item.ID].OrderBy(x => HaWeb.HTMLHelpers.ConversionHelpers.RomanOrNumberToInt(x.Page)).ThenBy(x => HaWeb.HTMLHelpers.ConversionHelpers.RomanOrNumberToInt(x.Line)).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ public static class CommentHelpers {
|
|||||||
sb.Append(HTMLHelpers.TagHelpers.CreateEndElement(DEFAULTELEMENT));
|
sb.Append(HTMLHelpers.TagHelpers.CreateEndElement(DEFAULTELEMENT));
|
||||||
arrow = true;
|
arrow = true;
|
||||||
}
|
}
|
||||||
sb.Append(HTMLHelpers.TagHelpers.CreateElement("a", LETLINKCLASS, "/HKB/Briefe/" + let.Autopsic + "#" + blk.Page + "-" + blk.Line));
|
sb.Append(HTMLHelpers.TagHelpers.CreateElement("a", LETLINKCLASS, "/HKB/Briefe/" + let.ID + "#" + blk.Page + "-" + blk.Line));
|
||||||
var linkstring = string.Empty;
|
var linkstring = string.Empty;
|
||||||
var pglnstring = string.Empty;
|
var pglnstring = string.Empty;
|
||||||
linkstring += let.Autopsic;
|
linkstring += let.ID;
|
||||||
pglnstring += " ( " + blk.Page + "/" + blk.Line + " )";
|
pglnstring += " ( " + blk.Page + "/" + blk.Line + " )";
|
||||||
linkstring += pglnstring;
|
linkstring += pglnstring;
|
||||||
sb.Append(linkstring);
|
sb.Append(linkstring);
|
||||||
|
|||||||
@@ -46,12 +46,12 @@ public class LinkHelper {
|
|||||||
new HaWeb.HTMLHelpers.TagHelpers.Attribute() { Name = "rel", Value = "noopener noreferrer" }));
|
new HaWeb.HTMLHelpers.TagHelpers.Attribute() { Name = "rel", Value = "noopener noreferrer" }));
|
||||||
if (tag.Name == "intlink" && tag.Values.ContainsKey("letter") && _lib.Metas.ContainsKey(tag["letter"])) {
|
if (tag.Name == "intlink" && tag.Values.ContainsKey("letter") && _lib.Metas.ContainsKey(tag["letter"])) {
|
||||||
var letter = _lib.Metas[tag["letter"]];
|
var letter = _lib.Metas[tag["letter"]];
|
||||||
_sb.Append(HTMLHelpers.TagHelpers.CreateElement("a", LETLINKCLASS, "/HKB/Briefe/" + letter.Autopsic + "#" + tag["page"] + "-" + tag["line"]));
|
_sb.Append(HTMLHelpers.TagHelpers.CreateElement("a", LETLINKCLASS, "/HKB/Briefe/" + letter.ID + "#" + tag["page"] + "-" + tag["line"]));
|
||||||
if (!tag.Values.ContainsKey("linktext") || tag.Values["linktext"] == "true") {
|
if (!tag.Values.ContainsKey("linktext") || tag.Values["linktext"] == "true") {
|
||||||
var linkstring = string.Empty;
|
var linkstring = string.Empty;
|
||||||
var ZHstring = string.Empty;
|
var ZHstring = string.Empty;
|
||||||
var pglnstring = string.Empty;
|
var pglnstring = string.Empty;
|
||||||
linkstring += "HKB " + letter.Autopsic;
|
linkstring += "HKB " + letter.ID;
|
||||||
if (tag.Values.ContainsKey("page")) {
|
if (tag.Values.ContainsKey("page")) {
|
||||||
pglnstring += tag["page"];
|
pglnstring += tag["page"];
|
||||||
if (tag.Values.ContainsKey("line")) {
|
if (tag.Values.ContainsKey("line")) {
|
||||||
|
|||||||
@@ -6,29 +6,29 @@ using HaWeb.XMLParser;
|
|||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
|
|
||||||
public class CollectedItem : ISearchable {
|
public class CollectedItem : ISearchable {
|
||||||
public string Index { get; private set; }
|
public string ID { get; private set; }
|
||||||
public string? SearchText { get; private set; }
|
public string? SearchText { get; private set; }
|
||||||
public IDictionary<string, string>? Fields { get; private set; }
|
public IDictionary<string, string>? Fields { get; private set; }
|
||||||
public XElement ELement { get; private set; }
|
public XElement Element { get; private set; }
|
||||||
public IXMLCollection Collection { get; private set; }
|
public IXMLCollection Collection { get; private set; }
|
||||||
public IDictionary<string, CollectedItem>? Items { get; set; }
|
public IDictionary<string, CollectedItem>? Items { get; set; }
|
||||||
|
|
||||||
public CollectedItem(
|
public CollectedItem(
|
||||||
string index,
|
string id,
|
||||||
XElement element,
|
XElement element,
|
||||||
IXMLCollection collection,
|
IXMLCollection collection,
|
||||||
IDictionary<string, string>? fields,
|
|
||||||
string? searchtext = null
|
string? searchtext = null
|
||||||
) {
|
) {
|
||||||
this.Index = index;
|
this.ID = id;
|
||||||
this.SearchText = searchtext;
|
this.SearchText = searchtext;
|
||||||
this.Collection = collection;
|
this.Collection = collection;
|
||||||
this.ELement = element;
|
this.Element = element;
|
||||||
this.Fields = fields;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string? this[string v] {
|
public string? this[string v] {
|
||||||
get {
|
get {
|
||||||
|
if (Fields == null && Collection.GenerateDataFields != null)
|
||||||
|
Fields = Collection.GenerateDataFields(this.Element);
|
||||||
if (Fields != null && Fields.ContainsKey(v))
|
if (Fields != null && Fields.ContainsKey(v))
|
||||||
return Fields[v];
|
return Fields[v];
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ ChangeToken.OnChange(
|
|||||||
);
|
);
|
||||||
|
|
||||||
app.UseWebSockets( new WebSocketOptions {
|
app.UseWebSockets( new WebSocketOptions {
|
||||||
KeepAliveInterval = TimeSpan.FromMinutes(180)
|
KeepAliveInterval = TimeSpan.FromMinutes(180),
|
||||||
});
|
});
|
||||||
app.UseMiddleware<WebSocketMiddleware>();
|
app.UseMiddleware<WebSocketMiddleware>();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace HaWeb.SearchHelpers;
|
namespace HaWeb.SearchHelpers;
|
||||||
|
|
||||||
public interface ISearchable {
|
public interface ISearchable {
|
||||||
public string Index { get; }
|
public string ID { get; }
|
||||||
public string? SearchText { get; }
|
public string? SearchText { get; }
|
||||||
}
|
}
|
||||||
@@ -10,8 +10,8 @@ public class LetterDescNode : INodeRule
|
|||||||
Documents = new[] { "metadaten" },
|
Documents = new[] { "metadaten" },
|
||||||
XPath = "//letterDesc"
|
XPath = "//letterDesc"
|
||||||
};
|
};
|
||||||
public string[]? Attributes { get; } = { "ref" };
|
public string[]? Attributes { get; } = { "letter" };
|
||||||
public string? uniquenessAttribute => "ref" ;
|
public string? uniquenessAttribute => "letter" ;
|
||||||
public List<(string, HamannXPath, string)>? References { get; } = new List<(string, HamannXPath, string)>()
|
public List<(string, HamannXPath, string)>? References { get; } = new List<(string, HamannXPath, string)>()
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ public class LetterTextNode : INodeRule
|
|||||||
Documents = new[] { "brieftext" },
|
Documents = new[] { "brieftext" },
|
||||||
XPath = "//letterText"
|
XPath = "//letterText"
|
||||||
};
|
};
|
||||||
public string[]? Attributes { get; } = { "index" };
|
public string[]? Attributes { get; } = { "letter" };
|
||||||
public string? uniquenessAttribute => "index" ;
|
public string? uniquenessAttribute => "letter" ;
|
||||||
public List<(string, HamannXPath, string)>? References { get; } = new List<(string, HamannXPath, string)>()
|
public List<(string, HamannXPath, string)>? References { get; } = new List<(string, HamannXPath, string)>()
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ public class LetterTraditionNode : INodeRule
|
|||||||
Documents = new[] { "ueberlieferung" },
|
Documents = new[] { "ueberlieferung" },
|
||||||
XPath = "//letterTradition"
|
XPath = "//letterTradition"
|
||||||
};
|
};
|
||||||
public string[]? Attributes { get; } = { "ref" };
|
public string[]? Attributes { get; } = { "letter" };
|
||||||
public string? uniquenessAttribute => "ref" ;
|
public string? uniquenessAttribute => "letter" ;
|
||||||
public List<(string, HamannXPath, string)>? References { get; } = new List<(string, HamannXPath, string)>()
|
public List<(string, HamannXPath, string)>? References { get; } = new List<(string, HamannXPath, string)>()
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ public class MarginalNode : INodeRule
|
|||||||
Documents = new[] { "stellenkommentar" },
|
Documents = new[] { "stellenkommentar" },
|
||||||
XPath = "//marginal"
|
XPath = "//marginal"
|
||||||
};
|
};
|
||||||
public string[]? Attributes { get; } = { "index", "letter", "page", "line" };
|
public string[]? Attributes { get; } = { "letter", "page", "line" };
|
||||||
public string? uniquenessAttribute => "index";
|
public string? uniquenessAttribute { get; }
|
||||||
public List<(string, HamannXPath, string)>? References { get; } = new List<(string, HamannXPath, string)>()
|
public List<(string, HamannXPath, string)>? References { get; } = new List<(string, HamannXPath, string)>()
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class StructureCollection : ICollectionRule {
|
|||||||
|
|
||||||
public IEnumerable<(string, XElement, XMLRootDocument)> GenerateIdentificationStrings(IEnumerable<(XElement, XMLRootDocument)> list) {
|
public IEnumerable<(string, XElement, XMLRootDocument)> GenerateIdentificationStrings(IEnumerable<(XElement, XMLRootDocument)> list) {
|
||||||
foreach (var e in list) {
|
foreach (var e in list) {
|
||||||
var id = e.Item1.Name == "letterText" ? e.Item1.Attribute("index")!.Value : e.Item1.Attribute("ref")!.Value;
|
var id = e.Item1.Attribute("letter")!.Value;
|
||||||
var currpage = String.Empty;
|
var currpage = String.Empty;
|
||||||
var currline = String.Empty;
|
var currline = String.Empty;
|
||||||
foreach (var el in e.Item1.Descendants()) {
|
foreach (var el in e.Item1.Descendants()) {
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ public class TextRules {
|
|||||||
{
|
{
|
||||||
if(reader.State.ParsedMarginals == null) reader.State.ParsedMarginals = new List<(string, string, string)>();
|
if(reader.State.ParsedMarginals == null) reader.State.ParsedMarginals = new List<(string, string, string)>();
|
||||||
var sb2 = new StringBuilder();
|
var sb2 = new StringBuilder();
|
||||||
margs = margs.OrderBy(x => Int32.Parse(x.Index));
|
if (margs.Count() > 1) margs = margs.OrderBy(x => Int32.Parse(x.Sort));
|
||||||
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateElement(DEFAULTELEMENT, CSSClasses.COMMENTMARKERCLASS, "ma-" + reader.State.currpage + "-" + reader.State.currline));
|
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateElement(DEFAULTELEMENT, CSSClasses.COMMENTMARKERCLASS, "ma-" + reader.State.currpage + "-" + reader.State.currline));
|
||||||
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateEndElement(DEFAULTELEMENT));
|
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateEndElement(DEFAULTELEMENT));
|
||||||
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateElement(DEFAULTELEMENT, CSSClasses.MARGINGALBOXCLASS));
|
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateElement(DEFAULTELEMENT, CSSClasses.MARGINGALBOXCLASS));
|
||||||
|
|||||||
@@ -14,24 +14,26 @@ public class BackLinkCollection : HaWeb.XMLParser.IXMLCollection {
|
|||||||
public bool Searchable { get; } = true;
|
public bool Searchable { get; } = true;
|
||||||
|
|
||||||
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
||||||
var margid = (string?)elem.Ancestors("marginal").First().Attribute("index");
|
var letter = (string?)elem.Attribute("letter");
|
||||||
if (String.IsNullOrWhiteSpace(margid)) return null;
|
var page = (string?)elem.Attribute("page");
|
||||||
return margid + _random.Next().ToString();
|
var line = (string?)elem.Attribute("line");
|
||||||
|
if (letter == null) return null;
|
||||||
|
var index = letter + "-" + page ?? "" + "-" + line ?? "";
|
||||||
|
if (String.IsNullOrWhiteSpace(index)) return null;
|
||||||
|
return index + _random.Next().ToString();
|
||||||
};
|
};
|
||||||
|
|
||||||
public static IDictionary<string, string>? GetDataFields(XElement element) {
|
public static IDictionary<string, string>? GetDataFields(XElement element) {
|
||||||
var res = new Dictionary<string, string>();
|
var res = new Dictionary<string, string>();
|
||||||
var marg = element.Ancestors("marginal").First();
|
var marg = element.Ancestors("marginal").First();
|
||||||
var index = (string?)marg.Attribute("index");
|
|
||||||
var letter = (string?)marg.Attribute("letter");
|
var letter = (string?)marg.Attribute("letter");
|
||||||
var page = (string?)marg.Attribute("page");
|
var page = (string?)marg.Attribute("page");
|
||||||
var line = (string?)marg.Attribute("line");
|
var line = (string?)marg.Attribute("line");
|
||||||
var refere = (string?)element.Attribute("ref");
|
var refere = (string?)element.Attribute("ref");
|
||||||
var subref = (string?)element.Attribute("subref");
|
var subref = (string?)element.Attribute("subref");
|
||||||
if (index == null || letter == null || (refere == null && subref == null)) return null;
|
if (letter == null || (refere == null && subref == null)) return null;
|
||||||
if (subref != null) res.Add("ref", subref);
|
if (subref != null) res.Add("ref", subref);
|
||||||
else res.Add("ref", refere!);
|
else res.Add("ref", refere!);
|
||||||
res.Add("index", index);
|
|
||||||
res.Add("letter", letter);
|
res.Add("letter", letter);
|
||||||
if (page != null) res.Add("page", page);
|
if (page != null) res.Add("page", page);
|
||||||
if (line != null) res.Add("line", line);
|
if (line != null) res.Add("line", line);
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ public static class CommentCollectionHelpers {
|
|||||||
|
|
||||||
public static IDictionary<string, ILookup<string, CollectedItem>>? GetLookups(IEnumerable<CollectedItem> items) {
|
public static IDictionary<string, ILookup<string, CollectedItem>>? GetLookups(IEnumerable<CollectedItem> items) {
|
||||||
var res = new Dictionary<string, ILookup<string, CollectedItem>>();
|
var res = new Dictionary<string, ILookup<string, CollectedItem>>();
|
||||||
var lemmas = items.Where(x => !String.IsNullOrWhiteSpace(x.Index));
|
var lemmas = items.Where(x => !String.IsNullOrWhiteSpace(x.ID));
|
||||||
if (lemmas != null && lemmas.Any())
|
if (lemmas != null && lemmas.Any())
|
||||||
res.Add("lemma", lemmas.ToLookup(x => x.Index.Substring(0, 1).ToUpper()));
|
res.Add("lemma", lemmas.ToLookup(x => x.ID.Substring(0, 1).ToUpper()));
|
||||||
// If we use lemmas
|
// If we use lemmas
|
||||||
// var lemmas = items.Where(x => x.Fields != null && x.Fields.ContainsKey("lemma"));
|
// var lemmas = items.Where(x => x.Fields != null && x.Fields.ContainsKey("lemma"));
|
||||||
// if (lemmas != null && lemmas.Any())
|
// if (lemmas != null && lemmas.Any())
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class LetterCollection : HaWeb.XMLParser.IXMLCollection {
|
|||||||
public bool Searchable { get; } = true;
|
public bool Searchable { get; } = true;
|
||||||
|
|
||||||
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
||||||
var index = elem.Attribute("index");
|
var index = elem.Attribute("letter");
|
||||||
if (index != null && !String.IsNullOrWhiteSpace(index.Value))
|
if (index != null && !String.IsNullOrWhiteSpace(index.Value))
|
||||||
return index.Value;
|
return index.Value;
|
||||||
else return null;
|
else return null;
|
||||||
|
|||||||
@@ -13,9 +13,14 @@ public class MarginalCollection : HaWeb.XMLParser.IXMLCollection {
|
|||||||
public bool Searchable { get; } = true;
|
public bool Searchable { get; } = true;
|
||||||
|
|
||||||
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
||||||
var index = elem.Attribute("index");
|
var letter = (string?)elem.Attribute("letter");
|
||||||
if (index != null && !String.IsNullOrWhiteSpace(index.Value))
|
var page = (string?)elem.Attribute("page");
|
||||||
return index.Value;
|
var line = (string?)elem.Attribute("line");
|
||||||
|
var sort = (string?)elem.Attribute("sort");
|
||||||
|
if (letter == null || page == null || line == null) return null;
|
||||||
|
var index = letter + "-" + page + "-" + line + sort ?? "";
|
||||||
|
if (index != null && !String.IsNullOrWhiteSpace(index))
|
||||||
|
return index;
|
||||||
else return null;
|
else return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -24,10 +29,12 @@ public class MarginalCollection : HaWeb.XMLParser.IXMLCollection {
|
|||||||
var letter = (string?)element.Attribute("letter");
|
var letter = (string?)element.Attribute("letter");
|
||||||
var page = (string?)element.Attribute("page");
|
var page = (string?)element.Attribute("page");
|
||||||
var line = (string?)element.Attribute("line");
|
var line = (string?)element.Attribute("line");
|
||||||
|
var sort = (string?)element.Attribute("sort");
|
||||||
if (letter == null || page == null || line == null) return null;
|
if (letter == null || page == null || line == null) return null;
|
||||||
res.Add("letter", letter);
|
res.Add("letter", letter);
|
||||||
res.Add("page", page);
|
res.Add("page", page);
|
||||||
res.Add("line", line);
|
res.Add("line", line);
|
||||||
|
if (sort != null) res.Add("sort", sort);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class MetaCollection : HaWeb.XMLParser.IXMLCollection {
|
|||||||
public bool Searchable { get; } = false;
|
public bool Searchable { get; } = false;
|
||||||
|
|
||||||
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
||||||
var index = elem.Attribute("ref");
|
var index = elem.Attribute("letter");
|
||||||
if (index != null && !String.IsNullOrWhiteSpace(index.Value))
|
if (index != null && !String.IsNullOrWhiteSpace(index.Value))
|
||||||
return index.Value;
|
return index.Value;
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class TraditionCollection : HaWeb.XMLParser.IXMLCollection {
|
|||||||
public bool Searchable { get; } = true;
|
public bool Searchable { get; } = true;
|
||||||
|
|
||||||
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
public static Func<XElement, string?> GetKey { get; } = (elem) => {
|
||||||
var index = elem.Attribute("ref");
|
var index = elem.Attribute("letter");
|
||||||
if (index != null && !String.IsNullOrWhiteSpace(index.Value))
|
if (index != null && !String.IsNullOrWhiteSpace(index.Value))
|
||||||
return index.Value;
|
return index.Value;
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
<a class="ml-1" href="@Model.PDFFilePath">
|
<a class="ml-1" href="@Model.PDFFilePath">
|
||||||
<div class="inline-block bg-slate-100 hover:bg-slate-200 border px-1.5 rounded">Brief @Model.MetaData.Meta.Autopsic</div>
|
<div class="inline-block bg-slate-100 hover:bg-slate-200 border px-1.5 rounded">Brief @Model.MetaData.Meta.ID</div>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
@if (Model.MetaData.Prev != null)
|
@if (Model.MetaData.Prev != null)
|
||||||
{
|
{
|
||||||
<a href="@Model.MetaData.Prev.Value.Item2">
|
<a href="@Model.MetaData.Prev.Value.Item2">
|
||||||
@Model.MetaData.Prev.Value.Model.Meta.Autopsic ◀
|
@Model.MetaData.Prev.Value.Model.Meta.ID ◀
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
@if (Model.MetaData.Next != null)
|
@if (Model.MetaData.Next != null)
|
||||||
{
|
{
|
||||||
<a href="@Model.MetaData.Next.Value.Item2">
|
<a href="@Model.MetaData.Next.Value.Item2">
|
||||||
▶ @Model.MetaData.Next.Value.Model.Meta.Autopsic
|
▶ @Model.MetaData.Next.Value.Model.Meta.ID
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
@foreach (var year in Model.Letters) {
|
@foreach (var year in Model.Letters) {
|
||||||
foreach (var letter in year.LetterList) {
|
foreach (var letter in year.LetterList) {
|
||||||
<div class="ha-letterlistentry">
|
<div class="ha-letterlistentry">
|
||||||
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.Autopsic">
|
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.ID">
|
||||||
@await Html.PartialAsync("/Views/Shared/_LetterHead.cshtml", (letter, true, false))
|
@await Html.PartialAsync("/Views/Shared/_LetterHead.cshtml", (letter, true, false))
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -84,27 +84,27 @@
|
|||||||
@foreach (var year in Model.Letters) {
|
@foreach (var year in Model.Letters) {
|
||||||
foreach (var letter in year.LetterList) {
|
foreach (var letter in year.LetterList) {
|
||||||
<div class="ha-letterlistentry">
|
<div class="ha-letterlistentry">
|
||||||
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.Autopsic">
|
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.ID">
|
||||||
@Html.Partial("/Views/Shared/_LetterHead.cshtml", (letter, true, false))
|
@Html.Partial("/Views/Shared/_LetterHead.cshtml", (letter, true, false))
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@if (Model.SearchResults != null && Model.SearchResults.ContainsKey(letter.Meta.Index)) {
|
@if (Model.SearchResults != null && Model.SearchResults.ContainsKey(letter.Meta.ID)) {
|
||||||
<div class="ha-letterlistsearchresults">
|
<div class="ha-letterlistsearchresults">
|
||||||
@foreach (var sr in Model.SearchResults[letter.Meta.Index])
|
@foreach (var sr in Model.SearchResults[letter.Meta.ID])
|
||||||
{
|
{
|
||||||
<div class="ha-letterlistsearchresult">
|
<div class="ha-letterlistsearchresult">
|
||||||
<div class="ha-searchresultlocation">
|
<div class="ha-searchresultlocation">
|
||||||
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.Autopsic" asp-route-search="@Model.ActiveSearch" asp-fragment="@sr.Page-@sr.Line">
|
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.ID" asp-route-search="@Model.ActiveSearch" asp-fragment="@sr.Page-@sr.Line">
|
||||||
HKB @letter.Meta.Autopsic @sr.Page/@sr.Line
|
HKB @letter.Meta.ID @sr.Page/@sr.Line
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="ha-searchresultpreview">
|
<div class="ha-searchresultpreview">
|
||||||
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.Autopsic" asp-route-search="@Model.ActiveSearch" asp-fragment="@sr.Page-@sr.Line">
|
<a asp-controller="Briefe" asp-action="Index" asp-route-id="@letter.Meta.ID" asp-route-search="@Model.ActiveSearch" asp-fragment="@sr.Page-@sr.Line">
|
||||||
@sr.Preview
|
@sr.Preview
|
||||||
</a>
|
</a>
|
||||||
@if (Model.Marginals != null && Model.Marginals.Any()) {
|
@if (Model.Marginals != null && Model.Marginals.Any()) {
|
||||||
@if (Model.Marginals.ContainsKey(letter.Meta.Index)) {
|
@if (Model.Marginals.ContainsKey(letter.Meta.ID)) {
|
||||||
@foreach (var c in Model.Marginals[letter.Meta.Index]) {
|
@foreach (var c in Model.Marginals[letter.Meta.ID]) {
|
||||||
@if (c.Item1.Page == sr.Page && c.Item1.Line == sr.Line) {
|
@if (c.Item1.Page == sr.Page && c.Item1.Line == sr.Line) {
|
||||||
<div class="ha-seachresultmarginal">
|
<div class="ha-seachresultmarginal">
|
||||||
<div class="ha-searchresultcommentpill">Kommentar</div>
|
<div class="ha-searchresultcommentpill">Kommentar</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
@if (!Model.Compact) {
|
@if (!Model.Compact) {
|
||||||
<div class="ha-letternumber">
|
<div class="ha-letternumber">
|
||||||
<div class="ha-letternumberinline">
|
<div class="ha-letternumberinline">
|
||||||
@Model.Letter.Meta.Autopsic
|
@Model.Letter.Meta.ID
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ha-metadatapersons">
|
<div class="ha-metadatapersons">
|
||||||
@foreach(var pair in Model.Letter.SenderReceiver) {
|
@foreach(var pair in Model.Letter.SenderReceiver) {
|
||||||
@if (Model.Letter.Meta.isDraft == HaDocument.Models.OptionalBool.True) {
|
@if (Model.Letter.Meta.isDraft.HasValue && Model.Letter.Meta.isDraft.Value) {
|
||||||
<span>@Html.Raw(pair.Sender)</span>
|
<span>@Html.Raw(pair.Sender)</span>
|
||||||
<div class="ha-tooltip">
|
<div class="ha-tooltip">
|
||||||
↛
|
↛
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (Model.Letter.Meta.hasOriginal != HaDocument.Models.OptionalBool.True) {
|
@if (Model.Letter.Meta.hasOriginal.HasValue && Model.Letter.Meta.hasOriginal.Value == true) {
|
||||||
<div class="ha-tooltip">
|
<div class="ha-tooltip">
|
||||||
<div class="ha-pill">
|
<div class="ha-pill">
|
||||||
<span class="ha-cross">Orig</span>
|
<span class="ha-cross">Orig</span>
|
||||||
|
|||||||
@@ -80,13 +80,13 @@ public class WebSocketMiddleware : IMiddleware {
|
|||||||
await webSocket.SendAsync(_SerializeToBytes(new { Ping = true}), WebSocketMessageType.Text, true, CancellationToken.None);
|
await webSocket.SendAsync(_SerializeToBytes(new { Ping = true}), WebSocketMessageType.Text, true, CancellationToken.None);
|
||||||
}
|
}
|
||||||
result = await webSocket.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None);
|
result = await webSocket.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None);
|
||||||
} catch (ConnectionAbortedException ex) {
|
} catch (WebSocketException ex) {
|
||||||
_openSockets!.Remove(webSocket);
|
_openSockets!.Remove(webSocket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await webSocket.CloseAsync(result.CloseStatus.Value, result.CloseStatusDescription, CancellationToken.None);
|
await webSocket.CloseAsync(result.CloseStatus.Value, result.CloseStatusDescription, CancellationToken.None);
|
||||||
} catch (ConnectionAbortedException ex) {
|
} catch (WebSocketException ex) {
|
||||||
_openSockets.Remove(webSocket);
|
_openSockets.Remove(webSocket);
|
||||||
}
|
}
|
||||||
_openSockets!.Remove(webSocket);
|
_openSockets!.Remove(webSocket);
|
||||||
@@ -127,7 +127,7 @@ public class WebSocketMiddleware : IMiddleware {
|
|||||||
foreach (var socket in _openSockets) {
|
foreach (var socket in _openSockets) {
|
||||||
try {
|
try {
|
||||||
await socket.SendAsync(_SerializeToBytes(msg), WebSocketMessageType.Text, true, CancellationToken.None);
|
await socket.SendAsync(_SerializeToBytes(msg), WebSocketMessageType.Text, true, CancellationToken.None);
|
||||||
} catch (ConnectionAbortedException ex) {
|
} catch (WebSocketException ex) {
|
||||||
_openSockets.Remove(socket);
|
_openSockets.Remove(socket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ public interface IXMLInteractionService {
|
|||||||
public void CreateSearchables(XDocument document); // XMLFileProvider
|
public void CreateSearchables(XDocument document); // XMLFileProvider
|
||||||
public Dictionary<string, SyntaxCheckModel>? Test(XMLParsingState? state, string gitcommit); // XMLFileProvider (optimal), Controller (right now)
|
public Dictionary<string, SyntaxCheckModel>? Test(XMLParsingState? state, string gitcommit); // XMLFileProvider (optimal), Controller (right now)
|
||||||
// Controller
|
// Controller
|
||||||
public List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? SearchCollection(string collection, string searchword, IReaderService reader, ILibrary? lib);
|
public List<(CollectedItem Item, List<(string Page, string Line, string Preview, string? Identifier)> Results)>? SearchCollection(string collection, string searchword, IReaderService reader, ILibrary? lib);
|
||||||
// Controller
|
// Controller
|
||||||
public List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? GetPreviews(List<(string, List<Marginal>)> places, IReaderService reader, ILibrary lib);
|
public List<(CollectedItem Item, List<(string Page, string Line, string Preview, string? Identifier)> Results)>? GetPreviews(List<(string, List<Marginal>)> places, IReaderService reader, ILibrary lib);
|
||||||
|
|
||||||
|
public CollectedItem? GetCollectedItem(string collection, string id);
|
||||||
}
|
}
|
||||||
@@ -166,10 +166,10 @@ public class XMLInteractionService : IXMLInteractionService {
|
|||||||
return opus;
|
return opus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? GetPreviews(List<(string, List<Marginal>)> places, IReaderService reader, ILibrary lib) {
|
public List<(CollectedItem Item, List<(string Page, string Line, string Preview, string? Identifier)> Results)>? GetPreviews(List<(string, List<Marginal>)> places, IReaderService reader, ILibrary lib) {
|
||||||
if (!_Collection.ContainsKey("letters")) return null;
|
if (_Collection == null || !_Collection.ContainsKey("letters")) return null;
|
||||||
var searchableObjects = _Collection["letters"].Items;
|
var searchableObjects = _Collection["letters"].Items;
|
||||||
var res = new ConcurrentBag<(string Index, List<(string Page, string Line, string preview, string identifier)> Results)>();
|
var res = new ConcurrentBag<(CollectedItem item, List<(string Page, string Line, string preview, string? identifier)> Results)>();
|
||||||
|
|
||||||
Parallel.ForEach(places, (obj) => {
|
Parallel.ForEach(places, (obj) => {
|
||||||
var text = searchableObjects[obj.Item1];
|
var text = searchableObjects[obj.Item1];
|
||||||
@@ -180,7 +180,7 @@ public class XMLInteractionService : IXMLInteractionService {
|
|||||||
rd.Read();
|
rd.Read();
|
||||||
|
|
||||||
res.Add((
|
res.Add((
|
||||||
obj.Item1,
|
text,
|
||||||
obj.Item2.Select(x => (
|
obj.Item2.Select(x => (
|
||||||
x.Page,
|
x.Page,
|
||||||
x.Line,
|
x.Line,
|
||||||
@@ -190,7 +190,7 @@ public class XMLInteractionService : IXMLInteractionService {
|
|||||||
.Select(y => y.Text)
|
.Select(y => y.Text)
|
||||||
.FirstOrDefault(string.Empty)
|
.FirstOrDefault(string.Empty)
|
||||||
: string.Empty,
|
: string.Empty,
|
||||||
String.Empty
|
(string?)null
|
||||||
) ).ToList()
|
) ).ToList()
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
@@ -198,10 +198,17 @@ public class XMLInteractionService : IXMLInteractionService {
|
|||||||
return res.ToList();
|
return res.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? SearchCollection(string collection, string searchword, IReaderService reader, ILibrary lib) {
|
public CollectedItem? GetCollectedItem(string collection, string id) {
|
||||||
if (!_Collection.ContainsKey(collection)) return null;
|
if (_Collection == null || !_Collection.ContainsKey(collection)) return null;
|
||||||
|
var objects = _Collection[collection].Items;
|
||||||
|
if (objects == null || !objects.ContainsKey(id)) return null;
|
||||||
|
return objects[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<(CollectedItem Item, List<(string Page, string Line, string Preview, string? Identifier)> Results)>? SearchCollection(string collection, string searchword, IReaderService reader, ILibrary? lib) {
|
||||||
|
if (_Collection == null || !_Collection.ContainsKey(collection)) return null;
|
||||||
var searchableObjects = _Collection[collection].Items;
|
var searchableObjects = _Collection[collection].Items;
|
||||||
var res = new ConcurrentBag<(string Index, List<(string Page, string Line, string preview, string identifier)> Results)>();
|
var res = new ConcurrentBag<(CollectedItem item, List<(string Page, string Line, string preview, string? identifier)> Results)>();
|
||||||
var sw = StringHelpers.NormalizeWhiteSpace(searchword.Trim());
|
var sw = StringHelpers.NormalizeWhiteSpace(searchword.Trim());
|
||||||
|
|
||||||
// Non Parallel:
|
// Non Parallel:
|
||||||
@@ -236,7 +243,7 @@ public class XMLInteractionService : IXMLInteractionService {
|
|||||||
rd.Read();
|
rd.Read();
|
||||||
if (state.Results != null)
|
if (state.Results != null)
|
||||||
res.Add((
|
res.Add((
|
||||||
obj.Value.Index,
|
obj.Value,
|
||||||
state.Results.Select(x => (
|
state.Results.Select(x => (
|
||||||
x.Page,
|
x.Page,
|
||||||
x.Line,
|
x.Line,
|
||||||
@@ -272,10 +279,7 @@ public class XMLInteractionService : IXMLInteractionService {
|
|||||||
var searchtext = coll.Value.Searchable ?
|
var searchtext = coll.Value.Searchable ?
|
||||||
StringHelpers.NormalizeWhiteSpace(e.ToString(), ' ', false) :
|
StringHelpers.NormalizeWhiteSpace(e.ToString(), ' ', false) :
|
||||||
null;
|
null;
|
||||||
var datafileds = coll.Value.GenerateDataFields != null ?
|
items[k] = new CollectedItem(k, e, coll.Value, searchtext);
|
||||||
coll.Value.GenerateDataFields(e) :
|
|
||||||
null;
|
|
||||||
items[k] = new CollectedItem(k, e, coll.Value, datafileds, searchtext);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (items.Any()) {
|
if (items.Any()) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
"BareRepositoryPathLinux": "/var/www/vhosts/development.hamann-ausgabe.de/httpdocs/Bare/",
|
"BareRepositoryPathLinux": "/var/www/vhosts/development.hamann-ausgabe.de/httpdocs/Bare/",
|
||||||
"BareRepositoryPathWindows": "C:/Users/simon/source/hamann-xml/.git/",
|
"BareRepositoryPathWindows": "C:/Users/simon/source/hamann-xml/.git/",
|
||||||
"WorkingTreePathLinux": "/var/www/vhosts/development.hamann-ausgabe.de/httpdocs/Repo/",
|
"WorkingTreePathLinux": "/var/www/vhosts/development.hamann-ausgabe.de/httpdocs/Repo/",
|
||||||
"WorkingTreePathWindows": "C:/Users/simon/source/hamann-xml/",
|
"WorkingTreePathWindows": "C:/Users/simon/source/hamann-xml/transformations_2023-9-14_test/",
|
||||||
"RepositoryBranch": "testdata",
|
"RepositoryBranch": "testdata",
|
||||||
"RepositoryURL": "https://github.com/Theodor-Springmann-Stiftung/hamann-xml",
|
"RepositoryURL": "https://github.com/Theodor-Springmann-Stiftung/hamann-xml",
|
||||||
"StoredPDFPathWindows": "",
|
"StoredPDFPathWindows": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user