Re: [Dhis2-devs] Read fileResource data directly

2016-06-02 Thread chathura widanage
Thanks Halvdan. Since that is the case, I am going to locally process the
files.

On Thu, Jun 2, 2016 at 6:41 PM, Halvdan Hoem Grelland 
wrote:

> To answer the original question: no, currently fileResource is only used
> as a backend for storing file content with DataValues. Extending it to more
> generic file store use cases is on the horizon, but it's yet to be
> specified on the roadmap, unfortunately.
>
> On Thu, Jun 2, 2016 at 10:09 AM, Morten Olav Hansen 
> wrote:
>
>> Yeah, I think it's fairly recent.. if you don't have to support every
>> single version of IE.. I think it's safe to use it :) (it also removes the
>> need to store tmp files on the server)
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Thu, Jun 2, 2016 at 3:07 PM, chathura widanage <
>> chathurawidan...@gmail.com> wrote:
>>
>>> Didn't know about the FileReader API till now. Thanks for the
>>> information. I had the thought that browsers block local file read. Thanks
>>> a lot.
>>>
>>>
>>>
>>> On Thu, Jun 2, 2016 at 1:19 PM, Morten Olav Hansen 
>>> wrote:
>>>
 Ok, but why do you need to store it in the server at all? can't you
 just process it on the client?

 --
 Morten Olav Hansen
 Senior Engineer, DHIS 2
 University of Oslo
 http://www.dhis2.org

 On Thu, Jun 2, 2016 at 2:16 PM, chathura widanage <
 chathurawidan...@gmail.com> wrote:

> Hi Morten,
>
> Thanks. Just the selected rows from the CSV are going to be stored in
> the data store. But to do so, first I need to show the content of the CSV
> to the user (graphically). So I have to read the content of the CSV first.
>
> If I am going to do it in one of my own web app, what I will do is,
>
> 1. Upload the CSV to server temporary.(say tmp.csv) (I need a solution
> for this step in the DHIS context)
> 2. Read back the uploaded CSV(tmp.csv) show it to the user. (draw a
> chart in my case)
> 3. Allow the user to select the required data.
> 4. Save only the selected data(rows) to the database. (In DHIS, saving
> to the data store)
> 5. Delete tmp.csv
>
> So what I really need is to do the same thing in step 1 above using
> the DHIS Web api.
>
> Thanks.
>
> On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen 
> wrote:
>
>> Did you have a look at the data store API? [1], you could also use
>> the user setting API to store it (if its small enough) [2]
>>
>> [1]
>> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s67.html
>> [2]
>> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s46.html
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Thu, Jun 2, 2016 at 2:03 PM, chathura widanage <
>> chathurawidan...@gmail.com> wrote:
>>
>>> Yes, display in a chart as a preview. Part of the data(selected
>>> rows) will be then saved as an attribute in a custom object. Custom 
>>> object
>>> will then be persisted to the system. So there is no need of retrieving
>>> data from this fileSource later.
>>>
>>> On Thu, Jun 2, 2016 at 12:29 PM, Knut Staring 
>>> wrote:
>>>
 Sure, but what is it you want to do with this after retrieving?
 Display it somehow?

 Knut

 On Thu, Jun 2, 2016 at 11:11 AM, chathura widanage <
 chathurawidan...@gmail.com> wrote:

> Thanks for the response, what I meant by read is, retrieve the
> content of the file. Comma separated values as a String in my case.
>
> Chathura
>
> On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring 
> wrote:
>
>> The answer is probably no, although I am not sure what you mean
>> by "read"?
>>
>> Knut
>>
>> On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
>> chathurawidan...@gmail.com> wrote:
>>
>>> Hi devs,
>>>
>>> Is there a way to read the content of a fileResource without
>>> linking the resource to a dataValue.
>>>
>>> example scenario :
>>>
>>> Upload a CSV which contains some arbitrary data and read it
>>> immediately. I won't need these data after the first read.
>>>
>>> Regards,
>>> Chathura
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522

Re: [Dhis2-devs] Read fileResource data directly

