VIVO-80 Default WADF on the request must include language filter.
In this case, the display model was not filtered.
This commit is contained in:
parent
5de5a322a2
commit
4ee600a0d4
1 changed files with 6 additions and 4 deletions
|
@ -138,11 +138,8 @@ public class RequestModelsPrep implements Filter {
|
||||||
Dataset dataset = new RDFServiceDataset(rdfService);
|
Dataset dataset = new RDFServiceDataset(rdfService);
|
||||||
vreq.setDataset(dataset);
|
vreq.setDataset(dataset);
|
||||||
|
|
||||||
OntModelSelector oms = ModelAccess.on(ctx).getUnionOntModelSelector();
|
|
||||||
WebappDaoFactoryConfig config = createWadfConfig(langs);
|
WebappDaoFactoryConfig config = createWadfConfig(langs);
|
||||||
WebappDaoFactory wadf = new WebappDaoFactorySDB(rdfService, oms, config);
|
|
||||||
vreq.setUnfilteredWebappDaoFactory(wadf);
|
|
||||||
|
|
||||||
WebappDaoFactory assertions = new WebappDaoFactorySDB(rdfService,
|
WebappDaoFactory assertions = new WebappDaoFactorySDB(rdfService,
|
||||||
ModelAccess.on(ctx).getBaseOntModelSelector(), config,
|
ModelAccess.on(ctx).getBaseOntModelSelector(), config,
|
||||||
SDBDatasetMode.ASSERTIONS_ONLY);
|
SDBDatasetMode.ASSERTIONS_ONLY);
|
||||||
|
@ -152,6 +149,11 @@ public class RequestModelsPrep implements Filter {
|
||||||
ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM,
|
ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM,
|
||||||
dataset.getDefaultModel()));
|
dataset.getDefaultModel()));
|
||||||
|
|
||||||
|
OntModelSelector oms = ModelAccess.on(ctx).getUnionOntModelSelector();
|
||||||
|
WebappDaoFactory wadf = new WebappDaoFactorySDB(rdfService, oms, config);
|
||||||
|
vreq.setUnfilteredWebappDaoFactory(wadf);
|
||||||
|
|
||||||
|
wadf = new WebappDaoFactorySDB(rdfService, ModelAccess.on(vreq).getUnionOntModelSelector(), config);
|
||||||
if (isLanguageAwarenessEnabled()) {
|
if (isLanguageAwarenessEnabled()) {
|
||||||
ModelAccess.on(vreq).setDisplayModel(
|
ModelAccess.on(vreq).setDisplayModel(
|
||||||
LanguageFilteringUtils.wrapOntModelInALanguageFilter(
|
LanguageFilteringUtils.wrapOntModelInALanguageFilter(
|
||||||
|
|
Loading…
Add table
Reference in a new issue