Wiki Model: The architecture

WikiModel

Documents and sections

Default block formatting

Default inline formatting

Event and Object Models (WEM & WOM)

This framework contains two datamodels (APIs) for managing wiki page structures:

  1. Wiki Document Event Model (Wiki-WEM) – event-based API
  2. Wiki Document Object Model (Wiki-WOM) – object tree API
Model Description Analogies from XML Usage
Wiki Document Event Model (WEM) The begin and the end of each structural element on the page are notified by callbacs to user’s handler. Simple API for XML» (SAX) Very handy for parsing (parsers “emits” events for each structural element), serialization of pages in different formats, transformations from one format into another
Wiki Document Object Model (WOM) The entire structure of a wiki page is represented as a tree of objects. Each object in this tree corresponds to a structural element in the page. Document Object Model» (XML-DOM) In editors it is much more handy to manipulate with objects. It gives the possibility to perform “refactoring”.
! More deep comparision of tree-based and event-based APIs for XML can be found here – http://sax.sourceforge.net/event.html».

It is easy to transform an in-memory tree of objects into a sequence of callback calls and vice versa.

Wiki Object Model (WOM)

Document Each document contains at least one section.
Sections Each seciton contains at least one block element (paragraph, header, table, list…)
Blocks Each block element can contain styles or embedded documents.
Styles Documents
A style contains at least one inline element.
An embedded document has exactly the same structural elements as the top-level one.
Inline elements Inline element is an atomic entity in the structure. Examples of inline elements: text, line breaks, end of lines, references…

WOM Class Diagram

architecture.png

! This diagram contains classes instead of interfaces to show logical dependences and aggregations
Here you can download this model in ArgoUML» format
Page content
See also


Cognium Systems SA © 2005
Eclipse Public License (EPL)
Powered by WikiModel :-)