VIVO-82 Use ModelAccess to get or set the JenaOntModel (Union Full model)
This commit is contained in:
parent
0a15a6df7d
commit
4e4384bd3e
5 changed files with 10 additions and 5 deletions
|
@ -7,6 +7,7 @@
|
|||
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.JenaModelUtils"%>
|
||||
<%@page import="com.hp.hpl.jena.rdf.model.Model"%>
|
||||
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDao"%>
|
||||
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.ModelAccess"%>
|
||||
<%@page import="java.io.InputStream"%>
|
||||
<%@page import="java.util.Properties"%>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
|
||||
|
@ -54,7 +55,7 @@
|
|||
}
|
||||
String contextId = sesameProperties.getProperty(SESAME_CONTEXT);
|
||||
|
||||
Model fullModel = (Model) getServletContext().getAttribute(JenaBaseDao.JENA_ONT_MODEL_ATTRIBUTE_NAME);
|
||||
Model fullModel = ModelAccess.on(getServletContext).getJenaOntModel();
|
||||
// Copy the model to avoid locking the main model during sync. Assumes enough memory.
|
||||
Model copyModel = ModelFactory.createDefaultModel();
|
||||
fullModel.enterCriticalSection(Lock.READ);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue