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] java.io.FileNotFoundException: http://data.bioontology.org/ontologies/NCIT/classes/http%3A%2F%2Fncicb.nci.nih.gov%2Fxml%2Fowl%2FEVS%2FThesaurus.owl%23C90069

Darren Weber dlweber at stanford.edu
Fri Feb 28 14:26:32 PST 2014


Results are available in the browser (at present), e.g.

http://data.bioontology.org/ontologies/NCIT/classes

Try adding an explicit accept header to the request.  We've noticed java 
defaults are not accepted in the new REST API.

-- Darren


PS,  Here’s a discussion between Android devs with reference to an 
accept header bug the Java implementation. They indicate Sun/Oracle 
suffers from the same issue:
https://code.google.com/p/android/issues/detail?id=5843




On 2/28/14, 12:41 PM, Mona Salem wrote:
>
> *Hi All***
>
> *I am getting the following error:*
>
> **
>
> java.io.FileNotFoundException: 
> http://data.bioontology.org/ontologies/NCIT/classes/http%3A%2F%2Fncicb.nci.nih.gov%2Fxml%2Fowl%2FEVS%2FThesaurus.owl%23C90069
>
>             at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
>
>             at TextAnnotation.get(TextAnnotation.java:102)
>
>             at TextAnnotation.stringToAnnotate(TextAnnotation.java:51)
>
>             at sitemapParser.getAllUrlNames(sitemapParser.java:163)
>
>             at sitemapParser.main(sitemapParser.java:682)
>
> com.fasterxml.jackson.databind.JsonMappingException: No content to map 
> due to end-of-input
>
>  at [Source: java.io.StringReader at 1ff2b382 
> <mailto:java.io.StringReader at 1ff2b382>; line: 1, column: 1]
>
> **
>
> **
>
> *I am calling *stringToAnnotate* method from my code, (no hierarchies 
> req’d):*
>
> public class TextAnnotation {
>
>     static final String REST_URL = "http://data.bioontology.org";
>
>     static final String API_KEY = "";
>
>     static final ObjectMapper mapper = new ObjectMapper();
>
>     public void stringToAnnotate(String abstractInfo, Model model2, 
> String URLaddress) throws UnsupportedEncodingException {
>
>         String textToAnnotate = URLEncoder.encode(abstractInfo, 
> "UTF-8");  //1-31 UTF-8 changed
>
> Resource SoftwareProduct = model2.createResource(URLaddress);
>
>        JsonNode annotations = jsonToNode(get(REST_URL + 
> "/annotator?ontologies=NCIT&text=" + textToAnnotate));
>
>       for (JsonNode annotation : annotations) {
>
>             JsonNode classDetails = 
> jsonToNode(get(annotation.get("annotatedClass").get("links").get("self").asText()));
>
>  SoftwareProduct.addProperty(AnnotationLabel, 
> classDetails.get("prefLabel").asText());
>
> //System.out.println("\tontology: " + 
> classDetails.get("links").get("ontology").asText());
>
>            // System.out.println("\n");
>
>         }
>
>     }
>
> }
>
> Thanks for any help
>
> Mona Nafoosi
>
> G6G Consulting Group
>
> Santa Monica CA
>
>
>
> _______________________________________________
> bioontology-support mailing list
> bioontology-support at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/bioontology-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20140228/3f9d5c2a/attachment-0001.html>


More information about the bioontology-support mailing list