Setting data loader properties

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting data loader properties

Michael O'Keefe
Hello everyone,

I'm working on a source to load data from a SQL database into InterMine. I'd like to be able to pass the data conversion Java file a configuration value by setting a property in the source in the mine's project.xml file. Is this possible? If so, could someone point me in the right direction as to how to accomplish this?

Thank you very much,
Michael O'Keefe
[hidden email]

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Setting data loader properties

Julie Sullivan
Hi Michael,

Yes!  Values you set in the project XML file are available in your data
converter via setters as a String.

For instance, the BioGRID source for FlyMine has this value in the project XML
(flymine/project.xml) file:

     <source name="biogrid" type="biogrid">
       ...
       <property name="biogrid.organisms" value="7227 6239 4932"/>
     </source>

That value is made available as a String in the BioGRID converter
(bio/sources/biogrid/main/src/org/intermine/bio/dataconversion) and accessed via:

        BioGridConverter.setBiogridOrganisms(String taxonIds);

Another example - UniProt has several properties that are set:

     <source name="uniprot" type="uniprot">
       <property name="uniprot.organisms" value="7227 6239 7165"/>
       <property name="createinterpro" value="true"/>
     </source>

And parsed via these methods in the data converter:

     public void setCreateinterpro(String createinterpro);
     public void setUniprotOrganisms(String taxonIds);

Does that answer your question?  Let me know if that doesn't work for you!

Cheers,
Julie

On 07/08/2011 03:56 PM, Michael O'Keefe wrote:

> Hello everyone,
>
> I'm working on a source to load data from a SQL database into InterMine. I'd
> like to be able to pass the data conversion Java file a configuration value
> by setting a property in the source in the mine's project.xml file. Is this
> possible? If so, could someone point me in the right direction as to how to
> accomplish this?
>
> Thank you very much,
> Michael O'Keefe
> [hidden email]
>
>
>
>
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Setting data loader properties

Michael O'Keefe
Hello Julie,

Thank you very much! Your suggestion worked exactly as I hoped it would, and was much appreciated.

Thank you again,
Michael O'Keefe
[hidden email]

On Mon, Jul 11, 2011 at 6:46 AM, Julie Sullivan <[hidden email]> wrote:
Hi Michael,

Yes!  Values you set in the project XML file are available in your data converter via setters as a String.

For instance, the BioGRID source for FlyMine has this value in the project XML (flymine/project.xml) file:

   <source name="biogrid" type="biogrid">
     ...
     <property name="biogrid.organisms" value="7227 6239 4932"/>
   </source>

That value is made available as a String in the BioGRID converter (bio/sources/biogrid/main/src/org/intermine/bio/dataconversion) and accessed via:

       BioGridConverter.setBiogridOrganisms(String taxonIds);

Another example - UniProt has several properties that are set:

   <source name="uniprot" type="uniprot">
     <property name="uniprot.organisms" value="7227 6239 7165"/>
     <property name="createinterpro" value="true"/>
   </source>

And parsed via these methods in the data converter:

   public void setCreateinterpro(String createinterpro);
   public void setUniprotOrganisms(String taxonIds);

Does that answer your question?  Let me know if that doesn't work for you!

Cheers,
Julie


On 07/08/2011 03:56 PM, Michael O'Keefe wrote:
Hello everyone,

I'm working on a source to load data from a SQL database into InterMine. I'd
like to be able to pass the data conversion Java file a configuration value
by setting a property in the source in the mine's project.xml file. Is this
possible? If so, could someone point me in the right direction as to how to
accomplish this?

Thank you very much,
Michael O'Keefe
[hidden email]




_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev