Changeset 8925


Ignore:
Timestamp:
2005-01-21T15:12:13+13:00 (19 years ago)
Author:
kjdon
Message:

html now may have _httpcollection_ in img links - we resolve this to teh correct address

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS3MGRetrieve.java

    r8689 r8925  
    187187        // remove any ctrl-c or ctrl-b (I hope these are the right codes)
    188188        doc_content = doc_content.replaceAll("\u0002|\u0003", "");
     189        doc_content = resolveRelativeLinks(doc_content, doc_id);
    189190        // replace _httpimg_ with the correct address
    190191        //doc_content = resolveImages(doc_content, doc_id);
     
    194195        GSXML.addDocText(this.doc, doc, doc_content);
    195196        Element nodeContent = (Element)GSXML.getChildByTagName(doc, "nodeContent");
     197        //Element file_elem = this.doc.createElement("file");
     198        //file_elem.setAttribute("mimeType", "image/jpeg");
     199        //file_elem.setAttribute("href", "import/meinahole.jpg");
     200        //nodeContent.appendChild(file_elem);
    196201        doc_list.appendChild(doc);
    197202    }
     
    199204    return result;
    200205    }
     206    protected String resolveRelativeLinks(String doc_content, String doc_id) {
     207
     208    String http_path  = this.site_http_address + "/collect/"+this.cluster_name;
     209    doc_content = doc_content.replaceAll("_httpcollection_", http_path);
     210    return doc_content;
     211   
     212    }
    201213
    202214}
Note: See TracChangeset for help on using the changeset viewer.