Changeset 10651 for trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractGS2DocumentRetrieve.java
- Timestamp:
- 2005-09-26T17:07:05+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractGS2DocumentRetrieve.java
r10334 r10651 52 52 extends AbstractDocumentRetrieve { 53 53 54 protected static final String INDEX_STEM_ELEM = "indexStem";55 56 54 // protected static final String EXTLINK_PARAM = "ext"; here or in base?? 57 55 protected String index_stem = null; … … 80 78 System.out.println("Configuring AbstractGS2DocumentRetrieve..."); 81 79 //this.config_info = info; 80 81 // the index stem is either specified in the config file or is the collection name 82 Element index_stem_elem = (Element) GSXML.getChildByTagName(info, GSXML.INDEX_STEM_ELEM); 83 if (index_stem_elem != null) { 84 this.index_stem = index_stem_elem.getAttribute(GSXML.NAME_ATT); 85 } 86 if (this.index_stem == null || this.index_stem.equals("")) { 87 System.err.println("AbstractGS2DocumentRetrieve.configure(): indexStem element not found, stem will default to collection name"); 88 this.index_stem = this.cluster_name; 89 } 82 90 83 91 // Open GDBM database for querying 84 String gdbm_db_file = GSFile.GDBMDatabaseFile(this.site_home, this.cluster_name );92 String gdbm_db_file = GSFile.GDBMDatabaseFile(this.site_home, this.cluster_name, this.index_stem); 85 93 if (!this.gdbm_src.openDatabase(gdbm_db_file, GDBMWrapper.READER)) { 86 94 System.err.println("AbstractGS2DocumentRetrieve Error: Could not open GDBM database!"); 87 95 return false; 88 96 } 89 90 // the index stem is either specified in the config file or is the collection name 91 Element index_stem_elem = (Element) GSXML.getChildByTagName(info, INDEX_STEM_ELEM); 92 if (index_stem_elem != null) { 93 this.index_stem = index_stem_elem.getAttribute(GSXML.NAME_ATT); 94 } 95 if (this.index_stem == null || this.index_stem.equals("")) { 96 System.err.println("AbstractGS2DocumentRetrieve.configure(): indexStem element not found, stem will default to collection name"); 97 this.index_stem = this.cluster_name; 98 } 97 99 98 return true; 100 99 }
Note:
See TracChangeset
for help on using the changeset viewer.