added basic start page setup; began rewrite of parser

This commit is contained in:
schnulller
2022-06-14 00:31:52 +02:00
parent 6be85d495b
commit 9e53de8be3
61 changed files with 532745 additions and 661 deletions

View File

@@ -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;
}
}
}