#NEWLINE# def annotation_from_data( es_ann ) : #NEWLINE# #INDENT# if ( es_ann . id == '_query' ) : #NEWLINE# #INDENT# raise Skip ( 'not an annotation (id=_query)' ) #NEWLINE# #UNINDENT# ann = Annotation . query . get ( es_ann . id ) #NEWLINE# if ( ann is None ) : #NEWLINE# #INDENT# ann = Annotation ( id = es_ann . id ) #NEWLINE# #UNINDENT# if ( es_ann . target_uri is None ) : #NEWLINE# #INDENT# raise Skip ( 'annotation is missing a target source and uri' ) #NEWLINE# #UNINDENT# ann . created = es_ann . created #NEWLINE# ann . updated = es_ann . updated #NEWLINE# ann . userid = es_ann . userid #NEWLINE# ann . groupid = es_ann . groupid #NEWLINE# ann . text = es_ann . text #NEWLINE# ann . tags = es_ann . tags #NEWLINE# ann . references = es_ann . references #NEWLINE# ann . shared = es_ann . shared #NEWLINE# ann . target_uri = es_ann . target_uri #NEWLINE# ann . target_selectors = es_ann . target_selectors #NEWLINE# ann . extra = es_ann . extra #NEWLINE# return ann