[MOBY-dev] [Fwd: Re: Problems with parsing a service result]
Paul Gordon
gordonp at ucalgary.ca
Wed Oct 17 13:38:41 UTC 2007
Never mind, I am smoking crack. Didn't check to see that Global_Keyword
has no child elements.
MobyDataComposite comp = MobyDataComposite("Global_Keyword",
"unimportant_article_name", "namespace_if_any", "superman");
-------- Original Message --------
Subject: Re: [MOBY-dev] Problems with parsing a service result
Date: Wed, 17 Oct 2007 07:26:21 -0600
From: Paul Gordon <gordonp at ucalgary.ca>
To: Core developer announcements <moby-dev at lists.open-bio.org>
References:
<47508.195.37.46.22.1192618925.squirrel at mpizmail.mpiz-koeln.mpg.de>
<001001c810c0$4c197080$6400a8c0 at notebook>
No, the problem is that MobyDataObject is ONLY for base Object (as it
says several times in the Java docs :-))
You're using a composite that happens to only have one member.
Composites implement the Java Map<String,MobyDataObject> interface to
get/set members:
MobyDataComposite comp = MobyDataComposite("Global_Keyword");
comp.put("keyword", new MobyDataString("superman"));
> Hi Andreas,
>
> Should
>
> new MobyDataObject( "Global_Keyword", "superman" ) );
>
> really be
>
> new MobyDataObject( "Global_Keyword", "keyword" ) ); ??
>
> Eddie
>
>
>> -----Original Message-----
>> From: moby-dev-bounces at lists.open-bio.org
>> [mailto:moby-dev-bounces at lists.open-bio.org] On Behalf Of
>> groscurt at mpiz-koeln.mpg.de
>> Sent: Wednesday, October 17, 2007 4:02 AM
>> To: moby-dev at lists.open-bio.org
>> Subject: [MOBY-dev] Problems with parsing a service result
>>
>> Hi all,
>>
>> i want to retrieve the results for the service:
>>
>> get_agi_code_by_keyword/mpiz-koeln.mpg.de
>>
>> it returns a collection of Descriptors for a given keyword.
>>
>> Using the dashboard i retrieve a result (e.g. with keyword superman)
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <moby:MOBY xmlns:moby="http://www.biomoby.org/moby">
>> <moby:mobyContent>
>> <moby:mobyData moby:queryID="sip_1_">
>> <moby:Collection moby:articleName="agi_locus_code">
>> <moby:Simple>
>> <moby:Descriptor moby:id="AT3G23130"
>> moby:namespace="AGI_LocusCode">
>> <moby:String moby:id="" moby:namespace=""
>> moby:articleName="description">SUP (SUPERMAN); DNA binding /
>> nucleic acid binding / transcription factor/ zinc ion
>> binding</moby:String>
>> </moby:Descriptor>
>> </moby:Simple>
>> </moby:Collection>
>> </moby:mobyData>
>> </moby:mobyContent>
>> </moby:MOBY>
>>
>> using the simple java client
>>
>> MobyService agiService = new MobyService();
>> agiService.setCategory( "" ); agiService.setAuthority(
>> "mpiz-koeln.mpg.de" ); agiService.setName(
>> "get_agi_code_by_keyword" ); agiService =
>> central.findService( agiService )[0]; MobyRequest request =
>> new MobyRequest( central ); request.setService( agiService );
>> request.setInput( new MobyDataObject( "Global_Keyword",
>> "superman" ) ); MobyContentInstance contentInstance =
>> request.invokeService(); MobyDataJob mobyJob =
>> contentInstance.get(
>> contentInstance.keySet().iterator().next() );
>> MobyDataInstance[] dataInstances = mobyJob.getPrimaryData();
>>
>> the dataInstance contains nothing :-(:-( (dataInstances.length = 0)
>>
>> the simple java client works for other services, but fails
>> for this one...
>>
>> does anybody know what is wrong ?
>>
>> thanks
>> andreas
>>
>> _______________________________________________
>> MOBY-dev mailing list
>> MOBY-dev at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/moby-dev
>>
>
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev
>
> !DSPAM:60005,47160a092601617573718!
>
>
>
>
More information about the MOBY-dev
mailing list