2016-06-02 Thread Halvdan Hoem Grelland
To answer the original question: no, currently fileResource is only used as
a backend for storing file content with DataValues. Extending it to more
generic file store use cases is on the horizon, but it's yet to be
specified on the roadmap, unfortunately.

On Thu, Jun 2, 2016 at 10:09 AM, Morten Olav Hansen 
wrote:

> Yeah, I think it's fairly recent.. if you don't have to support every
> single version of IE.. I think it's safe to use it :) (it also removes the
> need to store tmp files on the server)
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Jun 2, 2016 at 3:07 PM, chathura widanage <
> chathurawidan...@gmail.com> wrote:
>
>> Didn't know about the FileReader API till now. Thanks for the
>> information. I had the thought that browsers block local file read. Thanks
>> a lot.
>>
>>
>>
>> On Thu, Jun 2, 2016 at 1:19 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Ok, but why do you need to store it in the server at all? can't you just
>>> process it on the client?
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Thu, Jun 2, 2016 at 2:16 PM, chathura widanage <
>>> chathurawidan...@gmail.com> wrote:
>>>
 Hi Morten,

 Thanks. Just the selected rows from the CSV are going to be stored in
 the data store. But to do so, first I need to show the content of the CSV
 to the user (graphically). So I have to read the content of the CSV first.

 If I am going to do it in one of my own web app, what I will do is,

 1. Upload the CSV to server temporary.(say tmp.csv) (I need a solution
 for this step in the DHIS context)
 2. Read back the uploaded CSV(tmp.csv) show it to the user. (draw a
 chart in my case)
 3. Allow the user to select the required data.
 4. Save only the selected data(rows) to the database. (In DHIS, saving
 to the data store)
 5. Delete tmp.csv

 So what I really need is to do the same thing in step 1 above using the
 DHIS Web api.

 Thanks.

 On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen 
 wrote:

> Did you have a look at the data store API? [1], you could also use the
> user setting API to store it (if its small enough) [2]
>
> [1]
> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s67.html
> [2]
> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s46.html
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Jun 2, 2016 at 2:03 PM, chathura widanage <
> chathurawidan...@gmail.com> wrote:
>
>> Yes, display in a chart as a preview. Part of the data(selected rows)
>> will be then saved as an attribute in a custom object. Custom object will
>> then be persisted to the system. So there is no need of retrieving data
>> from this fileSource later.
>>
>> On Thu, Jun 2, 2016 at 12:29 PM, Knut Staring 
>> wrote:
>>
>>> Sure, but what is it you want to do with this after retrieving?
>>> Display it somehow?
>>>
>>> Knut
>>>
>>> On Thu, Jun 2, 2016 at 11:11 AM, chathura widanage <
>>> chathurawidan...@gmail.com> wrote:
>>>
 Thanks for the response, what I meant by read is, retrieve the
 content of the file. Comma separated values as a String in my case.

 Chathura

 On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring 
 wrote:

> The answer is probably no, although I am not sure what you mean by
> "read"?
>
> Knut
>
> On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
> chathurawidan...@gmail.com> wrote:
>
>> Hi devs,
>>
>> Is there a way to read the content of a fileResource without
>> linking the resource to a dataValue.
>>
>> example scenario :
>>
>> Upload a CSV which contains some arbitrary data and read it
>> immediately. I won't need these data after the first read.
>>
>> Regards,
>> Chathura
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>



 --
 Best Regards,

 *Chathura Widanage,*
 Undergraduate,
 Department of Computer Science and Engineering,
 University of Moratuwa,
 Sri Lanka
>

Re: [Dhis2-devs] Read fileResource data directly

2016-06-02 Thread Morten Olav Hansen
Yeah, I think it's fairly recent.. if you don't have to support every
single version of IE.. I think it's safe to use it :) (it also removes the
need to store tmp files on the server)

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Thu, Jun 2, 2016 at 3:07 PM, chathura widanage <
chathurawidan...@gmail.com> wrote:

