This package contains the classes and interfaces for representing the contents of a mathematical document.
Central to the package is the WmiModel interface. Any class that implements this interface
can be integrated into the mathdoc framework. The structure of the model is refined in the
WmiComposite interface. Model-based classes that contain subcomponents should implement
this interface.
Strict thread safety is enforced through the WmiLock class. Three types of locks are
supported: read, write, and update. The locking mechanism extends the typical
read/write lock in such a way that it allows the GUI to remain responsive even during a slow write process
(e.g. during file load).
Each component in the model can have attributes. The API for attributes is defined in the
WmiAttributeSet interface. The interface does not define how the attributes are represented
internally. Thus, classes that implement this interface are free to use HashMaps, arrays, or any other
data structure to represents the set. Caching may be beneficial for frequently used attribute sets. If
implementing a cache, care must be taken to ensure that expensive resources can be properly garbage collected,
and that shared sets are updated safely to avoid unwanted side-effects.