Archive for the ‘Refind’ Category.
On May 27 the TING project announced version 0.4 Beta for their brÃ¸nd.TING software (which is more or less intended to be a shared data warehouse for the Danish community libraries). The fantastic thing about this release is that they also made a search API available apparently in both SOAP/XML and REST/JSON, and with documentation. Although, I was only able to find the SOAP/XML webservice, and not the REST/JSON one, and no documentation (only five request examples).
But never mind the minor details. It was easy enough to find the WSDL file, so off I went.
At Refind we have already made a small showcase of a search interface on top of Summa, so the plan was to see how easy it would be to rip out Summa, and replace it with brÃ¸nd.TING. The result of that little experiment can be seen here: Refind.demo.TING.
Read on for the exciting (somewhat technical) adventures of me getting things in place for the demo to work.
The first thing I did was naturally to try an generate some stubs based on the WSDL file. However both axis and jax-ws failed to parse the file. And since I couldn’t find out anything about the REST service, I had to figure out a way to hack around the SOAP and WSDL problems. Luckily the brÃ¸nd.TING example requests were simply posted through a form, so after poking around a bit I found out that I could simple make my own SOAP Envelope and submit it to a specific url, and then I could call the search method. You might even say that it was kinda RESTy…
So now that I had figured out a way to actually interact with the service it didn’t take more than a few minutes to get a copy of the showcase website ported to this new service. A few things had to be cut along the way, such as the todo list functionality, since (as far as I can tell at least) there is no way to access individual records through brÃ¸nd.TING – everything has to be done as a search, and the single records have no exposed id.
After getting both the short format and the facets up and running in the new site I started playing around with some queries, and noticed the first odd thing. The record count that the facet system returns seems to assume that query parts get AND’ed together but that default operator for searching is OR. Nothing that can’t be handled by explicitly constructing queries with AND, but for the sake of simplicity and consistency it may be worth considering changing the default to AND.
And another thing about the facet system is that the counts (even when using AND) are often a bit off. Not by much – just a few records. But it sure is confusing the heck out of me.
It is of course entirely possible that I am completely misusing the APIs and that I have totally misunderstood how the searching is supposed to work. If anyone has any experience with brÃ¸nd.TING feel free to contact me.
A truly great thing about the TING project is that they have a really great policy about Open Source and Open Content. So when the 0.4 release happened I also went looking for the source – however I did not find anything. It is of course entirely possible that I just overlooked it, but for a project that has put such an emphasis on openness you would think they would make sure that their source was to find and easy to download. The release announcement said that it should be available on the wiki and in the svn repository – neither of which I could find. Perhaps it will just be made available later on? Remember “Release early, release often”.
Looking beyond the problems I have faced, the TING project does have a lot of potential – not the least of which is bringing openness and unity of data to the public libraries in Denmark.