From a9cb42162cba2c079f95a7c5932bd91f9f9c7b9d Mon Sep 17 00:00:00 2001 From: Jim Blake Date: Wed, 13 Aug 2014 15:22:39 -0400 Subject: [PATCH] VIVO-843 "every time" sub-models were being lost. The problem comes when you wrap an OntModel around a Model. Sub-models are added to the OntModel, so unless you keep the same OntModel, those sub-models get lost. This is a kluge, rather than a fix. --- .../vitro/webapp/filters/RequestModelsPrep.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/RequestModelsPrep.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/RequestModelsPrep.java index 17513d0d3..034be7f13 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/RequestModelsPrep.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/RequestModelsPrep.java @@ -189,9 +189,16 @@ public class RequestModelsPrep implements Filter { private void setRawModels(RDFService contentRdfService, RDFService configurationRdfService, VitroRequest vreq) { ModelAccess models = ModelAccess.on(vreq); - ModelMaker configMM = ModelMakerUtils.getShortTermModelMaker(ctx, - configurationRdfService, WhichService.CONFIGURATION); - models.setModelMaker(CONFIGURATION, configMM); + /** + * KLUGE -- VIVO-843 + * + * We happen to know that the short-term configuration models are the + * same as the long-term ones. But if we wrap them in OntModels again, + * we will lose the everytime sub-models. So for now, just skip that. + */ +// ModelMaker configMM = ModelMakerUtils.getShortTermModelMaker(ctx, +// configurationRdfService, WhichService.CONFIGURATION); +// models.setModelMaker(CONFIGURATION, configMM); ModelMaker contentMM = ModelMakerUtils.getShortTermModelMaker(ctx, contentRdfService, WhichService.CONTENT);