mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-12-16 14:35:32 +00:00
added basic start page setup; began rewrite of parser
This commit is contained in:
@@ -1,36 +1,39 @@
|
||||
namespace HaDocument.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace HaDocument.Models {
|
||||
public class Comment{
|
||||
public string Entry { get; } = "";
|
||||
public string Index { get; } = "";
|
||||
public string Type { get; } = "";
|
||||
public string Lemma { get; } = "";
|
||||
public string Parent { get; } = "";
|
||||
public int Order { get; } = -1;
|
||||
public ImmutableSortedDictionary<string, Comment> Kommentare { get; }
|
||||
public class Comment {
|
||||
public XElement Entry { get; }
|
||||
public string Value { get; }
|
||||
public string Index { get; }
|
||||
public string? Type { get; }
|
||||
public string? Lemma { get; }
|
||||
public string? Parent { get; }
|
||||
public int? Order { get; }
|
||||
public ImmutableSortedDictionary<string, Comment>? SubComments { get; }
|
||||
|
||||
public Comment(
|
||||
string entry,
|
||||
string index,
|
||||
string type,
|
||||
string lemma,
|
||||
int order,
|
||||
SortedDictionary<string, Comment> subComments,
|
||||
string parent=""
|
||||
) {
|
||||
Entry = entry;
|
||||
Index = index;
|
||||
Type = type;
|
||||
Lemma = lemma;
|
||||
Order = order;
|
||||
Parent = parent;
|
||||
if (subComments != null)
|
||||
Kommentare = ImmutableSortedDictionary.ToImmutableSortedDictionary(subComments);
|
||||
else
|
||||
Kommentare = null;
|
||||
}
|
||||
public Comment(
|
||||
XElement entry,
|
||||
string value,
|
||||
string index,
|
||||
string? type,
|
||||
string? lemma,
|
||||
int? order,
|
||||
SortedDictionary<string, Comment>? subComments,
|
||||
string? parent
|
||||
) {
|
||||
Value = value;
|
||||
Entry = entry;
|
||||
Index = index;
|
||||
Type = type;
|
||||
Lemma = lemma;
|
||||
Order = order;
|
||||
Parent = parent;
|
||||
if (subComments != null)
|
||||
SubComments = ImmutableSortedDictionary.ToImmutableSortedDictionary(subComments);
|
||||
else
|
||||
SubComments = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user