> Didn't know about the FileReader API till now. Thanks for the information.
> I had the thought that browsers block local file read. Thanks a lot.
>
>
>
> On Thu, Jun 2, 2016 at 1:19 PM, Morten Olav Hansen 
> wrote:
>
>> Ok, but why do you need to store it in the server at all? can't you just
>> process it on the client?
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Thu, Jun 2, 2016 at 2:16 PM, chathura widanage <
>> chathurawidan...@gmail.com> wrote:
>>
>>> Hi Morten,
>>>
>>> Thanks. Just the selected rows from the CSV are going to be stored in
>>> the data store. But to do so, first I need to show the content of the CSV
>>> to the user (graphically). So I have to read the content of the CSV first.
>>>
>>> If I am going to do it in one of my own web app, what I will do is,
>>>
>>> 1. Upload the CSV to server temporary.(say tmp.csv) (I need a solution
>>> for this step in the DHIS context)
>>> 2. Read back the uploaded CSV(tmp.csv) show it to the user. (draw a
>>> chart in my case)
>>> 3. Allow the user to select the required data.
>>> 4. Save only the selected data(rows) to the database. (In DHIS, saving
>>> to the data store)
>>> 5. Delete tmp.csv
>>>
>>> So what I really need is to do the same thing in step 1 above using the
>>> DHIS Web api.
>>>
>>> Thanks.
>>>
>>> On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen 
>>> wrote:
>>>
 Did you have a look at the data store API? [1], you could also use the
 user setting API to store it (if its small enough) [2]

 [1]
 http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s67.html
 [2]
 http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s46.html

 --
 Morten Olav Hansen
 Senior Engineer, DHIS 2
 University of Oslo
 http://www.dhis2.org

 On Thu, Jun 2, 2016 at 2:03 PM, chathura widanage <
 chathurawidan...@gmail.com> wrote:

> Yes, display in a chart as a preview. Part of the data(selected rows)
> will be then saved as an attribute in a custom object. Custom object will
> then be persisted to the system. So there is no need of retrieving data
> from this fileSource later.
>
> On Thu, Jun 2, 2016 at 12:29 PM, Knut Staring 
> wrote:
>
>> Sure, but what is it you want to do with this after retrieving?
>> Display it somehow?
>>
>> Knut
>>
>> On Thu, Jun 2, 2016 at 11:11 AM, chathura widanage <
>> chathurawidan...@gmail.com> wrote:
>>
>>> Thanks for the response, what I meant by read is, retrieve the
>>> content of the file. Comma separated values as a String in my case.
>>>
>>> Chathura
>>>
>>> On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring 
>>> wrote:
>>>
 The answer is probably no, although I am not sure what you mean by
 "read"?

 Knut

 On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
 chathurawidan...@gmail.com> wrote:

> Hi devs,
>
> Is there a way to read the content of a fileResource without
> linking the resource to a dataValue.
>
> example scenario :
>
> Upload a CSV which contains some arbitrary data and read it
> immediately. I won't need these data after the first read.
>
> Regards,
> Chathura
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


 --
 Knut Staring
 Dept. of Informatics, University of Oslo
 Norway: +4791880522
 Skype: knutstar
 http://dhis2.org

>>>
>>>
>>>
>>> --
>>> Best Regards,
>>>
>>> *Chathura Widanage,*
>>> Undergraduate,
>>> Department of Computer Science and Engineering,
>>> University of Moratuwa,
>>> Sri Lanka
>>>
>>> 
>>>   
>>> 
>>> 
>>>
>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>
>
>
> --
>>>

Re: [Dhis2-devs] Read fileResource data directly

2016-06-02 Thread chathura widanage
Didn't know about the FileReader API till now. Thanks for the information.
I had the thought that browsers block local file read. Thanks a lot.



On Thu, Jun 2, 2016 at 1:19 PM, Morten Olav Hansen  wrote:

