Project

General

Profile

« Previous | Next » 

Revision 8717

add test for BioPortal annotator service.

View differences:

BioPortalService.java
30 30
	 * @param text
31 31
	 * @return
32 32
	 */
33
	public static Resource lookupAnnotationClass(OntClass superClass, String text) {
33
	public static Resource lookupAnnotationClass(OntClass superClass, String text, String ontologies) {
34 34
		
35 35
		try {
36 36
			
37 37
			String urlParameters = "apikey=" + API_KEY;
38 38
			urlParameters += "&format=xml";
39
			urlParameters += "&ontologies=OBOE-SBC";
40
//			urlParameters += "&ontologies=SWEET";
39
			if (ontologies != null) {
40
				urlParameters += "&ontologies=" + ontologies;
41
			}
41 42
			urlParameters += "&text=" + URLEncoder.encode(text, "UTF-8");
42 43
			
43 44
			String url = REST_URL + "/annotator?" + urlParameters ;

Also available in: Unified diff