diff --git a/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AppletInteractionController.java b/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AppletInteractionController.java deleted file mode 100644 index 684b8360e..000000000 --- a/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AppletInteractionController.java +++ /dev/null @@ -1,113 +0,0 @@ - - - -package org.cipres.treebase.web.controllers; - -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.OutputStream; -import java.io.StringReader; -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.mvc.AbstractController; -import org.w3c.dom.CharacterData; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; - -import org.cipres.treebase.domain.tree.PhyloTreeService; - -public class AppletInteractionController extends AbstractController { - - public static final String xmlHeader = "\n"; - - private PhyloTreeService mPhyloTreeService; - - @Override - protected ModelAndView handleRequestInternal( - HttpServletRequest pRequest, - HttpServletResponse pResponse) throws Exception { - - System.out.println("I am in AppletInteraction Controller"); - InputStream in = pRequest.getInputStream(); - ObjectInputStream inputFromApplet = new ObjectInputStream(in); - String echo = (String) inputFromApplet.readObject(); - System.out.println(echo); - inputFromApplet.close(); - in.close(); - - // echo it to the applet - OutputStream outstr = pResponse.getOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(outstr); - oos.writeObject("Sending.....OK"); - oos.flush(); - oos.close(); - outstr.flush(); - outstr.close(); - - // set the namespace context for resolving prefixes of the Qnames - // to NS URI, if the xpath expresion uses Qnames. XPath expression - // would use Qnames if the XML document uses namespaces. - // xpathprocessor.setNamespaceContext(NamespaceContext nsContext); - // create XPath expressions - - InputSource inputSource = new InputSource(new StringReader(xmlHeader + echo)); - DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - Document doc = builder.parse(inputSource); - - NodeList trees = doc.getElementsByTagName("treeid"); - - Node treeId = trees.item(0); - - String treeid = getCharacterDataFromElement(treeId); - - NodeList newick = doc.getElementsByTagName("newickstring"); - - Node newickString = (Node) newick.item(0); - - String newickstring = getCharacterDataFromElement(newickString); - // String newickString = newick.getNodeValue(); - - System.out.println("Tree Id-1: " + treeid); - System.out.println("Newick-1: " + newickstring); - - getPhyloTreeService().updateByRearrangeNodes(new Long(treeid), newickstring); - - return null; - } - - public static String getCharacterDataFromElement(Node e) { - - List values = new ArrayList(); - Node firstChild = e.getFirstChild(); - if (firstChild instanceof CharacterData) { - CharacterData cd = (CharacterData) firstChild; - return cd.getData(); - } - return "?"; - } - - /** - * @return the phyloTreeService - */ - public PhyloTreeService getPhyloTreeService() { - return mPhyloTreeService; - } - - /** - * @param pPhyloTreeService the phyloTreeService to set - */ - public void setPhyloTreeService(PhyloTreeService pPhyloTreeService) { - mPhyloTreeService = pPhyloTreeService; - } - -} diff --git a/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectToPhyloWidgetController.java b/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectToPhyloWidgetController.java deleted file mode 100644 index 124071133..000000000 --- a/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectToPhyloWidgetController.java +++ /dev/null @@ -1,69 +0,0 @@ - - - -package org.cipres.treebase.web.controllers; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.mvc.Controller; - -import org.cipres.treebase.domain.tree.PhyloTree; -import org.cipres.treebase.domain.tree.PhyloTreeService; - -/** - * - * @author madhu - * - * Created on, October 11, 2007 - * - */ - -public class DirectToPhyloWidgetController implements Controller { - - private PhyloTreeService mPhyloTreeService; - protected String mDefaultView; - - public PhyloTreeService getPhyloTreeService() { - return mPhyloTreeService; - } - - - public String getDefaultView() { - return mDefaultView; - } - - public void setDefaultView(String defaultView) { - this.mDefaultView = defaultView; - } - - /** - * Set the PhyloTreeService - */ - public void setPhyloTreeService(PhyloTreeService pNewPhyloTreeService) { - mPhyloTreeService = pNewPhyloTreeService; - } - - public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) - throws Exception { - - if (request.getParameter("treeid") != null) { - - PhyloTree pt = getPhyloTreeService().findByID( - Long.parseLong(request.getParameter("treeid"))); - - Map treemap = new HashMap(); - treemap.put("TreeId:" + pt.getId(), pt.getNewickString()); - request.getSession().setAttribute("NEWICKSTRINGSMAP", treemap); - - } - - return new ModelAndView(getDefaultView()); - - } - -} diff --git a/treebase-web/src/main/webapp/WEB-INF/pages/analysisSection-Piece.jsp b/treebase-web/src/main/webapp/WEB-INF/pages/analysisSection-Piece.jsp index e213311d0..e16b1e821 100644 --- a/treebase-web/src/main/webapp/WEB-INF/pages/analysisSection-Piece.jsp +++ b/treebase-web/src/main/webapp/WEB-INF/pages/analysisSection-Piece.jsp @@ -1,6 +1,6 @@ <%@ include file="/common/taglibs.jsp"%> - +
  • Software Used: @@ -24,7 +24,7 @@ - + diff --git a/treebase-web/src/main/webapp/WEB-INF/pages/search/study/treeBlocks.jsp b/treebase-web/src/main/webapp/WEB-INF/pages/search/study/treeBlocks.jsp index 9e42afdfc..3e326c698 100644 --- a/treebase-web/src/main/webapp/WEB-INF/pages/search/study/treeBlocks.jsp +++ b/treebase-web/src/main/webapp/WEB-INF/pages/search/study/treeBlocks.jsp @@ -67,7 +67,7 @@ " >View trees --%> - View trees + View trees <%if(request.isUserInRole("Admin") || request.isUserInRole("Associate Editor")){%> diff --git a/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp b/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp index 32992fecf..58d228729 100644 --- a/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp +++ b/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp @@ -12,13 +12,7 @@ <% pageContext.setAttribute("accesscode",request.getSession().getAttribute("x-access-code")); %> - + - Tr${tree.id} + + + + + + + Tr${tree.id} - + + + + + + + " diff --git a/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp b/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp index 957481b14..17666c34d 100644 --- a/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp +++ b/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp @@ -4,15 +4,6 @@ <%--content tag="heading"> - - - Tr${tree.id} + + + + Tr${tree.id} @@ -85,7 +79,10 @@ sortable="false" class="iconColumn" headerClass="iconColumn"> - + + + + " @@ -117,7 +114,7 @@ - - + + diff --git a/treebase-web/src/main/webapp/WEB-INF/pages/treeBlockList.jsp b/treebase-web/src/main/webapp/WEB-INF/pages/treeBlockList.jsp index b6527f3f6..1f505c166 100644 --- a/treebase-web/src/main/webapp/WEB-INF/pages/treeBlockList.jsp +++ b/treebase-web/src/main/webapp/WEB-INF/pages/treeBlockList.jsp @@ -87,18 +87,18 @@ Tree blocks alt=""/> - - - - " - title="" - alt=""/> - + + + + " + title="" + alt=""/> +

    Table below shows a list of trees belonging to a Block with ID: and Title:

    -
    -
    - -Trees -" /> + +
    + +Trees +" /> @@ -40,19 +40,19 @@ Trees "/> " /> - - - - - - - + + + + + + + @@ -80,86 +80,86 @@ Trees - - - - - " - title="" - alt=""/> - - - " - title="" - alt=""/> - - - - + + + + + " + title="" + alt=""/> + + + " + title="" + alt=""/> + + + + - - " - title="" - alt=""/> + + " + title="" + alt=""/> - - - " - title="" - alt=""/> - - - " - title="" + url="/user/downloadATree.html" + paramId="treeid" + paramProperty="id" + class="iconColumn" + headerClass="iconColumn"> + " + title="" + alt=""/> + + + + " + title="" alt=""/> - - - - - " - title="" - alt=""/> - + + + + + " + title="" + alt=""/> + @@ -183,3 +183,4 @@ Trees
    + diff --git a/treebase-web/src/main/webapp/WEB-INF/pages/treeViewer.jsp b/treebase-web/src/main/webapp/WEB-INF/pages/treeViewer.jsp index 80f500a3c..9d2ac96b2 100644 --- a/treebase-web/src/main/webapp/WEB-INF/pages/treeViewer.jsp +++ b/treebase-web/src/main/webapp/WEB-INF/pages/treeViewer.jsp @@ -7,15 +7,49 @@ Tree Viewer - - - - - + + + + + + + + + + + + +
    + + +
    Select a tree from the list to view it.
    @@ -155,21 +328,21 @@ legend {
      -
    1. - ${tree.label} + - ${tree.title} + - Tree ${tree.id} + Tree
    2. @@ -188,13 +361,13 @@ legend {
    - - diff --git a/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml b/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml index fe1119cff..48d7cf12b 100644 --- a/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml +++ b/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml @@ -28,11 +28,9 @@ - + - - - + @@ -627,10 +625,7 @@ redirect:/user/treeList.html - - - treeViewer - + @@ -1004,7 +999,7 @@ deleteAMatrixController deleteARowSegmentController readOnlyListTreeController - directToPhyloWidgetController + directMapToPhyloWidgetController nexusFilesController uploadRowSegmentDataController @@ -1013,7 +1008,7 @@ exportRowSegmentDataController exportRowSegmentTemplateController - appletInteractionController + treeParserController diff --git a/treebase-web/src/main/webapp/common/adminMenu.jsp b/treebase-web/src/main/webapp/common/adminMenu.jsp index 5fa55851c..adf340ac3 100644 --- a/treebase-web/src/main/webapp/common/adminMenu.jsp +++ b/treebase-web/src/main/webapp/common/adminMenu.jsp @@ -4,7 +4,7 @@