[MOBY-dev] [MOBY-l] getting the value for a relationship

Pieter Neerincx Pieter.Neerincx at wur.nl
Fri Aug 10 11:41:00 UTC 2007


Hi Andreas,

I use the Perl libs and I'm not familiar with the Java version. So I  
don't how to get the text content from an XML node, but I do spot  
another potential problem with the XML below:

The cross references inside the CrossReference node should be either  
a base Object object:

	<moby:Object moby:id='' moby:namespace='' articleName=''/>

or an Xref object:

	<Xref namespace='' id='' authURI='' serviceName='' evidenceCode=''  
xrefType=''>
		... Description ...
	</Xref>

Note that according to the API the Xref object can have parsed  
character data (PCDATA) alias content in addition to several  
attributes, but an Object object can not. Only the 5 primitives  
(String/Float/Integer/DateTime/Boolean) and the Xref object are  
allowed to have PCDATA. In your example below the Object objects in  
the cross reference information block (CRIB) do have PCDATA. The  
beauty of XML is that this little bit of extra data should and will  
not break any parsers, but do realise that other clients and/or  
services and/or BioMOBY libraries will not expect PCDATA in an Object  
object, so they will most likely ignore it...

You should be able though to get the "ATP-dependent helicase  
activity" PCDATA from the String object... I hope one of the Java  
gurus can answer that question.

Cheers,

Pi



On 10-Aug-2007, at 9:45 AM, Andreas Groscurth wrote:

> Hi all,
>
> I have the following service result
>
> <moby:GO_Term moby:id="GO:0008026" moby:namespace="GO">
> 	<moby:CrossReference>
>             	 <moby:Object moby:id="RCA" moby:namespace="GO_Evidence">
> 			evidence code for the relationship</moby:Object>
>               	<moby:Object moby:id="501714663"
> 			 moby:namespace="TAIR_Accession">
> 				reference TAIR accession for the relationship</moby:Object>
> 	</moby:CrossReference>
>         <moby:String moby:id="" moby:namespace=""
> 		 moby:articleName="Term">ATP-dependent helicase activity</ 
> moby:String>
> </moby:GO_Term>
>
> I'm able to retrieve all informations via Java except the value of  
> 'Term'
>
> I have my MobyDataObject and extract the CrossReferences via
> getCrossReferences.
> getChildren return the MobyRelationship but I'm only able to say  
> thats a
> string and 'Term' ...
>
> how do I get the actual value of that element ?
>
> thanks
> andreas
>
> -- 
> Andreas Groscurth
> Diplom Bioinformatik - PhD Student
> Max Planck Institute for Plant Breeding Research
> Carl-von-Linné-Weg 10
> 50829 Cologne
> Germany
> E-mail:    groscurt at mpiz-koeln.mpg.de
> Phone:    +49(0)221-5062-447
>
> _______________________________________________
> moby-l mailing list
> moby-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-l

-------------------------------------------------------------
Wageningen University and Research centre (WUR)
Laboratory of Bioinformatics
Transitorium (building 312) room 1034

Dreijenlaan 3
6703 HA Wageningen
The Netherlands

phone:  0317-483 060
fax: 0317-483 584
mobile: 06-143 66 783
mail: pieter.neerincx at wur.nl
skype: pieter.online
------------------------------------------------------------





More information about the MOBY-dev mailing list