Hi Khalil,
This code should set a date:
RichAnnotation notes = ((RichSequence)seq).getRichAnnotation();
Date now = new Date();
SimpleDateFormat format = new SimpleDateFormat("dd-MMM-yyyy");
Note n = new SimpleNote(
Terms.getDateCreatedTerm(),
format.format(now).toUpperCase(),
notes.getNoteSet().size()+1);
notes.addNote(n);
n = new SimpleNote(
Terms.getDateUpdatedTerm(),
format.format(now).toUpperCase(),
notes.getNoteSet().size()+1);
notes.addNote(n);
If the notes already exist, you may have to find them and adjust the date.
Best,
George
Quoting Khalil El Mazouari <[email protected]>:
Hi All,
how to set a date created on RichSequence?
Thanks
-----
Confidentiality Notice: This e-mail and any files transmitted with
it are private and confidential and are solely for the use of the
addressee. It may contain material which is legally privileged. If
you are not the addressee or the person responsible for delivering
to the addressee, please notify that you have received this e-mail
in error and that any use of it is strictly prohibited. It would be
helpful if you could notify the author by replying to it.
_______________________________________________
Biojava-l mailing list - [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l
--------------------------------
George Waldon
_______________________________________________
Biojava-l mailing list - [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l