Skip to end of metadata
Go to start of metadata

Initial Thoughts

Annotations are stored in an AnnotationChain as AnnotationAssertions.  These are then added to a dataflow. 

Usage - (I think) An AnnotationAssertion implementation would implement the AnnotationAssertion typed on an AnnotationBeanSPI type

eg. public class TextAnnotationAssertionImpl implements AnnotationAssertion<FreeTextDescription>

These assertions have a CurationEventType which says whether they are Repudiations etc.  All Assertions have a Role, CreationDate, Creators and a source.  They also have the bean which contains the Assertion itself.

 So, I think it works something like this:


You can also check that an annotation applies to the object it is being added to like this:









And you can find out about annotations like this:









 Now, it doesn't quite work because I think we need some more Edit style code to handle adding things inside annotations (the dataflow is OK as long as you extend AbstractAnnotatedThing<Dataflow>)

You should be able to do something like this:

 
to get the annotations eg. the TextAnnotationAssertionImpl and find out what they have inside them like creator.  However, I am not sure what the procedure to set these things is, maybe they should have setters and getters but probably not since everything seems to be through the Edits system.  Might need some more Edits stuff.

You can also get the Annotation detail like this (probably using some SPI lookup to cast the class correctly?!):

Have now added the AnnotationRole to the TextAnnotationAssertionImpl which you pass in upon creation like this:

 As you can see it also assigns a date which is fixed to the time the assertion is made.

It can also have creators, in the case of Curateable thingsa List<Person>. Again changed the code to pass this in at create time.  The Curateable also has

 So there will have to be some implementations of this, just like the AnnotationBeanSPI where the FreeTextDescription comes from.

The Curateable also has

 which the code states are "a list of curation events which are used to determine whether the implementing object is valid given a particular interpretive context. If this list is empty the event is unchallenged.".  This seems to imply that you can add these things.  Do you just add it to the list or do we need some sort of Edits version?  It also implies that we need implementations of CurationEvent and CurationEventBeanSPI eg.  The API seems to suggest that once an assertion is added it cannot be removed, even if it is wrong so in that case we probably don't need any Edit style undo.

 and

 or something similar

Storing Annotations 

TBD.  At the moment the annotations are added to an annotationchain and added to a dataflow.  They exist as part of the dataflow, there is no persistence of them outside of this.  Needs agreement on what the persistence mechanism should be. 

Labels
  • None