Creating a new subclass of DataConverter and it associated ConverterTask

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Creating a new subclass of DataConverter and it associated ConverterTask

Sam Hokin-3
Hiya devs. I'm trying to build a new source that differs from the ones we've got available as subclasses of DataConverter
(DBConverter, DirectoryConverter, FileConverter, FullXmlConverter, GFF3Converter, OboConverter). It's not a SQL database, it's not a
directory, it's not a file, it's not an XML, GFF3 or OBO.

It's actually CoGe - the source pulls the genome data over the wire using the CoGe API. No local databases or files.

So I'm stumped on how to make a new DataConverter (CogeConverter) and its calling ConverterTask (CogeConverterTask). I thought I
ought to be able to do that under sources, but I can't figure out how to get the process() method of my CogeConverter (extends
DataConverter) called, because I don't know how to tell integrate/ant to use my CogeConverterTask. Perhaps I need to dig into the IM
core to add this new DataConverter? I've looked at DBConverter and DBConverterTask but I'm still mystified by the man behind the
curtain calling the appropriate ConverterTask.

I don't want to extend an existing (and inappropriate) DataConverter because that wouldn't be the Right Way, and this is a learning
exercise anyway. Help?
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Creating a new subclass of DataConverter and it associated ConverterTask

Sam Hokin-3
I figured it out. imbuild/source.xml ... invent have.coge=true and the other stuff to get the task fired;
bio/core/main/src/org/intermine/bio/task/CogeConverterTask.java;
bio/core/main/src/org/intermine/bio/dataconversion/CogeConverter.java (these seem to have to be in core, not out under sources,
where I guess I could extend them for a very SPECIFIC CoGe data source).

On 03/21/2017 11:55 AM, Sam Hokin wrote:

> Hiya devs. I'm trying to build a new source that differs from the ones we've got available as subclasses of DataConverter
> (DBConverter, DirectoryConverter, FileConverter, FullXmlConverter, GFF3Converter, OboConverter). It's not a SQL database, it's not a
> directory, it's not a file, it's not an XML, GFF3 or OBO.
>
> It's actually CoGe - the source pulls the genome data over the wire using the CoGe API. No local databases or files.
>
> So I'm stumped on how to make a new DataConverter (CogeConverter) and its calling ConverterTask (CogeConverterTask). I thought I
> ought to be able to do that under sources, but I can't figure out how to get the process() method of my CogeConverter (extends
> DataConverter) called, because I don't know how to tell integrate/ant to use my CogeConverterTask. Perhaps I need to dig into the IM
> core to add this new DataConverter? I've looked at DBConverter and DBConverterTask but I'm still mystified by the man behind the
> curtain calling the appropriate ConverterTask.
>
> I don't want to extend an existing (and inappropriate) DataConverter because that wouldn't be the Right Way, and this is a learning
> exercise anyway. Help?
> _______________________________________________
> dev mailing list
> [hidden email]
> https://lists.intermine.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Loading...