Ignore:
Timestamp:
2004-01-15T17:00:41+13:00 (20 years ago)
Author:
kjdon
Message:

now classifiers work, and searching works, and hierarchical docs work

File:
1 edited

Legend:

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

    r6304 r6517  
    122122        //ystem.out.println("translated id = "+doc_id);
    123123        }
    124         int doc_num = this.database.OID2MGNum(doc_id);
     124        if (GS3OID.isDocTop(doc_id)) {
     125        System.out.println("adding the structure bit to doc id");
     126        doc_id = GS3OID.createOID(doc_id, "1");
     127        }
     128        String doc_num = this.database.OID2MGNum(doc_id);
     129       
    125130        //long doc_num = this.gdbm_src.oid2Docnum(doc_id);
    126         //ystem.out.println("mg doc num = "+doc_num);
     131        System.out.println("mg doc num = "+doc_num);
     132        // doc nums have the index prefixed
     133        doc_num = doc_num.substring(doc_num.indexOf(".")+1);
     134        int doc_int = Integer.parseInt(doc_num);
     135        System.out.println("actual mg doc num="+doc_int);
    127136        String doc_content = "";
    128137        try {
    129           doc_content = this.mg_src.getDocument(basedir, textdir, doc_num);
     138          doc_content = this.mg_src.getDocument(basedir, textdir, doc_int);
    130139        } catch (Exception e) {
    131140          System.out.println("exception happended with mg_src.getDocument()");
    132           doc_content = "this is the content for section hash id "+ doc_id+", mg doc num "+doc_num+"\n";
     141          doc_content = "this is the content for section hash id "+ doc_id+", mg doc num "+doc_int+"\n";
    133142        }
    134143        //ystem.out.println("Doc content: " + doc_content + "|");
Note: See TracChangeset for help on using the changeset viewer.