Sample OBA Java client code

47 views
Skip to first unread message

Samson Tu

unread,
Apr 19, 2012, 1:00:19 PM4/19/12
to annotato...@googlegroups.com
The Commons HttpClient project  is now end of life and is being replaced by  the Apache HttpComponentsproject in its HttpClient and HttpCore modules. Is there any plan to update the sample Java code for OBA client?

Thank you.

With best regards,
Samson 

Trish Whetzel

unread,
Apr 20, 2012, 2:01:29 AM4/20/12
to annotato...@googlegroups.com
Hi Samson,

Thanks for the information. I'll submit a tracker item on this.  Are you able to get the Java code running using the older modules or is this a blocker?

Trish

Samson Tu

unread,
Apr 20, 2012, 2:15:01 AM4/20/12
to annotato...@googlegroups.com
I don't see any place to download the older modules.

Samson

Trish Whetzel

unread,
Apr 20, 2012, 2:52:41 AM4/20/12
to annotato...@googlegroups.com
It looks like the httpclient 3.1 can be downloaded from:
http://archive.apache.org/dist/httpcomponents/commons-httpclient/binary/

This is in the directory from the "archives" link on: http://hc.apache.org/downloads.cgi  .. this link is mentioned in Java sample code section on: http://www.bioontology.org/wiki/index.php/Annotator_Client_Examples#Java_client_example

Trish

Trish Whetzel

unread,
Apr 20, 2012, 8:37:46 AM4/20/12
to annotato...@googlegroups.com
Also, has anyone on the list updated the sample Java code to include the HttpComponents project?

Trish


Samson Tu

unread,
Apr 24, 2012, 2:45:26 PM4/24/12
to annotato...@googlegroups.com
Thanks. I was able to get the archived software for the OBA client.

The OBA documentation emphasizes the need to use the "virtual ontology id." Is the "ontology id" displayed in the Bioportal browser for each ontology a virtual ontology id? (For example, for ICF, the "ontology id" displayed in the ontology browser is 1411. Is that the virtual ID? It would be good if the labeling of ontologies can be made consistent with the documentation on how to use them.

Can one use views of an ontology instead of the ontology as the source of concepts? The OBA interface for annotating short fragments does not allow one to enter views as sources of annotation concepts. The html OBA client  returned an empty set of annotations when I used the "ontology id" of an ICF view.

Thank you.

With best regards,
Samson 

Clement Jonquet

unread,
Apr 25, 2012, 3:44:00 AM4/25/12
to s...@stanford.edu, annotato...@googlegroups.com, sup...@bioontology.org

Hi Sanson,

 

We recommended to use « virtual ontology id » (i.e. an id that do not change across versions) when using the Annotator writing an application that do not care about a specific version. This will free you of going back to your code each time a new version is added to the Annotator backend DB and previous version removed.

 

The important thing is to let the Annotator know that your ontology ids are “virtual ontology id” by activating having the parameter isVirtualOntologyId=true.

 

Concerning the views, as far as I know the ontology views are not grabbed in the backend DB.

In order to avoid having to many annotations generated by the Annotator workflow (also used for the NCBO Resource Index) we have decided in the past to make available only the latest version of ontologies and not views, although it is technically possible. Trish and Ray will confirm if this stamen is still true today.

I am actually building a version of the Annotator using only views. I can update you on this next week if you want (I will be in Stanford for 2 weeks).

 

Clement

 

 

 

 

De : annotato...@googlegroups.com [mailto:annotato...@googlegroups.com] De la part de Samson Tu
Envoyé : mardi 24 avril 2012 20:45
À : annotato...@googlegroups.com
Objet : Re: [ncbo-annotator-users] Sample OBA Java client code

Trish Whetzel

unread,
Apr 25, 2012, 8:26:38 AM4/25/12
to Samson Tu, annotato...@googlegroups.com, support@bioontology.org Support
Hi Samson, 

To confirm, yes "1411" is the "ontology id" sometimes also referred to as the virtual ontology identifier and is listed on the ontology summary page for ICF [1] . I'll update the wiki to make this more clear. 

As of now, ontology views are not processed for use with the Annotator. Can you expand on your use case for using the Annotator with Views?

Trish 



_______________________________________________
bioontology-support mailing list
bioontolo...@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

Trish Whetzel, PhD
Outreach Coordinator
The National Center for Biomedical Ontology

"Like" NCBO on Facebook: http://on.fb.me/bioontology

Follow NCBO on Twitter: http://twitter.com/#!/bioontology

Join in Discussions on LinkedIn: http://linkd.in/ncbo-group

Samson Tu

unread,
Apr 25, 2012, 3:33:08 PM4/25/12
to annotato...@googlegroups.com, Trish Whetzel, Samson Tu, support@bioontology.org Support
On 4/25/2012 5:26 AM, Trish Whetzel wrote:
As of now, ontology views are not processed for use with the Annotator. Can you expand on your use case for using the Annotator with Views?


Two reasons for not wanting to use an original ontology on Bioportal:

1. Want to use variant of the label or preferred name (the current ICF labels include codes)
2. Want to extend the original ontology with additional concepts

It seems that creating an alternative "view" is better than adding a new ontology that is only a variant of the original.

Samson
Reply all
Reply to author
Forward
0 new messages