[MOBY-dev] Javadoc down ?

Paul Gordon gordonp at ucalgary.ca
Mon Mar 29 15:49:55 UTC 2010


Hi Pierre,

Unfortunately, no.  There are two ways to create data in Moby: using the 
generated classes (as you are doing), and generic classes (those in 
org.biomoby.shared.data).  You cannot mix the two (since the generated 
classes do not inherit from MobyData).  Maybe Eddie can help you with 
the generated classes? If you want to just use the generic classes, the 
code would look something like this:

/* Find the service */
Central central = new CentralImpl();
MobyService templateService = new MobyService("MyServiceName");
MobyService[] validServices = central.findService(templateService);

/* Prepare the input */
MobyDataType markerType = central.getDataType("GeneticMarker");
MobyDataObjectSet gmCollection = new MobyDataObjectSet();  // a collection
for(/* loop over your native marker info set */){
    gmCollection.add(new MobyDataComposite(markerType, null, null, 
fieldName1, fieldValue1, fieldName2, fieldValue2...)); // create the 
collection members
}
MobyContentInstance request = new MobyContentInstance(gmCollection, 
"myServiceParamName"); // build a request envelope

/* Call the service */
MobyRequest requester = new MobyRequest(central);  // the thing that 
calls Moby services
requester.setService(validServices[0]);
MobyContentInstance response = requester.invokeService(request);  
//synchronous call to service

I don't see GeneticMarker in the Object registry, so I can't give you 
more specific info on the MobyDataComposite c-tor...

Regards,

Paul

Pierre-Yves Chibon wrote:
> Thanks for pulling up the javadoc.
>
> On Mon, 2010-03-29 at 08:27 -0600, Paul Gordon wrote:
>   
>> A MobyDataComposite?  This holds anything that is not a primitive 
>> datatype...
>>     
> I am looking at this object but I have a collection of GeneticMarker:
> java.lang.Object
>   extended byorg.biomoby.shared.datatypes.MobyObject
>       extended byorg.biomoby.shared.datatypes.Marker
>           extended byorg.biomoby.shared.datatypes.GeneticMarker
>
> I am trying to put it in a MobyDataComposite, but this one only accepts 
> MobyDataType (and not MobyObject). Then I will put these collection of 
> MobyDataComposite into an vector of MobyDataInstance to be sent to the service.
> Am I doing this correctly ?
>
> Thanks,
> Pierre
>
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev
>
>
>   



More information about the MOBY-dev mailing list