mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 01:35:32 +00:00
Repaired Bugs in File-Upload. Basic Structure for loading File-Lists
This commit is contained in:
@@ -4,7 +4,8 @@ using HaWeb.XMLParser;
|
||||
|
||||
public class CommentRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
public string Type { get; } = "Register";
|
||||
public string Container { get; } = "kommcat";
|
||||
public string Prefix { get; } = "register";
|
||||
public string[] XPathContainer { get; } = { ".//data//kommentare/kommcat", ".//kommentare/kommcat" };
|
||||
|
||||
public Predicate<XElement> IsCollectedObject { get; } = (elem) => {
|
||||
if (elem.Name == "kommentar") return true;
|
||||
@@ -18,19 +19,27 @@ public class CommentRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
else return null;
|
||||
};
|
||||
|
||||
public List<(string, string)>? GenerateFields(XMLRootDocument document) {
|
||||
public List<(string, string?)>? GenerateFields(XMLRootDocument document) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public (string?, string) GenerateIdentificationString(XElement element) {
|
||||
public (string?, string?) GenerateIdentificationString(XElement element) {
|
||||
var kat = element.Attribute("value");
|
||||
if (kat != null && !String.IsNullOrWhiteSpace(kat.Value))
|
||||
return (null, kat.Value);
|
||||
return (null, Container);
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public XElement CreateHamannDocument(XElement element) {
|
||||
var opus = new XElement("opus");
|
||||
var kommentare = new XElement("kommentare");
|
||||
kommentare.AddFirst(element);
|
||||
opus.AddFirst(kommentare);
|
||||
return opus;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,8 @@ using HaWeb.XMLParser;
|
||||
|
||||
public class DescriptionsRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
public string Type { get; } = "Metadaten";
|
||||
public string Container { get; } = "descriptions";
|
||||
public string Prefix { get; } = "metadaten";
|
||||
public string[] XPathContainer { get; } = {".//data/descriptions", ".//descriptions" };
|
||||
|
||||
public Predicate<XElement> IsCollectedObject { get; } = (elem) => {
|
||||
if (elem.Name == "letterDesc") return true;
|
||||
@@ -18,16 +19,22 @@ public class DescriptionsRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
else return null;
|
||||
};
|
||||
|
||||
public List<(string, string)>? GenerateFields(XMLRootDocument document) {
|
||||
public List<(string, string?)>? GenerateFields(XMLRootDocument document) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public (string?, string) GenerateIdentificationString(XElement element) {
|
||||
return (null, Container);
|
||||
public (string?, string?) GenerateIdentificationString(XElement element) {
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public XElement CreateHamannDocument(XElement element) {
|
||||
var opus = new XElement("opus");
|
||||
opus.AddFirst(element);
|
||||
return opus;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,8 @@ using HaWeb.XMLParser;
|
||||
|
||||
public class DocumentRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
public string Type { get; } = "Brieftext";
|
||||
public string Container { get; } = "document";
|
||||
public string Prefix { get; } = "brieftext";
|
||||
public string[] XPathContainer { get; } = { ".//data/document", ".//document" };
|
||||
|
||||
public Predicate<XElement> IsCollectedObject { get; } = (elem) => {
|
||||
if (elem.Name == "letterText") return true;
|
||||
@@ -18,16 +19,22 @@ public class DocumentRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
else return null;
|
||||
};
|
||||
|
||||
public List<(string, string)>? GenerateFields(XMLRootDocument document) {
|
||||
public List<(string, string?)>? GenerateFields(XMLRootDocument document) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public (string?, string) GenerateIdentificationString(XElement element) {
|
||||
return (null, Container);
|
||||
public (string?, string?) GenerateIdentificationString(XElement element) {
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public XElement CreateHamannDocument(XElement element) {
|
||||
var opus = new XElement("opus");
|
||||
opus.AddFirst(element);
|
||||
return opus;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,8 @@ using HaWeb.XMLParser;
|
||||
|
||||
public class EditsRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
public string Type { get; } = "Texteingriffe";
|
||||
public string Container { get; } = "edits";
|
||||
public string Prefix { get; } = "texteingriffe";
|
||||
public string[] XPathContainer { get; } = { ".//data/edits", ".//edits" };
|
||||
|
||||
public Predicate<XElement> IsCollectedObject { get; } = (elem) => {
|
||||
if (elem.Name == "editreason") return true;
|
||||
@@ -18,16 +19,22 @@ public class EditsRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
else return null;
|
||||
};
|
||||
|
||||
public List<(string, string)>? GenerateFields(XMLRootDocument document) {
|
||||
public List<(string, string?)>? GenerateFields(XMLRootDocument document) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public (string?, string) GenerateIdentificationString(XElement element) {
|
||||
return (null, Container);
|
||||
public (string?, string?) GenerateIdentificationString(XElement element) {
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public XElement CreateHamannDocument(XElement element) {
|
||||
var opus = new XElement("opus");
|
||||
opus.AddFirst(element);
|
||||
return opus;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,8 @@ using HaWeb.XMLParser;
|
||||
|
||||
public class MarginalsRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
public string Type { get; } = "Stellenkommentar";
|
||||
public string Container { get; } = "marginalien";
|
||||
public string Prefix { get; } = "stellenkommentar";
|
||||
public string[] XPathContainer { get; } = { ".//data/marginalien", ".//marginalien" };
|
||||
|
||||
public Predicate<XElement> IsCollectedObject { get; } = (elem) => {
|
||||
if (elem.Name == "marginal") return true;
|
||||
@@ -18,16 +19,22 @@ public class MarginalsRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
else return null;
|
||||
};
|
||||
|
||||
public List<(string, string)>? GenerateFields(XMLRootDocument document) {
|
||||
public List<(string, string?)>? GenerateFields(XMLRootDocument document) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public (string?, string) GenerateIdentificationString(XElement element) {
|
||||
return (null, Container);
|
||||
public (string?, string?) GenerateIdentificationString(XElement element) {
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public XElement CreateHamannDocument(XElement element) {
|
||||
var opus = new XElement("opus");
|
||||
opus.AddFirst(element);
|
||||
return opus;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,8 @@ using HaWeb.XMLParser;
|
||||
|
||||
public class ReferencesRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
public string Type { get; } = "Personen / Orte";
|
||||
public string Container { get; } = "definitions";
|
||||
public string Prefix { get; } = "personenorte";
|
||||
public string[] XPathContainer { get; } = { ".//data/definitions", ".//definitions" };
|
||||
|
||||
public Predicate<XElement> IsCollectedObject { get; } = (elem) => {
|
||||
if (elem.Name == "personDefs" || elem.Name == "structureDefs" || elem.Name == "handDefs" || elem.Name == "locationDefs")
|
||||
@@ -16,16 +17,22 @@ public class ReferencesRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
return elem.Name.ToString();
|
||||
};
|
||||
|
||||
public List<(string, string)>? GenerateFields(XMLRootDocument document) {
|
||||
public List<(string, string?)>? GenerateFields(XMLRootDocument document) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public (string?, string) GenerateIdentificationString(XElement element) {
|
||||
return (null, Container);
|
||||
public (string?, string?) GenerateIdentificationString(XElement element) {
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public XElement CreateHamannDocument(XElement element) {
|
||||
var opus = new XElement("opus");
|
||||
opus.AddFirst(element);
|
||||
return opus;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,8 @@ using HaWeb.XMLParser;
|
||||
|
||||
public class TraditionsRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
public string Type { get; } = "Überlieferung";
|
||||
public string Container { get; } = "traditions";
|
||||
public string Prefix { get; } = "ueberlieferung";
|
||||
public string[] XPathContainer { get; } = { ".//data/traditions", ".//traditions" };
|
||||
|
||||
public Predicate<XElement> IsCollectedObject { get; } = (elem) => {
|
||||
if (elem.Name == "letterTradition") return true;
|
||||
@@ -18,16 +19,22 @@ public class TraditionsRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
else return null;
|
||||
};
|
||||
|
||||
public List<(string, string)>? GenerateFields(XMLRootDocument document) {
|
||||
public List<(string, string?)>? GenerateFields(XMLRootDocument document) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public (string?, string) GenerateIdentificationString(XElement element) {
|
||||
return (null, Container);
|
||||
public (string?, string?) GenerateIdentificationString(XElement element) {
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public XElement CreateHamannDocument(XElement element) {
|
||||
var opus = new XElement("opus");
|
||||
opus.AddFirst(element);
|
||||
return opus;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user