- Timestamp:
- 2009-10-14T15:58:44+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/src/java/org/greenstone/gsdl3/service/GS2LuceneRetrieve.java
r18421 r20817 47 47 protected static final String DOC_LEVEL="Doc"; 48 48 protected static final String SEC_LEVEL="Sec"; 49 protected static final String ID_ATT = "gs2: id";49 protected static final String ID_ATT = "gs2:docOID"; 50 50 51 51 // Parameters used … … 102 102 */ 103 103 protected Element getNodeContent(String doc_id, String lang) throws GSException { 104 String doc_content = getTextString("TextRetrievalError", lang); 104 String [] args = new String[1]; 105 args[0] = doc_id; 106 String doc_content = getTextString("TextRetrievalError", lang, args); 105 107 try { 106 108 if (!text_available) { 107 109 throw new Exception("No text directory available"); 108 110 } 109 110 String doc_num = this.coll_db.OID2Docnum(doc_id); 111 if (doc_num == null || doc_num.equals("")) { 112 throw new Exception("OID "+doc_id +" couldn't be converted to lucene doc num"); 113 } 114 111 115 112 DBInfo info=this.coll_db.getInfo(OID.getTop(doc_id)); 116 113 if (info == null) { … … 135 132 current_section = full_document; 136 133 } else { 137 current_section = GSXML.getNamedElement(full_document, SEC_LEVEL, ID_ATT, doc_ num);134 current_section = GSXML.getNamedElement(full_document, SEC_LEVEL, ID_ATT, doc_id); 138 135 } 139 136 if (current_section == null) { 140 throw new Exception("Couldn't find section "+ doc_ num+" in file "+doc_xml_file.getPath());137 throw new Exception("Couldn't find section "+ doc_id+" in file "+doc_xml_file.getPath()); 141 138 } 142 139 doc_content = GSXML.getNodeText(current_section);
Note:
See TracChangeset
for help on using the changeset viewer.