[ This is a discussion being transfered from plucker-team. We're discussing how annotations should be stored. The consensus is that they're being moved out of metadata, and into a separate db. The question is to finalize the format of the annotations db record, and to decide how to harmonize annotations and bookmarks, which really seem the same sort of thing. ]
On Sat, 19 Jun 2004, Michael Nordstrom wrote: > On Thu, Jun 17, 2004, Alexander R. Pruss wrote: > > How's this for each record in the Anno-Filename db? > > > > typedef struct { > > UInt16 uid; > > UInt16 headerLength; /* sizeof( AnnotationEntry ) */ > > UInt16 index; > > UInt16 paragraphNum; > > UInt16 triggerStart; /* relative to paragraph start */ > > UInt16 triggerStop; /* relative to paragraph start */ > > UInt16 dataOffset; /* offset of data from beginning of this record */ > > UInt16 dataLength; > > } AnnotationEntry; > > The dataLength might not be necessary since you can get the size of > the record and subtract the size of the "header". What is the > headerLength used for? headerLength is used so we can extend this later to include other data, such as RGB value of highlight, and anything else one might fancy. dataLength is also nice for the same reason. For all we know, there might be reason to store other stuff in the same record eventually, and it might go after the data. I can't think what right now. But I think it's important to make formats that easily upgrade. > > Question 1: While doing this, wouldn't the right thing to do be to kill off > > the bookmark data record in the metadata > > Sounds like a good idea. Still, we could use two different types of > records, one for annotations and another one for bookmarks. > > > We might lose one thing. Currently bookmarks specify not just the byte > > offset, but also a yoffset. > > Could be solved by having different records, i.e. the extra data for > a bookmark would only be included in the bookmark records (we wouldn't > need both a start and stop data for a bookmark, so in the end we will > probably save space). I am still not sure we really need the distinction between bookmarks and annotations. From a user point of view, the only difference is that an annotation highlights a bit of text, though the user may use the two for different purposes (but maybe not). It'd do little harm to add a UInt32 yoffset to the annotation entries, and then keep the format the same. Then we can think of an annotation as a bookmark to a block of text, while a bookmark is a bookmark of a location in the text. In fact, even before the annotation support was rolled in, one could have used the bookmarks for storing notes, except that while reading one wouldn't have visual aids for telling one to look in the notes. Bookmarks don't need the two bytes of triggerStop. Annotations don't need the four bytes of yoffset. Everything else appears useful for both. I wouldn't worry about the 6 bytes per entry very much myself. It's a small percentage of the total (overhead for storing a record, the bookmark/anno text, etc.) The advantages of saving code space (though admittedly only when both annotation and bookmark support is coded in) and making the code simpler seem more important. If we keep a single format, and then just filter things at the user level for display, the code should be pretty easy to maintain. This leads to a question: Do we still keep the add annotation form and the add bookmark forms separate? The visual difference is that the add bookmark form is a small popup, while the add annotation is a "serious" full screen form. If we merged them, we would save code space. But we would need to merge them into a full screen form. And that might be annoying to users? Would it be? > > b. Allow a toggle in the bookmark form for showing all annotations, all > > bookmarks, both. While we're adding such filters, we can also add the > > options: all annotations in this page, all bookmarks in this page, both. > > The pop-up bookmark list can then follow the same settings, but without the > > possibility of toggling. This makes the form pretty complex. > > I think bookmarks and annotations should be displayed separately (even > if they are stored in the same database). Some kind of filters would > be useful, though (categories included). Would it be OK to have filtering that would allow both bookmarks and annotations to be displayed together? Alex -- Dr. Alexander R. Pruss || e-mail: [EMAIL PROTECTED] Philosophy Department || online papers and home page: Georgetown University || www.georgetown.edu/faculty/ap85 Washington, DC 20057 || U.S.A. || ----------------------------------------------------------------------------- "Philosophiam discimus non ut tantum sciamus, sed ut boni efficiamur." - Paul of Worczyn (1424) _______________________________________________ plucker-dev mailing list [EMAIL PROTECTED] http://lists.rubberchicken.org/mailman/listinfo/plucker-dev