Sample code for Model Learner

Hi,

I am trying to develop a new PP component that learns a model (similar to the components in the "Data Modeling - Learners" category).

I noticed that these learner components create a new model component on the user tab under "Learned Properties".

Can anyone point me to sample code on how to do that (preferrably Java) or to the relevant APIs?

Specifically, how can I create a new component on the fly from another component?

Thanks for any pointers.

Christian