namespace HaWeb.Settings.XMLCollections; using HaWeb.Models; using System.Xml.Linq; public class HandPersonCollection : HaWeb.XMLParser.IXMLCollection { public string Key { get; } = "handpersons"; public string[] xPath { get; } = new string[] { "/opus/data/definitions/handDefs/handDef", "/opus/definitions/handDefs/handDef" }; public Func GenerateKey { get; } = GetKey; public Func?>? GenerateDataFields { get; } = null; public Func, IDictionary>?>? GroupingsGeneration { get; } = null; public Func, IDictionary>?>? SortingsGeneration { get; } = null; public HaWeb.XMLParser.IXMLCollection[]? SubCollections { get; } = null; public bool Searchable { get; } = false; public static Func GetKey { get; } = (elem) => { var index = elem.Attribute("index"); if (index != null && !String.IsNullOrWhiteSpace(index.Value)) return index.Value; return null; }; } public class PersonCollection : HaWeb.XMLParser.IXMLCollection { public string Key { get; } = "persons"; public string[] xPath { get; } = new string[] { "/opus/data/definitions/personDefs/personDef", "/opus/definitions/personDefs/personDef" }; public Func GenerateKey { get; } = GetKey; public Func?>? GenerateDataFields { get; } = null; public Func, IDictionary>?>? GroupingsGeneration { get; } = null; public Func, IDictionary>?>? SortingsGeneration { get; } = null; public HaWeb.XMLParser.IXMLCollection[]? SubCollections { get; } = null; public bool Searchable { get; } = false; public static Func GetKey { get; } = (elem) => { var index = elem.Attribute("index"); if (index != null && !String.IsNullOrWhiteSpace(index.Value)) return index.Value; return null; }; } public class LocationCollection : HaWeb.XMLParser.IXMLCollection { public string Key { get; } = "locations"; public string[] xPath { get; } = new string[] { "/opus/data/definitions/locationDefs/locationDef", "/opus/definitions/locationDefs/locationDef" }; public Func GenerateKey { get; } = GetKey; public Func?>? GenerateDataFields { get; } = null; public Func, IDictionary>?>? GroupingsGeneration { get; } = null; public Func, IDictionary>?>? SortingsGeneration { get; } = null; public HaWeb.XMLParser.IXMLCollection[]? SubCollections { get; } = null; public bool Searchable { get; } = false; public static Func GetKey { get; } = (elem) => { var index = elem.Attribute("index"); if (index != null && !String.IsNullOrWhiteSpace(index.Value)) return index.Value; return null; }; } public class AppCollection : HaWeb.XMLParser.IXMLCollection { public string Key { get; } = "apps"; public string[] xPath { get; } = new string[] { "/opus/data/definitions/appDefs/appDef", "/opus/definitions/appDefs/appDef" }; public Func GenerateKey { get; } = GetKey; public Func?>? GenerateDataFields { get; } = null; public Func, IDictionary>?>? GroupingsGeneration { get; } = null; public Func, IDictionary>?>? SortingsGeneration { get; } = null; public HaWeb.XMLParser.IXMLCollection[]? SubCollections { get; } = null; public bool Searchable { get; } = false; public static Func GetKey { get; } = (elem) => { var index = elem.Attribute("index"); if (index != null && !String.IsNullOrWhiteSpace(index.Value)) return index.Value; return null; }; }