> Ok, but why do you need to store it in the server at all? can't you just
> process it on the client?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Jun 2, 2016 at 2:16 PM, chathura widanage <
> chathurawidan...@gmail.com> wrote:
>
>> Hi Morten,
>>
>> Thanks. Just the selected rows from the CSV are going to be stored in the
>> data store. But to do so, first I need to show the content of the CSV to
>> the user (graphically). So I have to read the content of the CSV first.
>>
>> If I am going to do it in one of my own web app, what I will do is,
>>
>> 1. Upload the CSV to server temporary.(say tmp.csv) (I need a solution
>> for this step in the DHIS context)
>> 2. Read back the uploaded CSV(tmp.csv) show it to the user. (draw a chart
>> in my case)
>> 3. Allow the user to select the required data.
>> 4. Save only the selected data(rows) to the database. (In DHIS, saving to
>> the data store)
>> 5. Delete tmp.csv
>>
>> So what I really need is to do the same thing in step 1 above using the
>> DHIS Web api.
>>
>> Thanks.
>>
>> On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen 
>> wrote:
>>
>>> Did you have a look at the data store API? [1], you could also use the
>>> user setting API to store it (if its small enough) [2]
>>>
>>> [1]
>>> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s67.html
>>> [2]
>>> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s46.html
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Thu, Jun 2, 2016 at 2:03 PM, chathura widanage <
>>> chathurawidan...@gmail.com> wrote:
>>>
 Yes, display in a chart as a preview. Part of the data(selected rows)
 will be then saved as an attribute in a custom object. Custom object will
 then be persisted to the system. So there is no need of retrieving data
 from this fileSource later.

 On Thu, Jun 2, 2016 at 12:29 PM, Knut Staring  wrote:

> Sure, but what is it you want to do with this after retrieving?
> Display it somehow?
>
> Knut
>
> On Thu, Jun 2, 2016 at 11:11 AM, chathura widanage <
> chathurawidan...@gmail.com> wrote:
>
>> Thanks for the response, what I meant by read is, retrieve the
>> content of the file. Comma separated values as a String in my case.
>>
>> Chathura
>>
>> On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring 
>> wrote:
>>
>>> The answer is probably no, although I am not sure what you mean by
>>> "read"?
>>>
>>> Knut
>>>
>>> On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
>>> chathurawidan...@gmail.com> wrote:
>>>
 Hi devs,

 Is there a way to read the content of a fileResource without
 linking the resource to a dataValue.

 example scenario :

 Upload a CSV which contains some arbitrary data and read it
 immediately. I won't need these data after the first read.

 Regards,
 Chathura

 ___
 Mailing list: https://launchpad.net/~dhis2-devs
 Post to : dhis2-devs@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs
 More help   : https://help.launchpad.net/ListHelp


>>>
>>>
>>> --
>>> Knut Staring
>>> Dept. of Informatics, University of Oslo
>>> Norway: +4791880522
>>> Skype: knutstar
>>> http://dhis2.org
>>>
>>
>>
>>
>> --
>> Best Regards,
>>
>> *Chathura Widanage,*
>> Undergraduate,
>> Department of Computer Science and Engineering,
>> University of Moratuwa,
>> Sri Lanka
>>
>> 
>>   
>> 
>> 
>>
>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>



 --
 Best Regards,

 *Chathura Widanage,*
 Undergraduate,
 Department of Computer Science and Engineering,
 University of Moratuwa,
 Sri Lanka

 
   
 
 

 ___
 Mailing list: https://launchpad.net/~dhis2-devs

Re: [Dhis2-devs] Read fileResource data directly

2016-06-02 Thread Morten Olav Hansen
Ok, but why do you need to store it in the server at all? can't you just
process it on the client?

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Thu, Jun 2, 2016 at 2:16 PM, chathura widanage <
chathurawidan...@gmail.com> wrote:

