Help with child blips

0 views
Skip to first unread message

Kartik Bansal

unread,
Dec 22, 2009, 2:48:29 AM12/22/09
to Google Wave API, sco...@google.com, pame...@gmail.com
Hey guys,

need help with reading child blips. Consider following scenarios:

1.  I have three blips in following order
         RootBlip(A)
         Blip(B)
         Blip(C)

    I use following loop to read all the content of the wave:

                StringBuilder s = new StringBuilder("");
                if(root != null){
                    if(!root.getDocument().getText().contains("http://173.45.238.233/files/" + waveId + "/" + waveId + ".pdf")){
                        s.append(root.getChild(i).getDocument().getText() + " ");               
                    }
                }
                for(i=0;i<len;i++){
                    if(root.getChild(i) != null){
                        if(!root.getChild(i).getDocument().getText().contains("http://173.45.238.233/files/" + waveId + "/" + waveId + ".pdf")){
                            s.append(root.getChild(i).getDocument().getText() + " ");               
                        }
                    }
                    if(root.getChild(i).hasChildren()){
                        Logger.getAnonymousLogger().severe("Child " + i + "has childern");
                    }
                    else{
                        Logger.getAnonymousLogger().severe("Child " + i + "has no childern");
                    }
                }

When i run this loop, i get: ABC



2. Now a new blip is added as a reply to the second blip
         RootBlip(A)
         Blip(B)
             Blip(D)
         Blip(C)

Now the same loop as above reads the content of the newly added blip as last. So i get ABCD

But i want to read it as ABDC. How can I achieve this?

Thank you

Austin (Google)

unread,
Dec 30, 2009, 6:30:04 PM12/30/09
to Google Wave API
This is not possible with the API's current representation
of parent and children blips. In order for you to iterate over the
blips in
the "conversation" order, the API needs to expose the conversation
model.
You can read more about the model in the Wave Protocol specification:
http://www.waveprotocol.org/draft-protocol-specs/wave-conversation-model
(particularly
"Conversation Manifest Document")
We do plan to expose the conversation model in the API at a later
date, so
please stay tuned to the blog and forum for updates.
Austin

Artiom

unread,
Jan 4, 2010, 8:56:51 AM1/4/10
to Google Wave API
I also needed that...
Ok, now we have to wait for new APIs

On 31 дек 2009, 01:30, "Austin (Google)" <api.aus...@google.com>
wrote:


> This is not possible with the API's current representation

> ofparentand children blips. In order for you to iterate over the

> > 2. Now a newblipis added as a reply to the secondblip

Reply all
Reply to author
Forward
0 new messages