// using System.Collections.Generic; // using HaDocument.Interfaces; // namespace HaDocument.Models // { // public class IntermediateLibrary // { // public Dictionary Traditions; // public Dictionary Persons; // public Dictionary Metas; // public Dictionary Marginals; // public Dictionary Locations; // public Dictionary Letters; // public Dictionary HandPersons; // public Dictionary Editreasons; // public Dictionary Comments; // public Dictionary> Backlinks; // public Dictionary> Hands; // // Helper Library for precalculationg the Structure of the Document: // public Dictionary>> LetterPageLines; // public Library GetLibrary(IHaDocumentOptions options) // { // var Structure = new Dictionary>>(); // foreach (var letter in LetterPageLines) // { // if (Metas.ContainsKey(letter.Key) && // Metas[letter.Key].ZH != null) // { // if (!Structure.ContainsKey(Metas[letter.Key].ZH.Volume)) // { // Structure.Add(Metas[letter.Key].ZH.Volume, new Dictionary>()); // } // foreach (var page in letter.Value) // { // if (!Structure[Metas[letter.Key].ZH.Volume].ContainsKey(page.Key)) // { // Structure[Metas[letter.Key].ZH.Volume].Add(page.Key, new Dictionary()); // } // foreach (var line in page.Value) // { // if (!Structure[Metas[letter.Key].ZH.Volume][page.Key].ContainsKey(line)) // { // Structure[Metas[letter.Key].ZH.Volume][page.Key].Add(line, letter.Key); // } // } // } // } // } // return new Library( // Traditions, // Persons, // Metas, // Marginals, // Locations, // Letters, // HandPersons, // Editreasons, // Comments, // Backlinks, // Hands, // Structure, // options // ); // } // } // }