refactoring DB search code to be independent of UI

git-svn-id: file:///home/svn-repositories/biojava/biojava-live/trunk@10002 7c6358e6-4a41-0410-a743-a5b2a554c398