A lot of stuff related to parsing; index page input validation

This commit is contained in:
Simon Martens
2023-09-17 15:29:51 +02:00
parent d86d508786
commit b15ce8793c
23 changed files with 294 additions and 60 deletions

View File

@@ -0,0 +1,23 @@
using System.Xml.Linq;
using HaWeb.Models;
public class HandCollection : HaWeb.XMLParser.IXMLCollection {
public string Key { get; } = "hands";
public string[] xPath { get; } = new string[] {
"/opus/data/document/letterText//hand",
"/opus/document/letterText//hand",
"/opus/data/traditions/letterTradition//hand",
"/opus/traditions/letterTradition//hand"
};
public Func<XElement, string?> GenerateKey { get; } = GetKey;
public Func<XElement, IDictionary<string, string>?>? GenerateDataFields { get; } = null;
public Func<IEnumerable<CollectedItem>, IDictionary<string, ILookup<string, CollectedItem>>?>? GroupingsGeneration { get; } = null;
public Func<IEnumerable<CollectedItem>, IDictionary<string, IEnumerable<CollectedItem>>?>? SortingsGeneration { get; } = null;
public HaWeb.XMLParser.IXMLCollection[]? SubCollections { get; } = null;
public bool Searchable { get; } = true;
public static Func<XElement, string?> GetKey { get; } = (elem) => {
// TODO IMPLEMENT
return null;
};
}