On 06/07/2010 15:21, Andreas Truszkowski wrote:
> David Withers schrieb:
>> On 06/07/2010 14:41, Andreas Truszkowski wrote:
>> 
>>> David Withers schrieb:
>>> 
>>>> On 05/07/2010 18:33, Andreas Truszkowski wrote:
>>>> 
>>>> 
>>>>> Hi!
>>>>> 
>>>>> I have to write an iterative filereader activitie. Is there
>>>>> any documentation about writing iterative activies or can
>>>>> anyone give me a short description?
>>>>> 
>>>>> 
>>>> Hi Andreas,
>>>> 
>>>> There is a tutorial for writing activities here: 
>>>> http://www.mygrid.org.uk/dev/wiki/display/developer/Tutorial+-+Service+invocation+plugin
>>>>
>>>>
>>>> 
David.
>>>> 
>>>> 
>>>> 
>>> Hi David,
>>> 
>>> writing an activitie is not the problem. I need to develope an
>>> activitie which is able to read i.e. a big file iterative.
>>> However that is not described in the wiki documentation.
>>> 
>> 
>> Hi Andreas,
>> 
>> I don't understand what you mean by iterative in this context. What
>> type of file do you want to read? Do you need to process the file
>> stream as it's being read?
>> 
>> David.
> 
> The file should be read in small pieces so that every piece is
> processed separatly within the underlying workflow. If my file ist
> several GBs big or maybe a database it is not possible to load the
> data into the memory at once. I have read somewhere that the API of
> taverna is be able to do so but I can't find any longer the source.

Your activity needs to read a file stream and output a list where each
element of the list is part of the file. There's an example of an
activity that does this at
http://code.google.com/p/taverna-plugins/source/browse/trunk/sequencefile/sequencefile-activity/src/main/java/net/sf/taverna/t2/activities/sequencefile/SequenceFileActivity.java

If you look at lines 126 to 132 of the file, callback.receiveResult is
called for each part of the input file. (Note that the complete list is
also output at line 140).

You also need to specify that the activity output port has a granular
depth of 0 (see line 161).

David.

-- 
David Withers
School of Computer Science, University of Manchester,
Oxford Road, Manchester, M13 9PL, UK.
+44 (0)161 275 0683

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/
Developers Guide: http://www.taverna.org.uk/developers/

Reply via email to