SynBioDex-archive / libSBOLj

deprecated libSBOL Java library
http://SynBioDex.github.com/libSBOLj
2 stars 0 forks source link

Could Use Method for Returning All Libraries Stored in SBOLservice #34

Closed nroehner closed 13 years ago

nroehner commented 13 years ago

Currently the only way to retrieve libraries from a SBOLservice is via the getLibrary method, which requires the user to know the id of the library they want. Since the user might not know the ids of the libraries, it would be nice to have a method that returns all of the libraries stored in a SBOLservice. Right now it seems that the user would have to parse the library ids out of the original rdf file theirself so that they could call getLibrary (unless they were constructing libraries from GenBank files, in which case it appears that each library would get its own SBOLservice and be assigned "BioFabLib_1" as a default id).

mgaldzic commented 13 years ago

make method to return all of the libraries stored in a SBOLservice. This is a good idea. The alternative would be to only allow one Library, always assume one Library and therefore not ask for the ID. The question to answer is would be, "Will there ever be more than one Library?" This could occur if the way to do merge two sources is to bring two Libraries into a Service and then have some combine method. Or You could have merging done by 1st make 1 new Library and just add all new items from inputs 1 and 2 into the new instance...

nroehner commented 13 years ago

Good point. I personally like the idea of supporting only one Library per rdf file and SBOLservice since it seems cleaner, but at the same time I realize that there's not much difference between supporting one Library per instance and multiple libraries per instance as far as general usefulness goes.

mgaldzic commented 13 years ago

i agree with the part that there is not much difference between supporting one library or multiple ones. And I dont think there is really a great reason not to. At least not one that comes to mind. To solve this issue it seems logical just to provide some discovery method that tells you what Libraries exist. This is something I think we should do for now and then discuss as we gain experience using it.

On Wed, Apr 27, 2011 at 6:23 PM, nroehner reply@reply.github.com wrote:

Good point.  I personally like the idea of supporting only one Library per rdf file and SBOLservice since it seems cleaner, but at the same time I realize that there's not much difference between supporting one Library per instance and multiple libraries per instance as far as general usefulness goes.

Reply to this email directly or view it on GitHub: https://github.com/mgaldzic/libSBOLj/issues/34#comment_1067058

mgaldzic commented 13 years ago

wrote a quick query based method to do this: It's a bit fragile as the new getLibrary() assumes there will be only one library. But for now this is cleaner then before. The query allows the discovery, ie. the user doesnt need any a priori info about the data they are starting to look at. This method may be useful for other objects as well.