VIVO-801 Bug fix: user a consistent spelling for tdbModels directory.
This commit is contained in:
parent
baf0d59a68
commit
f690bf0235
2 changed files with 5 additions and 3 deletions
|
@ -33,6 +33,7 @@ import com.hp.hpl.jena.tdb.TDBFactory;
|
||||||
* copying VIVO configuration data from RDB to TDB.
|
* copying VIVO configuration data from RDB to TDB.
|
||||||
*/
|
*/
|
||||||
public class RdbMigrator {
|
public class RdbMigrator {
|
||||||
|
private static final String DIRECTORY_TDB = "tdbModels";
|
||||||
private static final String TABLE_RDB = "jena_graph";
|
private static final String TABLE_RDB = "jena_graph";
|
||||||
private static final String TABLE_MIGRATED = "vivo_rdb_migrated";
|
private static final String TABLE_MIGRATED = "vivo_rdb_migrated";
|
||||||
private static final List<String> EXPECTED_MODELS = Arrays
|
private static final List<String> EXPECTED_MODELS = Arrays
|
||||||
|
@ -120,7 +121,7 @@ public class RdbMigrator {
|
||||||
if (!vivoHome.canWrite()) {
|
if (!vivoHome.canWrite()) {
|
||||||
quit("Can't write to '" + vivoHome + "'.");
|
quit("Can't write to '" + vivoHome + "'.");
|
||||||
}
|
}
|
||||||
targetDir = new File(vivoHome, "tdbmodels");
|
targetDir = new File(vivoHome, DIRECTORY_TDB);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean doesTdbExist() {
|
private boolean doesTdbExist() {
|
||||||
|
|
|
@ -36,6 +36,7 @@ import edu.cornell.mannlib.vitro.webapp.startup.StartupStatus;
|
||||||
public class RDFServiceSetup extends JenaDataSourceSetupBase
|
public class RDFServiceSetup extends JenaDataSourceSetupBase
|
||||||
implements javax.servlet.ServletContextListener {
|
implements javax.servlet.ServletContextListener {
|
||||||
private static final Log log = LogFactory.getLog(RDFServiceSetup.class);
|
private static final Log log = LogFactory.getLog(RDFServiceSetup.class);
|
||||||
|
private static final String DIRECTORY_TDB = "tdbModels";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void contextDestroyed(ServletContextEvent arg0) {
|
public void contextDestroyed(ServletContextEvent arg0) {
|
||||||
|
@ -71,7 +72,7 @@ implements javax.servlet.ServletContextListener {
|
||||||
private void useTDBForConfigurationModels(ServletContext ctx) throws IOException {
|
private void useTDBForConfigurationModels(ServletContext ctx) throws IOException {
|
||||||
String vitroHome = ConfigurationProperties.getBean(ctx).getProperty(
|
String vitroHome = ConfigurationProperties.getBean(ctx).getProperty(
|
||||||
"vitro.home") ;
|
"vitro.home") ;
|
||||||
String directoryPath = vitroHome + File.separatorChar + "tdbModels";
|
String directoryPath = vitroHome + File.separatorChar + DIRECTORY_TDB;
|
||||||
RDFServiceFactory factory = new RDFServiceFactoryTDB(directoryPath);
|
RDFServiceFactory factory = new RDFServiceFactoryTDB(directoryPath);
|
||||||
RDFServiceUtils.setRDFServiceFactory(ctx, factory, CONFIGURATION);
|
RDFServiceUtils.setRDFServiceFactory(ctx, factory, CONFIGURATION);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue