tsbonev / nharker

NHaker - an offline writing organization tool
0 stars 0 forks source link

nharker-domain: refactor the domain dependency chain #139

Closed tsbonev closed 6 years ago

tsbonev commented 6 years ago

See #134 to understand the problem.

Refactor the domain structure as follows:

An Entry knows of its text, explicit links and of it's parent article's id. A Catalogue knows of its parent Catalogue (if any) and of it's children Catalogues (if any).

An Article knows of the ids of its entries and can thus build itself into a text document with hyperlinks. Querying by Article title and name returns a subset of Articles. Querying by Entry text returns a subset of Entries which in turn return an exact Article. Querying by Catalogue returns a subset of Articles whose catalogue list contains the specified Catalogue.

tsbonev commented 6 years ago

This has been implemented over the course of the last dozen-or-so PRs.