VIVO-82 Use ModelAccess to get or set the BaseOntModel
a.k.a the Base Full model, or AssertionsModel
This commit is contained in:
parent
9b7f6c92e6
commit
cba000c58b
3 changed files with 7 additions and 4 deletions
|
@ -3,6 +3,7 @@
|
||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
|
||||||
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.ModelAccess"%>
|
||||||
|
|
||||||
<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission" %>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission" %>
|
||||||
|
@ -21,7 +22,7 @@
|
||||||
" FILTER(afn:bnode(?bnode) = \"" + conceptIdStr + "\")\n" +
|
" FILTER(afn:bnode(?bnode) = \"" + conceptIdStr + "\")\n" +
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
OntModel ontModel = (OntModel) getServletContext().getAttribute("baseOntModel");
|
OntModel ontModel = ModelAccess.on(getServletContext()).getBaseOntModel();
|
||||||
Model conceptDescription = ModelFactory.createDefaultModel();
|
Model conceptDescription = ModelFactory.createDefaultModel();
|
||||||
try {
|
try {
|
||||||
ontModel.enterCriticalSection(Lock.READ);
|
ontModel.enterCriticalSection(Lock.READ);
|
||||||
|
|
|
@ -4,12 +4,13 @@
|
||||||
|
|
||||||
<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission" %>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission" %>
|
||||||
|
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.ModelAccess"%>
|
||||||
<% request.setAttribute("requestedActions", SimplePermission.USE_MISCELLANEOUS_CURATOR_PAGES.ACTION); %>
|
<% request.setAttribute("requestedActions", SimplePermission.USE_MISCELLANEOUS_CURATOR_PAGES.ACTION); %>
|
||||||
<vitro:confirmAuthorization />
|
<vitro:confirmAuthorization />
|
||||||
|
|
||||||
<%
|
<%
|
||||||
if (request.getParameter("execute") != null) {
|
if (request.getParameter("execute") != null) {
|
||||||
OntModel ontModel = (OntModel) getServletContext().getAttribute(JenaBaseDao.ASSERTIONS_ONT_MODEL_ATTRIBUTE_NAME);
|
OntModel ontModel = ModelAccess.on(getServletContext()).getBaseOntModel();
|
||||||
int results = doRemoval(ontModel);
|
int results = doRemoval(ontModel);
|
||||||
request.setAttribute("removalCount", results);
|
request.setAttribute("removalCount", results);
|
||||||
}
|
}
|
||||||
|
@ -66,7 +67,7 @@
|
||||||
" FILTER(afn:bnode(?bnode) = \"" + bnodeId + "\")\n" +
|
" FILTER(afn:bnode(?bnode) = \"" + bnodeId + "\")\n" +
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
OntModel ontModel = (OntModel) getServletContext().getAttribute("baseOntModel");
|
OntModel ontModel = ModelAccess.on(getServletContext()).getBaseOntModel();
|
||||||
Model conceptDescription = ModelFactory.createDefaultModel();
|
Model conceptDescription = ModelFactory.createDefaultModel();
|
||||||
try {
|
try {
|
||||||
ontModel.enterCriticalSection(Lock.READ);
|
ontModel.enterCriticalSection(Lock.READ);
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission" %>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission" %>
|
||||||
|
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.ModelAccess"%>
|
||||||
<% request.setAttribute("requestedActions", SimplePermission.USE_MISCELLANEOUS_CURATOR_PAGES.ACTION); %>
|
<% request.setAttribute("requestedActions", SimplePermission.USE_MISCELLANEOUS_CURATOR_PAGES.ACTION); %>
|
||||||
<vitro:confirmAuthorization />
|
<vitro:confirmAuthorization />
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@
|
||||||
String describeQueryStr =
|
String describeQueryStr =
|
||||||
"DESCRIBE <" + resourceURIStr + ">";
|
"DESCRIBE <" + resourceURIStr + ">";
|
||||||
|
|
||||||
OntModel ontModel = (OntModel) getServletContext().getAttribute("baseOntModel");
|
OntModel ontModel = ModelAccess.on(getServletContext()).getBaseOntModel();
|
||||||
Model resourceDescription = ModelFactory.createDefaultModel();
|
Model resourceDescription = ModelFactory.createDefaultModel();
|
||||||
try {
|
try {
|
||||||
ontModel.enterCriticalSection(Lock.READ);
|
ontModel.enterCriticalSection(Lock.READ);
|
||||||
|
|
Loading…
Add table
Reference in a new issue