A brief overview of elements such as article, book, hub.
PillarHub is a web application, that is designed for creating, editing and viewing documents, that's are written on Pillar language.
PillarHub allows to work with 2 type of documents - articles and books. Article is an entity, that contains text, written on Pillar language and meta information, such as author, date of publication e.t.c. Book is an entity, that looks like a folder with predetermined structure, contains of some oredered states. Book can be compiled and viewed as a one object (and download it after like a single pdf document).
All documents are connected with its own hub. Hub is like a repository for documents. There are 2 types of hub - personal (that belong to 1 user) and shared, that belongs to many users. All hub's are placed in root folder, due to the fact, that system can have only one root folder, root folder implemented with using Singleton pattern.
Elements in pillarhub are like file-system. It means, that there are leaf and composite elements. Every element has path, that contains of parent-objects. Every child-object determined with its identificator - name, that is unique in this parent-object. For example, article with name "article1", that is placed in alexeyfateev hub, will have path "alexeyfateev/article1".
We need to react the same way with leaf and composite objects. Also we need to visualize composite objects like a tree. Both problems are solved by using Composite pattern.
Below is the data model class diagram: