New objects are not always new

Sometimes, the broker needs to report the existence of objects which are not new: when asked to do so by display, or when asked to load a file which already has been loaded.

A simple way to do this is to add a new attribute to the newobj message:

newobj = element newobj {
            proverid_attr,
            srcid_attr, 
            objid_attr, 
            exprev_attr?,
            attribute objposition { objid } ?,
            objtype_attr ?,
            attribute objparent { objid }?,
            attribute objstate { objstate },
            (properscriptcmd | unparseable) }

exprev_attr = attribute existedpreviously { xsd:boolean}
where existedpreviously = "true" means that this is a repeated announcement (default is this is a new object).

Cleaner, but not backwards compatible would be to rename newobj to obj and add an attribute new {xsd:boolean} (not optional!) to reflect this behaviour.

Suggestion here is to first add the attribute, then think about the other change.

Neither are source files

Very much the same discussion applies to source files. The relevant messages here are

newfile       = element newfile  { proverid_attr, srcid_attr, url_attr }
filestatus    = element filestatus  { proverid_attr, srcid_attr, newstatus_attr, 
                  datetime_attr} 
newstatus_attr = attribute newstatus { "saved" | "changed" | "discarded" }

Again, a backwards compatible first fix would be to include the exprev_attr, but in the longer run, we might perhaps just want a file message with a non-optional new attribute as above. Or we can even add a newstatus_attr "new", and unify all in filestatus. (Seems to leave a bit too much guesswork for displays?)

-- ChristophLueth - 28 Sep 2006

Edit | Attach | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 28 Sep 2006 - 22:58:54 - ChristophLueth
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies