Difference between revisions of "LogbookTodo"

From AardRock Wiki
Jump to navigation Jump to search
(moved adding rows to Done section)
(→‎Todo: added item about slowness)
Line 1: Line 1:
== Todo ==
== Todo ==
* Rows moeten verwijderd kunnen worden
* Rows moeten verwijderd kunnen worden
* Logbook's listener slows down Cheetah's shutting down


== Done ==
== Done ==

Revision as of 11:24, 23 June 2006

Todo

  • Rows moeten verwijderd kunnen worden
  • Logbook's listener slows down Cheetah's shutting down

Done

  • Toevoegen van nieuwe items in het Home scherm werkt niet meer.
    • Done: Martijn/Chris
  • Ook cellen waarvoor de waarde null was moeten editable worden.
    • Verander setValueAt en isCellEditable.
    • Done: Martijn/Chris
  • Er moet een listener komen op het RDF model. Het LogbookModel vertaalt de RDF events naar table even1ts en vuurt deze (LogbookModel.fireXxx()).
    • Done: Chris
  • De RDF objecten moeten URIs krijgen.
    • Done: Chris
  • De cellen moeten editable worden (implementeer LogbookModel.setValueAt()); de veranderingen worden naar RDF gedelegeerd.
    • Done: Chris
  • Comments lijken niet te werken. In plaats van comments worden de bloedglucosewaarden getoond.
    • De comments worden wel getoond, alleen bij het opslaan werd de bloedglucosewaarde opgeslagen ipv de comment
    • Done: Chris
  • Als er nieuwe rows toegevoegd worden via b.v. het Home-scherm moet dit ook worden doorgegeven.
    • Done: Martijn

Plan

  • Objecten moeten een URI krijgen
    • Vorm: cheetah://email/classname/creation_timestamp
    • E.g.: cheetah://chris@example.com/insulinEntry/4589778925
  • Een invoer van meerdere entries moet dezelfde timestamp krijgen
  • We moeten een snelle cache in ons TableModel bouwen
  • De cache moet wijzigingen doorgeven aan het RDFModel
  • De cache moet luisteren naar wijzigingen op het RDFModel
    • De cache moet op een snelle manier deze wijzingen doorvoeren (mappen van URI naar rownumber)
    • Waarschijnlijk een Hash bijhouden met URI's als keys en rownumbers als values
  • De rows moet een aggregatie zijn van alle entries met dezelfde timestamp
  • Iedere 5 minuten RDF-db opslaan

Ideas

Propagating changes

When the JTable is changed, the setValueAt of the TableModel is called. The TableModel passes translates this to a setProperty of the RDFModel. When the RDFModel is changed, an event is fired an the TableModel and all other listeners will receive this event. The TableModel will update itself (within a recent amount of time), and will send a table-event to the GUI.


User Interface

Rows in a table are in alternating colors. The current active row is highlighted (with a blue background-color for example).

Handling events

When a statement is added:

  • If the subject is the logbook entries list, a logbook entry was added. Update cache and fire event.
  • Else if the subject is a logbook entry, one of the entry's properties was set.
    • If the entry is in the timestampToRow map, the entry is in the account's logbook entries list. Locate the row and column, update cache and fire event.
    • Else the entry is not in the logbook entries list. No action needed.

When a statement is removed:

  • If the subject is the logbook entries list, a logbook entry was removed. Update cache and fire event.
  • Else if the subject is a logbook entry, one of the entry's properties was removed.
    • If the entry is in the timestampToRow map, the entry is in the account's logbook entries list. Locate the row and column, update cache and fire event.
    • Else the entry is not in the logbook entries list. No action needed.