[Biojava-l] how to set date created on RichSequence

Khalil El Mazouari khalil.elmazouari at gmail.com
Thu May 31 17:01:37 UTC 2012


Hi George,

the dateCreated is set correctly. 

However, it's only printed via RichSequence.IOTools.writeEmbl and not with RichSequence.IOTools.writeGenbank!!

Best

khalil



On 31 May 2012, at 17:31, George Waldon wrote:

> 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 <khalil.elmazouari at gmail.com>:
> 
>> 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  -  Biojava-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/biojava-l
>> 
> 
> 
> 
> --------------------------------
> George Waldon
> 
> 





-----

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.







More information about the Biojava-l mailing list