Merge branch 'develop' of https://github.com/vivo-project/VIVO into develop
This commit is contained in:
commit
1568a07d78
3 changed files with 7 additions and 7 deletions
|
@ -26,9 +26,9 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.Red
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
|
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess.ModelID;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent;
|
import edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelNames;
|
||||||
/*
|
/*
|
||||||
* Custom controller for menu management. This will be replaced later once N3 Editing
|
* Custom controller for menu management. This will be replaced later once N3 Editing
|
||||||
* has been successfully refactored and integrated with menu management.
|
* has been successfully refactored and integrated with menu management.
|
||||||
|
@ -184,7 +184,7 @@ public class InstitutionalInternalClassController extends FreemarkerHttpServlet
|
||||||
}
|
}
|
||||||
//If existing class, need to simply add a statement specifying existing class is an internal class
|
//If existing class, need to simply add a statement specifying existing class is an internal class
|
||||||
if(classUri != null && !classUri.isEmpty()) {
|
if(classUri != null && !classUri.isEmpty()) {
|
||||||
Model writeModel = ModelAccess.on(getServletContext()).getOntModel(ModelID.BASE_TBOX);
|
Model writeModel = ModelAccess.on(getServletContext()).getOntModel(ModelNames.TBOX_ASSERTIONS);
|
||||||
writeModel.enterCriticalSection(Lock.WRITE);
|
writeModel.enterCriticalSection(Lock.WRITE);
|
||||||
writeModel.notifyEvent(new EditEvent(null,true));
|
writeModel.notifyEvent(new EditEvent(null,true));
|
||||||
try {
|
try {
|
||||||
|
@ -239,7 +239,7 @@ public class InstitutionalInternalClassController extends FreemarkerHttpServlet
|
||||||
//Get current internal class
|
//Get current internal class
|
||||||
private String retrieveCurrentInternalClass() {
|
private String retrieveCurrentInternalClass() {
|
||||||
String internalClassUri = "";
|
String internalClassUri = "";
|
||||||
Model mainModel = ModelAccess.on(getServletContext()).getOntModel(ModelID.BASE_TBOX);
|
Model mainModel = ModelAccess.on(getServletContext()).getOntModel(ModelNames.TBOX_ASSERTIONS);
|
||||||
StmtIterator internalIt = mainModel.listStatements(null,
|
StmtIterator internalIt = mainModel.listStatements(null,
|
||||||
ResourceFactory.createProperty(VitroVocabulary.IS_INTERNAL_CLASSANNOT),
|
ResourceFactory.createProperty(VitroVocabulary.IS_INTERNAL_CLASSANNOT),
|
||||||
(RDFNode) null);
|
(RDFNode) null);
|
||||||
|
|
|
@ -28,8 +28,8 @@ import com.hp.hpl.jena.rdf.model.StmtIterator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary;
|
import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
|
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess.ModelID;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelNames;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This will pass these variables to the template:
|
* This will pass these variables to the template:
|
||||||
|
@ -105,7 +105,7 @@ public class InternalClassesDataGetter extends IndividualsForClassesDataGetter{
|
||||||
//if internal class restriction specified and is true
|
//if internal class restriction specified and is true
|
||||||
if(internalClass != null && internalClass.equals("true")) {
|
if(internalClass != null && internalClass.equals("true")) {
|
||||||
//Get internal class
|
//Get internal class
|
||||||
Model mainModel = ModelAccess.on(context).getOntModel(ModelID.BASE_TBOX);
|
Model mainModel = ModelAccess.on(context).getOntModel(ModelNames.TBOX_ASSERTIONS);
|
||||||
StmtIterator internalIt = mainModel.listStatements(null, ResourceFactory.createProperty(VitroVocabulary.IS_INTERNAL_CLASSANNOT), (RDFNode) null);
|
StmtIterator internalIt = mainModel.listStatements(null, ResourceFactory.createProperty(VitroVocabulary.IS_INTERNAL_CLASSANNOT), (RDFNode) null);
|
||||||
//Checks for just one statement
|
//Checks for just one statement
|
||||||
if(internalIt.hasNext()){
|
if(internalIt.hasNext()){
|
||||||
|
|
|
@ -15,8 +15,8 @@ import com.hp.hpl.jena.rdf.model.ResourceFactory;
|
||||||
import com.hp.hpl.jena.rdf.model.StmtIterator;
|
import com.hp.hpl.jena.rdf.model.StmtIterator;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
|
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess.ModelID;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelNames;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This class includes methods that help in selecting a data getter based on
|
* This class includes methods that help in selecting a data getter based on
|
||||||
|
@ -47,7 +47,7 @@ public class MenuManagementDataUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String retrieveInternalClass(ServletContext context) {
|
private static String retrieveInternalClass(ServletContext context) {
|
||||||
OntModel mainModel = ModelAccess.on(context).getOntModel(ModelID.BASE_TBOX);
|
OntModel mainModel = ModelAccess.on(context).getOntModel(ModelNames.TBOX_ASSERTIONS);
|
||||||
StmtIterator internalIt = mainModel.listStatements(null, ResourceFactory.createProperty(VitroVocabulary.IS_INTERNAL_CLASSANNOT), (RDFNode) null);
|
StmtIterator internalIt = mainModel.listStatements(null, ResourceFactory.createProperty(VitroVocabulary.IS_INTERNAL_CLASSANNOT), (RDFNode) null);
|
||||||
if(internalIt.hasNext()) {
|
if(internalIt.hasNext()) {
|
||||||
String internalClass = internalIt.nextStatement().getSubject().getURI();
|
String internalClass = internalIt.nextStatement().getSubject().getURI();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue