- Timestamp:
- 2019-12-04T16:47:25+13:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractGS2DocumentRetrieve.java
r33346 r33750 367 367 // look for metadata refs 368 368 String [] metas = StringUtils.substringsBetween(val, "[", "]"); 369 for (int i=0; i<metas.length; i++) { 370 String meta = metas[i]; 371 String meta_val; 372 // hack for parent(Top). gs2 had lots of other modifiers, but is this the only one that was used in 373 // metadata values?? 374 if (meta.startsWith("parent(Top):")) { 375 String nmeta = meta.substring(12); // or 13? 376 String root_id = OID.getTop(oid); 377 DBInfo root_info = this.coll_db.getInfo(root_id); 378 meta_val = root_info.getInfo(nmeta); 379 } else { 380 meta_val = this_info.getInfo(meta); 381 } 382 if (!meta_val.equals("")) { 383 val = StringUtils.replace(val,"["+meta+"]",meta_val); 384 } 369 if(metas != null) { 370 for (int i=0; i<metas.length; i++) { 371 String meta = metas[i]; 372 String meta_val; 373 // hack for parent(Top). gs2 had lots of other modifiers, but is this the only one that was used in 374 // metadata values?? 375 if (meta.startsWith("parent(Top):")) { 376 String nmeta = meta.substring(12); // or 13? 377 String root_id = OID.getTop(oid); 378 DBInfo root_info = this.coll_db.getInfo(root_id); 379 meta_val = root_info.getInfo(nmeta); 380 } else { 381 meta_val = this_info.getInfo(meta); 382 } 383 if (!meta_val.equals("")) { 384 val = StringUtils.replace(val,"["+meta+"]",meta_val); 385 } 386 } 387 } else { 388 logger.info("@@@@ metas was null. Using val: " + val); 385 389 } 386 390 values.set(j,val);
Note:
See TracChangeset
for help on using the changeset viewer.