Carl Mäsak wrote:
> Nicklas (>), Carl (>>):
>>> I've now come far enough with my BASE2 web services client in
>>> Bioclipse that I dare show it to the eventual end user. Due to this, I
>>> have a couple of more specific questions:
>>>
>>> * How do I get the name of a data file contained in a RawBioAssay?
>> You can't with the current web services implementation. It should not be
>> hard to add support for it though. Contributions are welcome.
> 
> And gladly given. I'm looking at the ws client/server code now,
> thinking of how to add the functionality. In relation to this, I have
> a few questions/opinions, stemming mainly from my unfamiliarity with
> the data model.
> 
> * Why DataFileTypeInfo? Being mainly interested in the data files
> themselves (just as I am interested in projects, experiments and
> assays), I wonder why the queries concern the data file types and not
> the files themselves. There's probably a good reason, but I don't see
> it -- especially if you can only have one file of each type.


The use case we had to solve was to "download the CEL and CDF files used 
in an experiment". To be able to do that you need to know the file 
types. And since we are now trying to support other platforms than 
Affymetrix there may very well be other types of files present in BASE. 
That is the reason that you have to use the DataFileTypeInfo item.


> 
> To me it seems like I'm interested in the middle step in this chain:
> 
>   file type -> file -> file contents
> 
> But the current data model looks like this:
> 
>   file type -> file contents
> 
> * Having a DataFileInfo would benefit my webservices client in two
> ways: firstly DataFileInfo.getName() would naturally map to a file
> name like "3T315.CEL", whereas the current DataFileTypeInfo.getName()
> maps to "CEL file". The latter is not useful to me. Is it to someone
> else? (Though I agree, of course, that it's the natural choice for a
> "name" property on a file type.)

I think the type of file is more important than the actual name of the file.

> 
> * Secondly, it would make the API for downloading a file easier.
> Instead of writing something like this with DataFileTypeInfo:
> 
>  <http://pastebin.com/mdadc5f2>
> 
> I could write something like this with the (conjectural) class DataFileInfo:
> 
>  <http://pastebin.com/mdf451ba>

But you would not know what kind of file you have downloaded with this code.


> Since I suspect that good reasons underlie the choice of
> DataFileTypeInfo in favour of something like DataFileInfo, I'm
> thinking of where best to put the methods I want, and also whether or
> not it would be a good idea to introduce something like DataFileInfo.

It should be FileInfo, since you should just add "Info" to the core 
class name. It might also be useful to also have FileSetMemberInfo. The 
FileSetMember may have some information about if the file has been 
validated or not.

> I'm still willing to implement the things myself, but design guidance
> would be much appreciated.

Well, it is hard to give much advice in this case. You'll need an *Info 
class to hold the information that is going to be sent with the web 
service. The hard part is to decide what properties should go in here. 
The general rule is that only "simple" values, like numbers and strings 
should be added.

You may need a *Service class and a *Client class. If we get a FileInfo 
class it would certainly be useful to have a FileService class as well. 
It should at least have a getById() method and a getFiles() method and a 
download() method. You can check the other service classes.

/Nicklas


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
basedb-devel mailing list
basedb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/basedb-devel

Reply via email to