Revision 8961
Added by ben leinfelder about 10 years ago
src/edu/ucsb/nceas/metacat/annotation/AnnotatorService.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
|
34 | 34 |
String annotatorUrl = null; |
35 |
|
|
35 |
String consumerKey = null; |
|
36 | 36 |
try { |
37 | 37 |
|
38 | 38 |
annotatorUrl = PropertyService.getProperty("annotator.store.url"); |
39 |
|
|
39 |
consumerKey = PropertyService.getProperty("annotator.consumerKey"); |
|
40 |
|
|
40 | 41 |
// skip if not configured to query the annotator-store |
41 | 42 |
if (annotatorUrl == null || annotatorUrl.length() == 0) { |
42 | 43 |
return null; |
43 | 44 |
} |
44 | 45 |
|
46 |
// TODO: query for matching PID only - wasting time iterating over full list |
|
45 | 47 |
//String urlParameters = "pid=" + URLEncoder.encode(pid, "UTF-8"); |
46 |
String urlParameters = "user=leinfelder";
|
|
48 |
String urlParameters = "consumer=" + consumerKey;
|
|
47 | 49 |
|
48 | 50 |
String url = annotatorUrl + "?" + urlParameters; |
49 | 51 |
HttpClient client = new HttpClient(); |
... | ... | |
68 | 70 |
JSONObject row = (JSONObject) rows.get(i); |
69 | 71 |
|
70 | 72 |
// skip this row if it is not about this pid |
71 |
// Bug in annotator-store prevents effective search by pid |
|
73 |
// FIXME: Bug in annotator-store prevents effective search by pid
|
|
72 | 74 |
String pidValue = row.get("pid").toString(); |
73 | 75 |
if (!pidValue.equals(pid)) { |
74 | 76 |
continue; |
Also available in: Unified diff
query by consumerKey until the pid search facets are fully supported on annotateit.org