From: Bob M. <r.m...@im...> - 2007-06-29 15:42:29
|
Hi all, I don't know if this list accepts tar.gz attachments, but I've attached a very preliminary skeleton of our BASE2 Simple Object Layer (b2sol) which is what we will use for generating data summaries for the www and generating biomart datasets. If anyone has time to look over it and make suggestions we'd be very grateful (it's only a handful of classes - start with test/testClass.java). Here are some basic features/design concepts that might not be instantly seen in the code. It might be of interest to the "coarser API" people. 1. all access is made through a single SessionControl which is logged in as a 'guest' readonly BASE user - the idea is that we only care about public data for 99% of what we do. in the future we hope that the Session class might be able to log in as different users depending on the context of the call (cookies?) - I'm guessing this is possible because a similar thing is done in the webservices branch: http://base.thep.lu.se/browser/branches/webservices/src/webservices/server/net/sf/basedb/ws/server/AbstractRPCService.java all base queries will be have Include.SHARED added by default. 2. All our objects (so far) "have a" BASE object (bo) 3. The code for dealing with actual data isn't there yet, but when it is, it will only handle 'final' bioassaysets (which have been annotated as such by the base admin) - though we might also handle raw data. The idea here is that the many intermediate steps of a normalisation/quality control/analysis pipeline are of no interest to 99% of people. 4. We'll probably add shortcuts to BASE's getName(), getId(), getDescription() etc in SimpleObject.java to remove the majority of *.baseobj().* from client code, since there's no equivalent to Perl's AUTOLOAD in Java ;-) (that I know of) 5. I thought about extending the BASE2 classes directly, but ran into problems (I think Hibernate was complaining that it didn't know what to do with the new classes, but I didn't fully understand why it didn't work). 6. This API is not designed to be efficient for heavy duty use (i.e. with ReporterBatchers and so on). 7. We obviously have to sort out some kind of config file. 8. We're keen for this to be a public project (offical BASE or otherwise), but would like someone else to work on the areas we're not touching (LIMS for example). Any comments gratefully received! cheers, Bob. To run the code, simply edit build.xml to point to your BASE lib and classes directories, edit the base login info in Session.java, edit the reporter and array names in testClass.java and finally run "ant test" |