> Hi Morten,
>
> Thanks. Just the selected rows from the CSV are going to be stored in the
> data store. But to do so, first I need to show the content of the CSV to
> the user (graphically). So I have to read the content of the CSV first.
>
> If I am going to do it in one of my own web app, what I will do is,
>
> 1. Upload the CSV to server temporary.(say tmp.csv) (I need a solution for
> this step in the DHIS context)
> 2. Read back the uploaded CSV(tmp.csv) show it to the user. (draw a chart
> in my case)
> 3. Allow the user to select the required data.
> 4. Save only the selected data(rows) to the database. (In DHIS, saving to
> the data store)
> 5. Delete tmp.csv
>
> So what I really need is to do the same thing in step 1 above using the
> DHIS Web api.
>
> Thanks.
>
> On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen 
> wrote:
>
>> Did you have a look at the data store API? [1], you could also use the
>> user setting API to store it (if its small enough) [2]
>>
>> [1]
>> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s67.html
>> [2]
>> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s46.html
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Thu, Jun 2, 2016 at 2:03 PM, chathura widanage <
>> chathurawidan...@gmail.com> wrote:
>>
>>> Yes, display in a chart as a preview. Part of the data(selected rows)
>>> will be then saved as an attribute in a custom object. Custom object will
>>> then be persisted to the system. So there is no need of retrieving data
>>> from this fileSource later.
>>>
>>> On Thu, Jun 2, 2016 at 12:29 PM, Knut Staring  wrote:
>>>
 Sure, but what is it you want to do with this after retrieving? Display
 it somehow?

 Knut

 On Thu, Jun 2, 2016 at 11:11 AM, chathura widanage <
 chathurawidan...@gmail.com> wrote:

> Thanks for the response, what I meant by read is, retrieve the content
> of the file. Comma separated values as a String in my case.
>
> Chathura
>
> On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring 
> wrote:
>
>> The answer is probably no, although I am not sure what you mean by
>> "read"?
>>
>> Knut
>>
>> On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
>> chathurawidan...@gmail.com> wrote:
>>
>>> Hi devs,
>>>
>>> Is there a way to read the content of a fileResource without linking
>>> the resource to a dataValue.
>>>
>>> example scenario :
>>>
>>> Upload a CSV which contains some arbitrary data and read it
>>> immediately. I won't need these data after the first read.
>>>
>>> Regards,
>>> Chathura
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>
>
>
> --
> Best Regards,
>
> *Chathura Widanage,*
> Undergraduate,
> Department of Computer Science and Engineering,
> University of Moratuwa,
> Sri Lanka
>
> 
>   
> 
> 
>



 --
 Knut Staring
 Dept. of Informatics, University of Oslo
 Norway: +4791880522
 Skype: knutstar
 http://dhis2.org

>>>
>>>
>>>
>>> --
>>> Best Regards,
>>>
>>> *Chathura Widanage,*
>>> Undergraduate,
>>> Department of Computer Science and Engineering,
>>> University of Moratuwa,
>>> Sri Lanka
>>>
>>> 
>>>   
>>> 
>>> 
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
>
> --
> Best Regards,
>
> *Chathura Widanage,*
> Undergraduate,
> Department of Computer Science and Engineering,
> University of Moratuwa,
> Sri Lanka
>
> 

Re: [Dhis2-devs] Read fileResource data directly

2016-06-02 Thread chathura widanage
Hi Morten,

Thanks. Just the selected rows from the CSV are going to be stored in the
data store. But to do so, first I need to show the content of the CSV to
the user (graphically). So I have to read the content of the CSV first.

If I am going to do it in one of my own web app, what I will do is,

1. Upload the CSV to server temporary.(say tmp.csv) (I need a solution for
this step in the DHIS context)
2. Read back the uploaded CSV(tmp.csv) show it to the user. (draw a chart
in my case)
3. Allow the user to select the required data.
4. Save only the selected data(rows) to the database. (In DHIS, saving to
the data store)
5. Delete tmp.csv

So what I really need is to do the same thing in step 1 above using the
DHIS Web api.

Thanks.

On Thu, Jun 2, 2016 at 12:37 PM, Morten Olav Hansen 
wrote:

> Did you have a look at the data store API? [1], you could also use the
> user setting API to store it (if its small enough) [2]
>
> [1]
> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s67.html
> [2]
> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s46.html
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Jun 2, 2016 at 2:03 PM, chathura widanage <
> chathurawidan...@gmail.com> wrote:
>
>> Yes, display in a chart as a preview. Part of the data(selected rows)
>> will be then saved as an attribute in a custom object. Custom object will
>> then be persisted to the system. So there is no need of retrieving data
>> from this fileSource later.
>>
>> On Thu, Jun 2, 2016 at 12:29 PM, Knut Staring  wrote:
>>
>>> Sure, but what is it you want to do with this after retrieving? Display
>>> it somehow?
>>>
>>> Knut
>>>
>>> On Thu, Jun 2, 2016 at 11:11 AM, chathura widanage <
>>> chathurawidan...@gmail.com> wrote:
>>>
 Thanks for the response, what I meant by read is, retrieve the content
 of the file. Comma separated values as a String in my case.

 Chathura

 On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring  wrote:

