Changeset 30891
- Timestamp:
- 2016-10-20T10:34:50+13:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractGS2DocumentRetrieve.java
r29523 r30891 51 51 * Implements the generic retrieval and classifier services for GS2 collections. 52 52 * 53 * @author Katherine Don54 * @author Michael Dewsnip55 53 */ 56 54 … … 232 230 } 233 231 // we need to get metadata for one or more different nodes 232 // we have a relation root, parent, ancestors, siblings, children, descendents 234 233 String relation = metadata.substring(0, index); 235 234 String relation_id=""; … … 304 303 } 305 304 // unknown relation 306 logger.error("asked for relation "+relation+" and don't understand it."); 307 return null; 305 logger.error("asked for relation "+relation+" and don't understand it, so getting the full metadata name "+relation+GSConstants.META_RELATION_SEP+metadata); 306 // we assume that maybe the metadata has an _ in the name, so get the original name 307 return info.getMultiInfo(relation+GSConstants.META_RELATION_SEP+metadata); 308 308 309 } 309 310 310 // } else {311 // if (relation.equals("parent") || relation.equals("ancestors")) {312 // relation_id = OID.getParent(node_id);313 // if (relation_id.equals(node_id)) {314 // return null;315 // }316 // } else if (relation.equals("root")) {317 // relation_id = OID.getTop(node_id);318 // }319 320 // DBInfo relation_info;321 // if (relation_id.equals(node_id)) {322 // relation_info = info;323 // } else {324 // relation_info = this.coll_db.getInfo(relation_id);325 // }326 // if (relation_info == null)327 // {328 // return null;329 // }330 331 // Vector<String> values = relation_info.getMultiInfo(metadata);332 // // do resolving333 // if (!relation.equals("ancestors")){334 // return values;335 // }336 337 // // ancestors: go up the chain338 339 // String current_id = relation_id;340 // relation_id = OID.getParent(current_id);341 // while (!relation_id.equals(current_id))342 // {343 // relation_info = this.coll_db.getInfo(relation_id);344 // if (relation_info == null)345 // return values;346 347 // Vector<String> more_values = relation_info.getMultiInfo(metadata);348 // if (more_values != null)349 // {350 // values.addAll(0, more_values);351 // }352 353 354 // current_id = relation_id;355 // relation_id = OID.getParent(current_id);356 // }357 // return values; // for now358 // }359 311 360 312 protected Vector<String> getMetaValuesForOID(String oid, String metadata) {
Note:
See TracChangeset
for help on using the changeset viewer.