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] Prefix to call Annotator

Cátia Machado cmachado at xldb.di.fc.ul.pt
Tue May 21 09:39:13 PDT 2013


Hello again.

Thank you for your previous help.

In the meantime I've been able to solve my issues with a mix of code from
the Java example I found through your Wiki and the HttpClient Quick Start
from Apache. It is working with the current http packages and so I have
attached it in case you want to share it.

However, I still have one question: I want to set the
parameter longestOnly=true, but I received an error message stating that I
cannot do it if either "ontologiesToExpand" or "ontologiesToKeepInResult"
is populated. Since I would rather receive the response with just a few
ontologies, is there any way I can do this?


Thank you,

Cátia M. Machado.


On Fri, May 17, 2013 at 6:56 PM, Trish Whetzel <whetzel at stanford.edu> wrote:

> Hi Cátia,
>
> The Annotator web service call is a POST call and does not return results
> directly from the browser as the GET web service calls do. One method to
> test the call outside of your code is to use the Firefox Add-on called HTTP
> Resource Test [1] or to use CURL from a Terminal window. Attached is a
> screenshot of the HTTP Resource Test Add-on populated with the Annotator
> web service call parameters.  The Annotator signature below "
> http://rest.bioontology.org/obs/annotator" is correct.
>
> Is the text to annotate "cough" the text that is causing your code to
> return the exception?
>
> Trish
>
> [1] https://addons.mozilla.org/En-us/firefox/addon/http-resource-test/
>
>
>
>
>
> On May 17, 2013, at 3:13 AM, Cátia Machado wrote:
>
> Hello.
>
> I have been having problems with the Annotator service that led me to
> doubt if I have the correct prefix. Is it this:
> http://rest.bioontology.org/obs/annotator ?
>
> The problem is that my Java code is resulting in a “*
> org.apache.http.client.HttpResponseException*: Forbidden” exception, and
> so I tested an example in the browser. However, I keep receiving this
> response:
>
> <errorStatus>
>
> <accessedResource>/obs/annotator</accessedResource>
>
> <accessDate>2013-05-14 01:53:48.306 PDT</accessDate>
>
> <shortMessage>Method Not Allowed</shortMessage>
>
> <longMessage>
>
> The method specified in the request is not allowed for the resource
> identified by the request URI
>
> </longMessage>
>
> <errorCode>405</errorCode>
>
> </errorStatus>
>
>
> The last URL I tested was
> http://rest.bioontology.org/obs/annotator?textToAnnotate=cough&ontologiesToKeepInResult=1353&withDefaultStopWords=true&levelMax=999&semanticTypes=&mappingTypes=&wholeWordOnly=true&isVirtualOntologyId=true&apikey=Y<http://rest.bioontology.org/obs/annotator?textToAnnotate=cough&ontologiesToKeepInResult=1353&withDefaultStopWords=true&levelMax=999&semanticTypes=&mappingTypes=&wholeWordOnly=true&isVirtualOntologyId=true&apikey=>ourAPIKey.
> The parameters work, since they were tested in the
> http://bioportal.bioontology.org/annotator webpage.
>
>
>
> Thank you  very much for your help.
>
> Cátia M. Machado
>  _______________________________________________
> 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/20130521/43e32ba2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AnnotatorClient.java
Type: application/octet-stream
Size: 3865 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20130521/43e32ba2/attachment.java>


More information about the bioontology-support mailing list