> The answer is probably no, although I am not sure what you mean by
> "read"?
>
> Knut
>
> On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
> chathurawidan...@gmail.com> wrote:
>
>> Hi devs,
>>
>> Is there a way to read the content of a fileResource without linking
>> the resource to a dataValue.
>>
>> example scenario :
>>
>> Upload a CSV which contains some arbitrary data and read it
>> immediately. I won't need these data after the first read.
>>
>> Regards,
>> Chathura
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>



 --
 Best Regards,

 *Chathura Widanage,*
 Undergraduate,
 Department of Computer Science and Engineering,
 University of Moratuwa,
 Sri Lanka

 
   
 
 

>>>
>>>
>>>
>>> --
>>> Knut Staring
>>> Dept. of Informatics, University of Oslo
>>> Norway: +4791880522
>>> Skype: knutstar
>>> http://dhis2.org
>>>
>>
>>
>>
>> --
>> Best Regards,
>>
>> *Chathura Widanage,*
>> Undergraduate,
>> Department of Computer Science and Engineering,
>> University of Moratuwa,
>> Sri Lanka
>>
>> 
>>   
>> 
>> 
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>


-- 
Best Regards,

*Chathura Widanage,*
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka

  


___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Read fileResource data directly

2016-06-02 Thread Morten Olav Hansen
Did you have a look at the data store API? [1], you could also use the user
setting API to store it (if its small enough) [2]

[1] http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s67.html
[2] http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s46.html

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Thu, Jun 2, 2016 at 2:03 PM, chathura widanage <
chathurawidan...@gmail.com> wrote:

> Yes, display in a chart as a preview. Part of the data(selected rows) will
> be then saved as an attribute in a custom object. Custom object will then
> be persisted to the system. So there is no need of retrieving data from
> this fileSource later.
>
> On Thu, Jun 2, 2016 at 12:29 PM, Knut Staring  wrote:
>
>> Sure, but what is it you want to do with this after retrieving? Display
>> it somehow?
>>
>> Knut
>>
>> On Thu, Jun 2, 2016 at 11:11 AM, chathura widanage <
>> chathurawidan...@gmail.com> wrote:
>>
>>> Thanks for the response, what I meant by read is, retrieve the content
>>> of the file. Comma separated values as a String in my case.
>>>
>>> Chathura
>>>
>>> On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring  wrote:
>>>
 The answer is probably no, although I am not sure what you mean by
 "read"?

 Knut

 On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
 chathurawidan...@gmail.com> wrote:

> Hi devs,
>
> Is there a way to read the content of a fileResource without linking
> the resource to a dataValue.
>
> example scenario :
>
> Upload a CSV which contains some arbitrary data and read it
> immediately. I won't need these data after the first read.
>
> Regards,
> Chathura
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


 --
 Knut Staring
 Dept. of Informatics, University of Oslo
 Norway: +4791880522
 Skype: knutstar
 http://dhis2.org

>>>
>>>
>>>
>>> --
>>> Best Regards,
>>>
>>> *Chathura Widanage,*
>>> Undergraduate,
>>> Department of Computer Science and Engineering,
>>> University of Moratuwa,
>>> Sri Lanka
>>>
>>> 
>>>   
>>> 
>>> 
>>>
>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>
>
>
> --
> Best Regards,
>
> *Chathura Widanage,*
> Undergraduate,
> Department of Computer Science and Engineering,
> University of Moratuwa,
> Sri Lanka
>
> 
>   
> 
> 
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Read fileResource data directly

2016-06-02 Thread chathura widanage
Yes, display in a chart as a preview. Part of the data(selected rows) will
be then saved as an attribute in a custom object. Custom object will then
be persisted to the system. So there is no need of retrieving data from
this fileSource later.

On Thu, Jun 2, 2016 at 12:29 PM, Knut Staring  wrote:

