fixing model used by RestrictionOperationController

This commit is contained in:
brianjlowe 2013-09-27 16:40:34 -04:00
parent 9f2171c2a3
commit 9ef5e783a3
2 changed files with 5 additions and 21 deletions

View file

@ -155,26 +155,6 @@ public class BaseEditController extends VitroHttpServlet {
}
}
protected OntModel getOntModel( HttpServletRequest request, ServletContext ctx ) {
// TODO: JB - This method gets the UNION FULL model from the session, if there is one,
// TODO and the BASE_TBOX model otherwise.
OntModel ontModel = null;
try {
ontModel = ModelAccess.on(request.getSession()).getJenaOntModel();
} catch (Exception e) {
// ignoring any problems here - we're not really expecting
// this attribute to be populated anyway
}
if ( ontModel == null ) {
ontModel = ModelAccess.on(ctx).getOntModel(ModelID.BASE_TBOX);
}
return ontModel;
}
protected WebappDaoFactory getWebappDaoFactory() {
return ModelAccess.on(getServletContext()).getBaseWebappDaoFactory();
}

View file

@ -23,11 +23,14 @@ import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.shared.Lock;
import com.hp.hpl.jena.vocabulary.DAML_OIL;
import edu.cornell.mannlib.vedit.beans.EditProcessObject;
import edu.cornell.mannlib.vedit.controller.BaseEditController;
import edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess.ModelID;
import edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent;
public class RestrictionOperationController extends BaseEditController {
@ -44,7 +47,8 @@ public class RestrictionOperationController extends BaseEditController {
try {
OntModel ontModel = getOntModel(request, getServletContext());
OntModel ontModel = ModelAccess.on(
getServletContext()).getOntModel(ModelID.BASE_TBOX);
HashMap epoHash = null;
EditProcessObject epo = null;