Mark,
Actually there are two options for defining GEDs in the component definition code:
1) You can define them inside of component definition represented by an xml as you saw in the sample.
2) You can write an actual java class that does the same thing.
You choose which method you prefer but you need to pick the one.
Should you need more information on either one please let know.
Thanks,
Vlad.