> Sure, but what is it you want to do with this after retrieving? Display it
> somehow?
>
> Knut
>
> On Thu, Jun 2, 2016 at 11:11 AM, chathura widanage <
> chathurawidan...@gmail.com> wrote:
>
>> Thanks for the response, what I meant by read is, retrieve the content of
>> the file. Comma separated values as a String in my case.
>>
>> Chathura
>>
>> On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring  wrote:
>>
>>> The answer is probably no, although I am not sure what you mean by
>>> "read"?
>>>
>>> Knut
>>>
>>> On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
>>> chathurawidan...@gmail.com> wrote:
>>>
 Hi devs,

 Is there a way to read the content of a fileResource without linking
 the resource to a dataValue.

 example scenario :

 Upload a CSV which contains some arbitrary data and read it
 immediately. I won't need these data after the first read.

 Regards,
 Chathura

 ___
 Mailing list: https://launchpad.net/~dhis2-devs
 Post to : dhis2-devs@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs
 More help   : https://help.launchpad.net/ListHelp


>>>
>>>
>>> --
>>> Knut Staring
>>> Dept. of Informatics, University of Oslo
>>> Norway: +4791880522
>>> Skype: knutstar
>>> http://dhis2.org
>>>
>>
>>
>>
>> --
>> Best Regards,
>>
>> *Chathura Widanage,*
>> Undergraduate,
>> Department of Computer Science and Engineering,
>> University of Moratuwa,
>> Sri Lanka
>>
>> 
>>   
>> 
>> 
>>
>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>



-- 
Best Regards,

*Chathura Widanage,*
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka

  


___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Read fileResource data directly

2016-06-02 Thread Knut Staring
Sure, but what is it you want to do with this after retrieving? Display it
somehow?

Knut

On Thu, Jun 2, 2016 at 11:11 AM, chathura widanage <
chathurawidan...@gmail.com> wrote:

> Thanks for the response, what I meant by read is, retrieve the content of
> the file. Comma separated values as a String in my case.
>
> Chathura
>
> On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring  wrote:
>
>> The answer is probably no, although I am not sure what you mean by "read"?
>>
>> Knut
>>
>> On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
>> chathurawidan...@gmail.com> wrote:
>>
>>> Hi devs,
>>>
>>> Is there a way to read the content of a fileResource without linking the
>>> resource to a dataValue.
>>>
>>> example scenario :
>>>
>>> Upload a CSV which contains some arbitrary data and read it immediately.
>>> I won't need these data after the first read.
>>>
>>> Regards,
>>> Chathura
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>
>
>
> --
> Best Regards,
>
> *Chathura Widanage,*
> Undergraduate,
> Department of Computer Science and Engineering,
> University of Moratuwa,
> Sri Lanka
>
> 
>   
> 
> 
>



-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Read fileResource data directly

2016-06-01 Thread chathura widanage
Thanks for the response, what I meant by read is, retrieve the content of
the file. Comma separated values as a String in my case.

Chathura

On Thu, Jun 2, 2016 at 12:08 PM, Knut Staring  wrote:

> The answer is probably no, although I am not sure what you mean by "read"?
>
> Knut
>
> On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
> chathurawidan...@gmail.com> wrote:
>
>> Hi devs,
>>
>> Is there a way to read the content of a fileResource without linking the
>> resource to a dataValue.
>>
>> example scenario :
>>
>> Upload a CSV which contains some arbitrary data and read it immediately.
>> I won't need these data after the first read.
>>
>> Regards,
>> Chathura
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>



-- 
Best Regards,

*Chathura Widanage,*
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka

  


___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Read fileResource data directly

2016-06-01 Thread Knut Staring
The answer is probably no, although I am not sure what you mean by "read"?

Knut

On Thu, Jun 2, 2016 at 10:53 AM, chathura widanage <
chathurawidan...@gmail.com> wrote:

> Hi devs,
>
> Is there a way to read the content of a fileResource without linking the
> resource to a dataValue.
>
> example scenario :
>
> Upload a CSV which contains some arbitrary data and read it immediately. I
> won't need these data after the first read.
>
> Regards,
> Chathura
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp