Ignore:
Timestamp:
2005-02-24T16:53:12+13:00 (19 years ago)
Author:
kjdon
Message:

added in doc content retrieval

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/colservr/lucenegdbmsource.cpp

    r8027 r9175  
    2828#include "OIDtools.h"
    2929#include "gsdltools.h"
    30 
     30#include "expat_document.h"
    3131
    3232lucenegdbmsourceclass::lucenegdbmsourceclass () {
     
    313313
    314314  outconvertclass text_t2ascii;
    315 
    316315  err = noError;
    317316  if (gdbmptr == NULL) {
     
    341340  if (!gdbmptr->getinfo(tOID, info)) return false;
    342341 
    343   if (info["hastxt"].getint() == 1) {
    344     int docnum = info["docnum"].getint();
    345    
    346     // set the collection directory
    347     textsearchptr->setcollectdir (collectdir);
    348    
    349     // get the text
    350     textsearchptr->docTargetDocument(defaultindex, defaultsubcollection,
    351                      defaultlanguage, collection, docnum, doc);
    352   }
     342  if (info["hastxt"].getint() == 0) { // there is no text for this section
     343    return false; // true??
     344  }
     345  int docnum = info["docnum"].getint();
     346
     347  // get the parent id
     348  text_t parent_OID;
     349  get_top(tOID, parent_OID);
     350 
     351  // locate the parent info ingdbm db
     352  if (!gdbmptr->getinfo(parent_OID, info)) return false;
     353 
     354  text_t archive_dir = info["assocfilepath"];
     355  text_t full_path_to_doc = filename_cat(collectdir, "index", "text", archive_dir, "doc.xml");
     356 
     357  doc.clear();
     358  expat_document(full_path_to_doc, text_t(docnum), doc);
    353359  return true;
    354360}
Note: See TracChangeset for help on using the changeset viewer.