Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] Internal server error for programmatic search

Maxwell Neal mneal at u.washington.edu
Thu Dec 19 12:16:16 PST 2013


Hi all,

I am in the process of adapting some existing Java code that I use to programmatically search ontologies in BioPortal.  When I try to open a connection to the following BioPortal REST URL, I get an HTTP 500 error.

http://data.bioontology.org/search?q=brainstem&ontologies=FMA&format=xml&exact_match=0

When I paste the same URL into my browser, I do get a successful search result.

Is this really an error on the BioPortal side, as the HTTP code indicates? (I've included a snippet of my code below, in case it's useful.)

Many thanks,

M


String text = "brainstem";
String bioportalID = "FMA";
SAXBuilder builder = new SAXBuilder();
Document doc = null;
text = text.replace(" ", "+");
URL url = new URL(
	"http://data.bioontology.org/search?q="
		+ text + "&ontologies="
		+ bioportalID + "&format=xml" + "&exact_match=" + exactmatch);				
			
System.out.println(url);
URLConnection yc = url.openConnection();
yc.setReadTimeout(60000); // Timeout after a minute
BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));




---------------------------------
Maxwell Neal

Post-doctoral researcher
Department of Bioengineering
University of Washington
mneal at uw.edu
---------------------------------










More information about the bioontology-support mailing list