[MOBY-dev] createInstanceFromDOM

Sylvie Huchet sylvie.huchet at enst-bretagne.fr
Wed Feb 13 08:05:14 UTC 2008


Hi Paul,

Below is the XML file containing the parameters I want to send to a Biomoby service.
With this XML file, I created a DOM object that I use to create a
MobyContentInstance (this mobycontentInstance should then be used to fill the
data field of a mobyRequest).
As the simple parameter contains data of a wrong type, I thought I could catch a
MOBYException during the MobycontentInstance constructor call. But the inner
MobyDatacomposite constructor throws a NullPointerException.

Thanks for hour help,
Sylvie.


<?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:Simple moby:articleName="alignment">
        <moby:aWrongType xmlns:moby="http://www.biomoby.org/moby" moby:id=""
moby:namespace="">
          <moby:String moby:id="" moby:namespace="" moby:articleName="content">8
   6
Alpha1    AAGAAG
Alpha2    AAGAAG
Beta1     AAGGGG
Beta2     AAGGGG
Gamma1    AGGAAG
Gamma2    AGGAAG
Delta     GGAGGA
Epsilon   GGAAAG
          </moby:String>
        </moby:aWrongType>
      </moby:Simple>
      <moby:Parameter moby:articleName="outgroup_root">
	<moby:Value>no</moby:Value>
      </moby:Parameter >
      <moby:Parameter moby:articleName="howoften">
        <moby:Value>100</moby:Value>
      </moby:Parameter >
      <moby:Parameter moby:articleName="numgroups">
	<moby:Value>1000</moby:Value>
      </moby:Parameter >
      <moby:Parameter moby:articleName="simple">
	<moby:Value>no</moby:Value>
      </moby:Parameter >
      <moby:Parameter moby:articleName="threshold">
	<moby:Value>1.0</moby:Value>
      </moby:Parameter >
      <moby:Parameter moby:articleName="outgnum">
	<moby:Value>1</moby:Value>
      </moby:Parameter >
    </moby:mobyData>
  </moby:mobyContent>
</moby:MOBY>	

gordonp at ucalgary.ca a écrit :
> Hi Sylvie,
> 
>  If you send me the example XML, that will help me determine the issue. 
> It should be able to parse the data, even if the datatypes are not in the
> ontology.
> 
> Regards,
> 
> Paul
> 
> If you could send the example file to me, it would
> 
> 
>>Hi,
>>
>>I would like to create a biomoby instance from a file that contains data.
>>
>>The data file is an XML file that comply (or should comply) with biomoby
>>format.
>>I thought that if the file contained a data type that is not a biomoby
>>data type
>>(doesn't belong to the object ontology), the createInstanceFromDOM method
>>would
>>throw an exception, but that is not the case. A NullPointerException is
>>thrown
>>by an inner method (MobyDatacomposite constructor).
>>
>>Should I use another method to check that the data type present in the
>>data file
>>is correct or is it a problem with createInstanceFromDOM that should throw
>>an
>>exception ?
>>
>>Thanks, and
>>Best regards,
>>Sylvie.
>>
>>
>>!DSPAM:60005,47b1bec010950204642575!
>>_______________________________________________
>>MOBY-dev mailing list
>>MOBY-dev at lists.open-bio.org
>>http://lists.open-bio.org/mailman/listinfo/moby-dev
>>
>>
>>!DSPAM:60005,47b1bec010950204642575!
>>
> 
> 
> 
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sylvie.huchet.vcf
Type: text/x-vcard
Size: 215 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/moby-dev/attachments/20080213/436bf150/attachment-0002.vcf>


More information about the MOBY-dev mailing list