Merge branch 'develop' of https://github.com/vivo-project/VIVO into develop

This commit is contained in:
Tim Worrall 2014-08-27 13:19:37 -04:00
commit 1568a07d78
3 changed files with 7 additions and 7 deletions

View file

@ -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.TemplateResponseValues;
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.jena.event.EditEvent;
import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelNames;
/*
* Custom controller for menu management. This will be replaced later once N3 Editing
* 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(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.notifyEvent(new EditEvent(null,true));
try {
@ -239,7 +239,7 @@ public class InstitutionalInternalClassController extends FreemarkerHttpServlet
//Get current internal class
private String retrieveCurrentInternalClass() {
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,
ResourceFactory.createProperty(VitroVocabulary.IS_INTERNAL_CLASSANNOT),
(RDFNode) null);

View file

@ -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.dao.DisplayVocabulary;
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.modelaccess.ModelNames;
/**
* 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(internalClass != null && internalClass.equals("true")) {
//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);
//Checks for just one statement
if(internalIt.hasNext()){

View file

@ -15,8 +15,8 @@ import com.hp.hpl.jena.rdf.model.ResourceFactory;
import com.hp.hpl.jena.rdf.model.StmtIterator;
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.modelaccess.ModelNames;
/*
* 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) {
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);
if(internalIt.hasNext()) {
String internalClass = internalIt.nextStatement().getSubject().getURI();