Changeset 9000
- Timestamp:
- 2005-02-10T16:41:07+13:00 (19 years ago)
- Location:
- trunk/gsdl3/src/java/org/greenstone/gsdl3/service
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractGS2DocumentRetrieve.java
r8959 r9000 51 51 extends AbstractDocumentRetrieve { 52 52 53 54 // protected static final String EXTLINK_PARAM = "ext"; here or in base?? 53 protected static final String INDEX_STEM_ELEM = "indexStem"; 54 55 // protected static final String EXTLINK_PARAM = "ext"; here or in base?? 56 protected String index_stem = null; 57 55 58 protected GDBMWrapper gdbm_src = null; 56 59 … … 77 80 return false; 78 81 } 82 83 // the index stem is either specified in the config file or is the collection name 84 Element index_stem_elem = (Element) GSXML.getChildByTagName(info, INDEX_STEM_ELEM); 85 if (index_stem_elem != null) { 86 this.index_stem = index_stem_elem.getAttribute(GSXML.NAME_ATT); 87 } 88 if (this.index_stem == null || this.index_stem.equals("")) { 89 System.err.println("AbstractGS2DocumentRetrieve.configure(): indexStem element not found, stem will default to collection name"); 90 this.index_stem = this.cluster_name; 91 } 92 79 93 80 94 return super.configure(info, extra_info); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractGS3DocumentRetrieve.java
r8959 r9000 50 50 public abstract class AbstractGS3DocumentRetrieve 51 51 extends AbstractDocumentRetrieve { 52 protected static final String INDEX_STEM_ELEM = "indexStem"; 52 53 53 54 protected SQLQuery database = null; 55 protected String index_stem = null; 54 56 55 57 … … 68 70 System.out.println("Configuring AbstractGS3DocumentRetrieve..."); 69 71 72 // the index stem is either specified in the config file or is "index" 73 Element index_stem_elem = (Element) GSXML.getChildByTagName(info, INDEX_STEM_ELEM); 74 if (index_stem_elem != null) { 75 this.index_stem = index_stem_elem.getAttribute(GSXML.NAME_ATT); 76 } 77 if (this.index_stem == null || this.index_stem.equals("")) { 78 System.err.println("GS3MGRetrieve.configure(): indexStem element not found, stem will default to 'index'"); 79 this.index_stem = "index"; 80 } 81 70 82 // open the database for querying 71 83 // the database name is a combination of site name and collection name … … 81 93 return false; 82 94 } 95 83 96 if (!database.setDatabase(site_name+"_"+this.cluster_name)) { 84 97 System.err.println("GS3Retrieve Error: Could not open SQL database!");
Note:
See TracChangeset
for help on using the changeset viewer.