- Timestamp:
- 2004-11-03T14:46:37+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS3MGRetrieve.java
r7312 r8439 164 164 //ystem.out.println("translated id = "+doc_id); 165 165 } 166 if (GS3OID.isDocTop(doc_id)) { 167 System.out.println("adding the structure bit to doc id"); 168 doc_id = GS3OID.createOID(doc_id, "1"); 166 if (GS3OID.isDocTop(doc_id) && database.isHierarchicalDocument(doc_id)) { 167 // if we have a whole doc id, and the document is hierarchical, 168 // we want to change the id to be the top id of the section 169 // hierarchy 170 doc_id = GS3OID.createOID(doc_id, "1"); 169 171 } 170 String doc_num = this.database.OID2MGNum(doc_id); 171 172 //long doc_num = this.gdbm_src.oid2Docnum(doc_id); 173 System.out.println("mg doc num = "+doc_num); 172 String doc_num = this.database.OID2MGNum(doc_id); 174 173 // doc nums have the index prefixed 175 174 doc_num = doc_num.substring(doc_num.indexOf(".")+1); 176 175 int doc_int = Integer.parseInt(doc_num); 177 System.out.println("actual mg doc num="+doc_int);176 178 177 String doc_content = ""; 179 178 try { 180 179 doc_content = this.mg_src.getDocument(basedir, textdir, doc_int); 181 180 } catch (Exception e) { 182 183 181 System.out.println("exception happended with mg_src.getDocument()"); 182 doc_content = "this is the content for section hash id "+ doc_id+", mg doc num "+doc_int+"\n"; 184 183 } 185 184 //ystem.out.println("Doc content: " + doc_content + "|");
Note:
See TracChangeset
for help on using the changeset viewer.