Changeset 32886 for gs3-extensions/iiif-servlet/trunk/src/src/main/java/edu/illinois/library/cantaloupe/resource/iiif/v2
- Timestamp:
- 2019-03-08T13:59:41+13:00 (5 years ago)
- Location:
- gs3-extensions/iiif-servlet/trunk/src/src/main/java/edu/illinois/library/cantaloupe/resource/iiif/v2
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/iiif-servlet/trunk/src/src/main/java/edu/illinois/library/cantaloupe/resource/iiif/v2/GSImageResource.java
r32877 r32886 36 36 import java.util.Set; 37 37 38 import org.greenstone.gsdl3.IIIFServerBridge;39 40 38 /** 41 39 * Handles IIIF Image API 2.x image requests. … … 46 44 public class GSImageResource extends IIIF2Resource { 47 45 48 protected Source createSource(Identifier identifier) throws Exception49 {50 String identifier_str = identifier.toString();51 String[] strs = identifier_str.split(":", 3);52 if(strs == null || strs.length < 3) {53 System.err.println("identifier is not in the form site:coll:id" + identifier_str);54 return null;55 }56 String site_name = strs[0];57 String coll_name = strs[1];58 String doc_id = strs[2];59 60 // Move into Constructor ???61 IIIFServerBridge gs_iiif_bridge = new IIIFServerBridge();62 // and keep cache of of bridges in hashmap, keyed on sitename??63 gs_iiif_bridge.init(site_name);64 65 String collect_image_filename = gs_iiif_bridge.doGetDocumentMessage(coll_name + ":" + doc_id);66 String site_image_filename = site_name + "/collect/" + coll_name + "/index/assoc/" + collect_image_filename;67 68 System.err.println("**** Greenstone site image filename = " + site_image_filename);69 70 final Identifier identifier_image = new Identifier(site_image_filename);71 System.err.println("***** identifier_image = " + identifier_image);72 73 final Source source = new SourceFactory().newSource(identifier_image, getDelegateProxy());74 75 System.err.println("***** source path = " + ((edu.illinois.library.cantaloupe.source.FileSource)source).getPath());76 77 return source;78 }79 46 80 47 /** … … 143 110 } 144 111 145 final Source source = createSource(identifier); 146 //final Source source = new SourceFactory().newSource( 147 // identifier, getDelegateProxy()); 112 final Identifier identifier_image = IdentifierToGSAssocfile.createIdentifierImage(identifier); 113 final Source source = new SourceFactory().newSource(identifier_image, getDelegateProxy()); 114 115 //System.err.println("***** source path = " + ((edu.illinois.library.cantaloupe.source.FileSource)source).getPath()); 148 116 149 117 // If we are resolving first, or if the source image is not present in -
gs3-extensions/iiif-servlet/trunk/src/src/main/java/edu/illinois/library/cantaloupe/resource/iiif/v2/GSInformationResource.java
r32875 r32886 27 27 import org.restlet.resource.Get; 28 28 29 import org.greenstone.gsdl3.IIIFServerBridge; 29 //import org.greenstone.gsdl3.IIIFServerBridge; // **** 30 30 31 31 /** … … 88 88 } 89 89 } 90 90 91 final Identifier identifier_image = IdentifierToGSAssocfile.createIdentifierImage(identifier); 92 final Source source = new SourceFactory().newSource(identifier_image, getDelegateProxy()); 93 /* 91 94 String identifier_str = identifier.toString(); 92 95 String[] strs = identifier_str.split(":", 3); … … 115 118 System.err.println("***** identifier_image = " + identifier_image); 116 119 System.err.println("***** source path = " + ((edu.illinois.library.cantaloupe.source.FileSource)source).getPath()); 120 */ 117 121 118 122 // If we are resolving first, or if the source image is not present in
Note:
See TracChangeset
for help on using the changeset viewer.