VIVO-914 path to TDB content directory may be absolute or relative to Vitro home directory
This commit is contained in:
parent
ab60341355
commit
d82889d192
1 changed files with 6 additions and 1 deletions
|
@ -70,7 +70,7 @@ public class ContentTripleSourceTDB extends ContentTripleSource {
|
|||
public void startup(Application application, ComponentStartupStatus ss) {
|
||||
configureTDB();
|
||||
try {
|
||||
this.rdfService = new RDFServiceTDB(tdbPath);
|
||||
this.rdfService = new RDFServiceTDB(resolveTdbPath(application));
|
||||
this.rdfServiceFactory = createRDFServiceFactory();
|
||||
this.unclosableRdfService = this.rdfServiceFactory.getRDFService();
|
||||
this.dataset = new RDFServiceDataset(this.unclosableRdfService);
|
||||
|
@ -82,6 +82,11 @@ public class ContentTripleSourceTDB extends ContentTripleSource {
|
|||
}
|
||||
}
|
||||
|
||||
private String resolveTdbPath(Application application) {
|
||||
return application.getHomeDirectory().getPath().resolve(tdbPath)
|
||||
.toString();
|
||||
}
|
||||
|
||||
private void configureTDB() {
|
||||
TDB.getContext().setTrue(TDB.symUnionDefaultGraph);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue