From: Marin D. <mar...@on...> - 2005-08-22 20:06:01
|
----- Original Message ----- From: "Brian Hardy" <bm...@ya...> > > Is there a way to know the date associated with when > an annotation was created for a document? > no, but you can add the annotation timestamp as a feature for the annotation (and then your application will be able to retrieve it) if the annotations are created by you (e.g. by a transducer working over a set of JAPE rules that you have control over) then you can modify the RHS of the Jape rules to also add the timestamp when creating a new annotation alternatively (and better), you can extend AnntoationSet so that its add() methods (several of them) just call the super method and then add a feature with the current timestamp to the new annotation of course you'll have to extend Document as well, so that it works with your customised annotation set instead of the default annotation set if you inspect the code for DatabaseDocumentImpl and DatabaseAnnotationSetImpl you'll see something similar. The DB annotation sets extends the default sets so that a list of the modifications (additions, deletions, updates) that are applied to the annotation set is kept, so that the changes can be synchronised with the database later. In your case the customised annotation set is much simpler but the approach is similar hth, Marin ---- "...what you brought from your past, is of no use in your present. When you must choose a new path, do not bring old experiences with you. Those who strike out afresh, but who attempt to retain a little of the old life, end up torn apart by their own memories. " |