Changeset 26180 for other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/data/DocumentNodeData.java
- Timestamp:
- 2012-09-12T19:37:39+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/data/DocumentNodeData.java
r15222 r26180 501 501 return ""; // deal with any odd cases 502 502 503 if(!this.nodeMetadata.containsKey("srclink")) 503 String imgMetaFound = ""; 504 String srclinkFile = nodeMetadata.containsKey("srclinkFile") ? (String)((Vector)nodeMetadata.get("srclinkFile")).get(0) : ""; 505 String w = nodeMetadata.containsKey("ImageWidth") ? (String)((Vector)nodeMetadata.get("ImageWidth")).get(0) : ""; 506 String h = nodeMetadata.containsKey("ImageHeight") ? (String)((Vector)nodeMetadata.get("ImageHeight")).get(0) : ""; 507 508 if(this.nodeMetadata.containsKey("srcicon")) { 509 imgMetaFound = "srcicon"; 510 } 511 else if(this.nodeMetadata.containsKey("srclink")) { // old Greenstone 3 512 imgMetaFound = "srclink"; 513 } 514 else { 504 515 return ""; 505 Vector values = (Vector)this.nodeMetadata.get("srclink"); 516 } 517 Vector values = (Vector)this.nodeMetadata.get(imgMetaFound); 506 518 String imgTag = (String)values.get(0); 519 520 if(imgMetaFound.equals("srcicon")) { 521 imgTag = imgTag.replace("[srclinkFile]", srclinkFile); 522 imgTag = imgTag.replace("[ImageWidth]", w); 523 imgTag = imgTag.replace("[ImageHeight]", h); 524 return imgTag; 525 } 526 527 // else deal with srclink in the old Greenstone 3 way: 528 507 529 // now we got <a href="somelink">; extract just the "somelink" portion 508 530 int startindex = imgTag.indexOf('\"');
Note:
See TracChangeset
for help on using the changeset viewer.