On 15 February 2011 13:34, Jo Størset <stor...@gmail.com> wrote: > > Den 15. feb. 2011 kl. 18.40 skrev Bob Jolliffe: > >> Simple validation seems to work ok. I get an "Aw, Snap! ..." when >> posting twice with the same period but that is probably something you >> are not catching yet. > > Should work now. > >> I don't agree with this. > > I know :) I don't necessarily agree myself, but it is also a matter of what > is practically possible.. (And it might make sense to have a simpler > json-oriented web api vs. a more fullfledged xml format for heavy imp/exp. > Are you coming to Oslo in March by any chance, then we can fight it out! )
28 March - 8 April By heavy I presume you mean bulk loading of data, bootstrapping, importing from legacy systems etc. For many of those scenarios csv is maybe the best option anyway .. we do need to map out the use cases in more detail than heavy vs mobile :-) What I don't want to do is to impose "heaviness" requirements on your lighter use cases and I don't see why this should be necessary. For example you have defined a lightweight element, datavalueset, which meets your requirement for exchange. What I am suggesting is that we should also define a compound element, dxf, which can allow composition of these elements: <dxf xmlns="http://dhis.org/schema/2.0"> .... <dataValueSet>...</dataValueset> ... </dxf> None of which prevents you using dataValueSet on its own. But we really, really only want one place in dhis code where dataValue set is marshalled/unmarshalled. You are now the jackson expert, but it looks from what I can see that this does a good job in doing that and certainly easier to maintain than staxwax. One thought which was raised by Lars on looking at the MS OOXML format used by, for example, xlsx, is that for xml elements which are likely to be exchanged in bulk, we should perhaps look at using abbreviated element/attribute names. So <dataValueSet xmlns="http://dhis2.org/schema/dataValueSet/0.1" dataSet="EEEE2762-6432-4C9A-A739-8E7F1D74F60F" period="2011" orgUnit="59AC3C28-DDCE-435C-8695-8E457127DADC" storedBy="Bob"> <dataValue dataElement="B01190B8-808C-42C4-AA6F-3F9CF51DC44F" >34</dataValue> </dataValueSet> becomes <dvs xmlns="http://dhis2.org/schema/dataValueSet/0.1" ds="EEEE2762-6432-4C9A-A739-8E7F1D74F60F" p="2011" ou="59AC3C28-DDCE-435C-8695-8E457127DADC" s="Bob"> <dv de="B01190B8-808C-42C4-AA6F-3F9CF51DC44F" >34</dv> </dvs> Though, ironically, this starts to get closer to the json representation (which might well be more suitable for bulk transfer). Anyway .. still busy with other things but we will talk. Meanwhile congrats on the "spike". This is the kind of api we need. But do try to be a bit generous and think beyond your mobile use case :-) Cheers Bob > >> Your use of DataValueSet here is very welcome - as you know I have >> been advocating this for a while. Would be nice also to persist it to >> provide audit (and simplify dtavalue store) but that is maybe too much >> for now. > > Yes, that would have to be the next topic. Let's see if anyone else take the > bait :) > > Jo _______________________________________________ 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