namespace HaWeb.XMLParser; using HaWeb.Models; using System.Xml.Linq; public interface IXMLCollection { // Collections of Elements to be created a Hamann File Root // Key: the key under which the element(s) will be filed // xPath: (absolute, realtive if subelement) XPaths to the element(s) // GenerateKey: How to extract an identifier for the single element in the collection // GenerateDataFields: Generate a dict of data associated with each of the collected Elements input: XElement output: Dictonary // GroupingsGeneration: datafields by which dictorary-like groups should be held in memory input: List output: Dictonary> // SortingsGeneration: datafields by which a sorting should be held in memory input: List output: ordered List // SubCollections to be created in this element // Searchable: Will the element be indexed for full-text-search? abstract string Key { get; } abstract string[] xPath { get; } abstract Func GenerateKey { get; } abstract Func?>? GenerateDataFields { get; } abstract Func, IDictionary>?>? GroupingsGeneration { get; } abstract Func, IDictionary>?>? SortingsGeneration { get; } // TODO Not implemented yet abstract IXMLCollection[]? SubCollections { get; } abstract bool Searchable { get; } // Override with false if collection should not be read in and available globally (useful for SubCollections) bool IsGlobal() => true; }