Hi MrM, I've discovered the following with experimenting:
- WAVELET_SELF_ADDED, all (including nested & inline) blips are returned with context="children" - every child blip there has a parent blip ID of the root blip ID - BLIP_SUBMITTED, only on the root blip does it return any children (with context="children" same as W_S_A). All other submitted blips return 0 children. I've tested this on fairly deeply nested blips on the sandbox. I automated the test, but you can see from the App Engine logs the above results - all children blips have the same parent ID of the root blip ID. Perhaps, once the new API with RPC's to blips will change all this to a nested tree structure. But I haven't found any extra info out yet about why the tree structure seems to be one level deep for the current robot Java API. On Nov 29, 6:12 pm, MrM <[email protected]> wrote: > Hallo! > > I have some issues with blip.getParent in Java. > > First what exactly should it return? There are childs of blips (Blips > on the same discussion level in Wave) and responses to a blip (which > are on a lower level in the wave). > How do i distinguish that in the robot API? There is only a > blip.createChild() and a blip.getParent() method. Or is the creation > of a new hierachy not possible from the robot? > > The second problem i have is that i always get just the "blip" with > the headline of the wave as parent back. No matter where in the > discussion the blip is. > Here is my code to that: > > @Override > public void processEvents(RobotMessageBundle bundle) { > Wavelet wavelet = bundle.getWavelet(); > > for (Event e: bundle.getEvents()) { > if(e.getType() == EventType.BLIP_SUBMITTED) > { > Blip blip = e.getBlip(); > TextView textView = blip.getDocument(); > String text = textView.getText(); > if(text.contains("!debug")) > { > if(blip.isParentAvailable()) > { > Blip parent = blip.getParent(); > TextView tv = parent.getDocument(); > tv.append("parent!"); > } > else > blip.getDocument().append("No > Parent"); > } > } > } > } > > And my capabilities.xml: > Here i have no clue what the context actually should contain? i tried > true and parent. did not change anything. > > <?xml version="1.0" encoding="utf-8"?> > <w:robot xmlns:w="http://wave.google.com/extensions/robots/1.0"> > <w:capabilities> > <w:capability name="WAVELET_PARTICIPANTS_CHANGED" /> > <w:capability name="BLIP_SUBMITTED" content="true" > context="truer"/> > </w:capabilities> > <w:version>1</w:version> > </w:robot> -- You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en.
