diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/ApplicationBeanRetryController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/ApplicationBeanRetryController.java index 36ed0ce55..2ef05fee1 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/ApplicationBeanRetryController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/ApplicationBeanRetryController.java @@ -43,7 +43,7 @@ public class ApplicationBeanRetryController extends BaseEditController { try { super.doGet(request,response); } catch (Exception e) { - log.error("PortalRetryController encountered exception calling super.doGet()"); + log.error(e,e); } //create an EditProcessObject for this and put it in the session @@ -88,7 +88,7 @@ public class ApplicationBeanRetryController extends BaseEditController { RequestDispatcher rd = request.getRequestDispatcher(Controllers.BASIC_JSP); request.setAttribute("bodyJsp","/templates/edit/formBasic.jsp"); - request.setAttribute("formJsp","/templates/edit/specific/portal_retry.jsp"); + request.setAttribute("formJsp","/templates/edit/specific/applicationBean_retry.jsp"); request.setAttribute("scripts","/templates/edit/formBasic.js"); request.setAttribute("title","Site Information Editing Form"); request.setAttribute("_action",action); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/WebappDaoFactory.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/WebappDaoFactory.java index d5127f86e..cbc9a5adc 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/WebappDaoFactory.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/WebappDaoFactory.java @@ -118,8 +118,6 @@ public interface WebappDaoFactory { public LinksDao getLinksDao(); public LinktypeDao getLinktypeDao(); - public FlagDao getFlagDao(); - // TODO This goes away when the UserAccounts stuff is fully implemented - jblake. public UserDao getUserDao(); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/filtering/WebappDaoFactoryFiltering.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/filtering/WebappDaoFactoryFiltering.java index 15fe0a643..184c63479 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/filtering/WebappDaoFactoryFiltering.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/filtering/WebappDaoFactoryFiltering.java @@ -179,10 +179,6 @@ public class WebappDaoFactoryFiltering implements WebappDaoFactory { return innerWebappDaoFactory.getUserURI(); } - public FlagDao getFlagDao() { - return innerWebappDaoFactory.getFlagDao(); - } - public KeywordIndividualRelationDao getKeys2EntsDao() { return innerWebappDaoFactory.getKeys2EntsDao(); } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ExternalTripleStoreInterface.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ExternalTripleStoreInterface.java deleted file mode 100644 index 37ed8bf7b..000000000 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ExternalTripleStoreInterface.java +++ /dev/null @@ -1,13 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.dao.jena; - -import com.hp.hpl.jena.rdf.model.Statement; - -public interface ExternalTripleStoreInterface { - - public abstract void addToExternalStore(Statement stmt) throws TripleStoreUnavailableException; - - public abstract void removeFromExternalStore(Statement stmt) throws TripleStoreUnavailableException; - -} diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/FlagDaoJena.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/FlagDaoJena.java deleted file mode 100644 index eed1d3c4f..000000000 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/FlagDaoJena.java +++ /dev/null @@ -1,36 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.dao.jena; - -import java.util.HashSet; -import java.util.List; - -import com.hp.hpl.jena.ontology.OntModel; - -import edu.cornell.mannlib.vitro.webapp.dao.FlagDao; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; - -public class FlagDaoJena extends JenaBaseDao implements FlagDao { - - public FlagDaoJena(WebappDaoFactoryJena wadf) { - super(wadf); - } - - public String convertNumericFlagToInsertString(int numeric, String column, - String table) { - // TODO Auto-generated method stub - return null; - } - - public String convertNumericFlagToInsertString(int numeric, - String flagColumns) { - // TODO Auto-generated method stub - return null; - } - - public String getFlagNames(String table, String field) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaToExternalTripleStoreSynchronizer.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaToExternalTripleStoreSynchronizer.java deleted file mode 100644 index fa740e1c9..000000000 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaToExternalTripleStoreSynchronizer.java +++ /dev/null @@ -1,108 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.dao.jena; - -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; - -//import org.openrdf.repository.Repository; -//import org.openrdf.repository.RepositoryConnection; -//import org.openrdf.repository.RepositoryResult; -//import org.openrdf.repository.http.HTTPRepository; -//import org.openrdf.repository.sail.SailRepository; -//import org.openrdf.rio.RDFFormat; -//import org.openrdf.sail.memory.MemoryStore; - -import com.hp.hpl.jena.ontology.OntModel; -import com.hp.hpl.jena.rdf.listeners.StatementListener; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.ModelFactory; -import com.hp.hpl.jena.rdf.model.Statement; -import com.hp.hpl.jena.rdf.model.StmtIterator; - -public class JenaToExternalTripleStoreSynchronizer extends StatementListener implements ServletContextListener { - - private ExternalTripleStoreInterface extStore; - - public JenaToExternalTripleStoreSynchronizer(ExternalTripleStoreInterface extStore, Model additionsQueue, Model retractionsQueue) { - this.extStore = extStore; - } - - private Model additionsQueue = ModelFactory.createDefaultModel(); - private Model retractionsQueue = ModelFactory.createDefaultModel(); - - // TODO: add a statement filter to filter out password props - - @Override - public void addedStatement(Statement stmt) { - if (!retractionsQueue.contains(stmt)) { - additionsQueue.add(stmt); - } else { - retractionsQueue.remove(stmt); - } -// try { - StmtIterator sit = retractionsQueue.listStatements(); - while (sit.hasNext()) { - Statement s = sit.nextStatement(); - - } -// } catch (TripleStoreUnavailableException e) { -// // log something? -// } - } - - @Override - public void removedStatement(Statement stmt) { - processUpdate(stmt, REMOVE); - } - - public void processUpdate(Statement stmt, boolean mode) { -// Repository myRepository = new HTTPRepository(sesameServer, repositoryID); -// myRepository.initialize(); -// RepositoryConnection myConn = myRepository.getConnection(); -// System.out.println(myConn.size()+" statements in remote Sesame"); -// -// Repository tempRepository = new SailRepository(new MemoryStore()); -// tempRepository.initialize(); -// tempRepository.getConnection().add(retractionsFile, null, RDFFormat.N3); -// System.out.println(tempRepository.getConnection().size()+" statements to retract"); -// RepositoryResult retractStmts = tempRepository.getConnection().getStatements(null, null, null, false); -// System.out.println("Retracting statements from repository..."); -// //myConn.remove(retractStmts); -// while (retractStmts.hasNext()) { -// Statement stmt = retractStmts.next(); -// myConn.remove(stmt.getSubject(), stmt.getPredicate(), null); -// } - } - - public static final boolean ADD = true; - public static final boolean REMOVE = false; - - public static final int SESAME_SERVER_URI = 0; - public static final int SESAME_REPOSITORY_NAME = 1; - - public List getSesameRepositories() { - List sesameRepositoryList = new ArrayList(); - String[] testRepository = new String[2]; - testRepository[SESAME_SERVER_URI] = "http://vivosesame.mannlib.cornell.edu:8080/openrdf-sesame"; - testRepository[SESAME_REPOSITORY_NAME] = "syncTest"; - sesameRepositoryList.add(testRepository); - return sesameRepositoryList; - } - - public void contextInitialized(ServletContextEvent sce) { - - OntModel jenaOntModel = (OntModel) sce.getServletContext().getAttribute(JenaBaseDao.JENA_ONT_MODEL_ATTRIBUTE_NAME); - jenaOntModel.getBaseModel().register(this); - } - - public void contextDestroyed(ServletContextEvent sce) { - - } - - - -} diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/WebappDaoFactoryJena.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/WebappDaoFactoryJena.java index 5d524d6a9..032eef959 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/WebappDaoFactoryJena.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/WebappDaoFactoryJena.java @@ -444,13 +444,6 @@ public class WebappDaoFactoryJena implements WebappDaoFactory { return entityWebappDao = new IndividualDaoJena(this); } - public FlagDao getFlagDao() { - if (flagDao != null) - return flagDao; - else - return flagDao = new FlagDaoJena(this); - } - public KeywordIndividualRelationDao getKeys2EntsDao() { if (keys2EntsDao != null) return keys2EntsDao; diff --git a/webapp/test/stubs/edu/cornell/mannlib/vitro/webapp/dao/WebappDaoFactoryStub.java b/webapp/test/stubs/edu/cornell/mannlib/vitro/webapp/dao/WebappDaoFactoryStub.java index 1b6364a69..9cf22d62f 100644 --- a/webapp/test/stubs/edu/cornell/mannlib/vitro/webapp/dao/WebappDaoFactoryStub.java +++ b/webapp/test/stubs/edu/cornell/mannlib/vitro/webapp/dao/WebappDaoFactoryStub.java @@ -214,12 +214,6 @@ public class WebappDaoFactoryStub implements WebappDaoFactory { "WebappDaoFactory.getLinktypeDao() not implemented."); } - @Override - public FlagDao getFlagDao() { - throw new RuntimeException( - "WebappDaoFactory.getFlagDao() not implemented."); - } - // TODO This goes away when the UserAccounts stuff is fully implemented -- jb @Override public UserDao getUserDao() { diff --git a/webapp/web/templates/edit/specific/portal_retry.jsp b/webapp/web/templates/edit/specific/applicationBean_retry.jsp similarity index 100% rename from webapp/web/templates/edit/specific/portal_retry.jsp rename to webapp/web/templates/edit/specific/applicationBean_retry.jsp