Changeset 30262
- Timestamp:
- 2015-09-28T10:45:13+13:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSFile.java
r27999 r30262 31 31 import org.apache.log4j.Logger; 32 32 import org.greenstone.util.GlobalProperties; 33 import org.greenstone.gsdl3.util.DBHelper; 33 34 34 35 /** … … 343 344 } 344 345 345 /** the collection database file - */ 346 static public String collectionDatabaseFile(String site_home, String collection_name, String index_stem, String database_type) 347 { 348 349 String db_ext = null; 350 if (database_type.equalsIgnoreCase("jdbm")) 351 { 352 db_ext = ".jdb"; 353 } 354 else 355 { 356 // assume gdbm 357 db_ext = ".gdb"; 358 } 359 360 return site_home + File.separatorChar + "collect" + File.separatorChar + collection_name + File.separatorChar + "index" + File.separatorChar + "text" + File.separatorChar + index_stem + db_ext; 361 362 } 346 /** the collection database file - */ 347 static public String collectionDatabaseFile(String site_home, String collection_name, String index_stem, String database_type) 348 { 349 String db_ext = DBHelper.getDBExtFromDBType(database_type); 350 if (null == db_ext || db_ext.equals("")) { 351 logger.warn("Could not recognise database type \"" + database_type + "\", defaulting to GDBM and extension \".gdb\""); 352 // assume gdbm 353 db_ext = ".gdb"; 354 } 355 return site_home + File.separatorChar + "collect" + File.separatorChar + collection_name + File.separatorChar + "index" + File.separatorChar + "text" + File.separatorChar + index_stem + db_ext; 356 } 363 357 364 358 // some file utility methods
Note:
See TracChangeset
for help on using the changeset viewer.