VIVO-1009 Apply the UNION content models at the proper level.
The ContentTripleSourceTDB and ContentTripleSourceSPARQL need to have union models on the short-term OntModelCache. But they shouldn't be required to add them. They should be added to the long-term OntModelCache and let ContentTripleSourceSDB override them when it overrides the long-term models.
This commit is contained in:
parent
6981838348
commit
abf3d00996
2 changed files with 8 additions and 6 deletions
|
@ -72,14 +72,14 @@ public class BasicCombinedTripleSource implements CombinedTripleSource {
|
|||
sources.put(CONFIGURATION, configurationSource);
|
||||
|
||||
ontModels = new EnumMap<>(WhichService.class);
|
||||
ontModels.put(CONTENT, new ModelMakerOntModelCache(
|
||||
getModelMaker(CONTENT)));
|
||||
ontModels.put(CONTENT, new UnionModelsOntModelsCache(
|
||||
new ModelMakerOntModelCache(getModelMaker(CONTENT)),
|
||||
CONTENT_UNIONS));
|
||||
ontModels.put(CONFIGURATION, new ModelMakerOntModelCache(
|
||||
getModelMaker(CONFIGURATION)));
|
||||
|
||||
ontModelCache = new UnionModelsOntModelsCache(new JoinedOntModelCache(
|
||||
ontModels.get(CONTENT), ontModels.get(CONFIGURATION)),
|
||||
CONTENT_UNIONS);
|
||||
ontModelCache = new JoinedOntModelCache(ontModels.get(CONTENT),
|
||||
ontModels.get(CONFIGURATION));
|
||||
}
|
||||
|
||||
protected OntModelCache getOntModels(WhichService whichService) {
|
||||
|
|
|
@ -4,7 +4,6 @@ package edu.cornell.mannlib.vitro.webapp.triplesource.impl.sdb;
|
|||
|
||||
import static edu.cornell.mannlib.vitro.webapp.triplesource.impl.BasicCombinedTripleSource.CONTENT_UNIONS;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.Driver;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
@ -194,6 +193,9 @@ public class ContentTripleSourceSDB extends ContentTripleSource {
|
|||
* Use models from the short-term RDFService, since there is less contention
|
||||
* for the database connections that way. The exceptions are the
|
||||
* memory-mapped models. By keeping them, we also keep their sub-models.
|
||||
*
|
||||
* Set up the Union models again also, so they will reference the short-term
|
||||
* models.
|
||||
*/
|
||||
@Override
|
||||
public OntModelCache getShortTermOntModels(RDFService shortTermRdfService,
|
||||
|
|
Loading…
Add table
Reference in a new issue