NB: This import code only needs to work for the next month/two, so any
hacky methods should be suitable for doing the following task (the
'dirty' code can be removed once the import feature is no longer
needed).

Using the wave API's I can get a sequence of
ProtocolAppliedWaveletDelta's for any given wave - which gets the data
out of Google Wave.
I was then thinking of simply putting it through the persistence
layer, assuming it would handle this form of delta and output a nicely
formatted stream of delta's into the file-store.

Upon examination of the code base, it looks like the persistence layer
only accepts WaveletDeltaRecords which appear to primary consist of
TransformedWaveletDelta's (and making the assumption Transformed =/=
Applied) this is not directly suitable.

So to get an import, do I need to do the following instead:
- Create a new wavelet (with information from? Surely this is in the
first received delta?)
then to to each ProtocolAppliedWaveletDelta:
- Run a pre-process of each delta to map users to the new domain
- Pass through the WaveletProvider.submitRequest (which passes to
submitDelta which seems to transform it)
Then at the end
- Pass this wavelet to the persistence layer (or is this done
automatically by the WaveletProvider?)

Again, I am sorry if this seems a simple question but I don't yet know
enough of the code base to be certain on this being the
best/easiest/or even correct method.

Ali

Reply via email to