blob: 468a72beeef490cec673c311840cc1086fd55108 [file] [log] [blame]
<p>
<a href="http://wiki.eclipse.org/Temporality">Temporality</a> is a feature providing
automatic versioning of model instances. The basic idea is to provide a Temporal
mix-in base class that can be pulled into existing models. By simply
extending the Temporal mix-in base class existing modeled types are
supplied with temporal features. i.e.: they will keep track of changes
made to the value of their attributes and references.
</p>
<p>
The temporality feature consist of a temporal.ecore model containing the Temporal EClass.
This model can be loaded using the Load Resource menu to add
temporality to existing model.
</p>
<p>
Here's a simple model of a Fleet and Car given the ability to keep track of versions of their instances by extending the Temporal base class.
</p>
<div align="center">
<img src="/modeling/emft/temporality/images/fleet-model.png"/>
<p align="center"><em>Fleet and Car extend the Temporal EClass</em></p>
</div>
<p>
Here's a snapshot of a generated instance editor for this Fleet model. Both the Fleet and Car can be added to the resource. In this snapshot we see one fleet and two cars at the root of the resource.
</p>
<div align="center">
<a href="/modeling/emft/temporality/images/normal-mode-16h.png">
<img width=400 src="/modeling/emft/temporality/images/normal-mode-16h.png"/>
<p align="center"><em>The Fleet instance editor as it looked on January third 16:00</em></p>
</a>
</div>
<p>
Because the Fleet and Car EClass are mix-in with the Temporal base class they keep track of
their history. So for example if we want to take a look at these instances as they were
two hours ago we simply use the context menu you to change the current date to 14:00 hours. The viewer now displays
the new current date at the top of the view. Note: If we want to see the instances "live" we simply input "now" in the dialog box for entering the current date/time.
</p>
<div align="center">
<a href="/modeling/emft/temporality/images/normal-mode-14h.png">
<img width=400 src="/modeling/emft/temporality/images/normal-mode-14h.png"/>
<p align="center"><em>The Fleet instance editor as it looked on January third 14:00</em></p>
</a>
</div>
<p>
When the current date is
changed the view displays the state of the objects at the given time.
For example at 16:00h the fleet had no vehicles in its vehicles list but it did at
14:00h.
</p>
<p>
With the context menu you can also change the viewing mode. In advanced mode the viewer displays the underlying plumbing that
makes versioning possible. The
VersionHolder has a list of all the past and future versions. Each
temporal object has one VersionHoder with one continuity and several
versions. There's a many-to-one relationship between Temporal and VersionHolder. In advanced mode
you can see the "active version" marker indicating which version is activated based on the current date/time.
</p>
<div align="center">
<a href="/modeling/emft/temporality/images/advanced-mode-14h.png">
<img width=400 src="/modeling/emft/temporality/images/advanced-mode-14h.png"/>
<p align="center"><em>The Fleet instance editor in advanced mode</em></p>
</a>
</div>
<ul>
<li style="border-style: none;"><h2>Documentation</h2>
<p>
More information is available on the <a href="http://wiki.eclipse.org/Temporality">wiki page for Temporality</a>.
</p>
<p>
<a href="http://martinfowler.com/ap2/timeNarrative.html">Martin FowlerÂ’s Patterns</a> for things that change with time article for a discussion about these patterns.
</p>
<p>
<a href="http://wiki.eclipse.org/images/a/ad/Delegatingestore.pdf">Delegating EStore Design Document</a>
</p>
<p>
<a href="http://wiki.eclipse.org/images/6/62/EMF-Temporality.pdf">Temporality Design Document</a>
</p>
</li>
<li style="border-style: none;">
<h2>Contributors</h2>
<p>
Lead : <a href="mailto:jccote@gmail.com">Jean-Claude Cote</a>
</p>
</li>
</ul>