Added support for AppDefs; Updated currend XML

This commit is contained in:
Simon Martens
2022-11-25 20:05:29 +01:00
parent 02abfb111a
commit ccfcadb91b
22 changed files with 526633 additions and 79611 deletions

View File

@@ -48,6 +48,24 @@ public class LocationCollection : HaWeb.XMLParser.IXMLCollection {
public HaWeb.XMLParser.IXMLCollection[]? SubCollections { get; } = null;
public bool Searchable { get; } = false;
public static Func<XElement, string?> 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<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; } = false;
public static Func<XElement, string?> GetKey { get; } = (elem) => {
var index = elem.Attribute("index");
if (index != null && !String.IsNullOrWhiteSpace(index.Value))