Changeset 3995


Ignore:
Timestamp:
2003-03-26T12:10:12+12:00 (21 years ago)
Author:
kjdon
Message:

path for resolving images now based of site_http_address_

File:
1 edited

Legend:

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

    r3990 r3995  
    628628    protected abstract Element processDocumentContentRetrieve(Element request);
    629629
    630 
     630    /** needs to get info from gdbm database - if the calling code gets it already it may pay to pass it in instead */
    631631    protected String resolveImages(String doc_content, String doc_id)
    632632    {
    633     // System.out.println("(Resolving images): Document content:\n" + doc_content);
    634     File siteConfigFile = new File(GSFile.siteConfigFile(site_home_));
    635     Element siteConfig = converter_.getDOM(siteConfigFile).getDocumentElement();
    636     Element httpAddress = (Element) GSXML.getChildByTagName(siteConfig, "httpAddress");
    637     String httpAddressString = httpAddress.getAttribute(GSXML.VALUE_ATT);
    638     System.out.println("HTTP address string: " + httpAddressString);
    639     System.out.println("Collection name: " + cluster_name_);
    640 
    641     String image_dir = httpAddressString + "/sites/localsite" +
    642         "/collect/" + cluster_name_ + "/index/assoc/" + doc_id.substring(0, 8) + ".dir";
    643     System.out.println("Image dir: " + image_dir);
     633    String top_doc_id = OID.getTop(doc_id);
     634    DBInfo info = gdbm_src_.getInfo(top_doc_id);
     635    String assocfilepath = info.getInfo("assocfilepath");
     636    String image_dir  = site_http_address_ + "/collect/"+cluster_name_+"/index/assoc/"+assocfilepath;
    644637
    645638    // Resolve all "_httpdocimg_"s
Note: See TracChangeset for help on using the changeset viewer.