Example page: http://www.virtualflybrain.org/site/tools/anatomy_finder/index.htm?id=FBbt:00003632
See also information about terms displayed at the bottom of the page on Stack Browser and QueryBuilder pages.
Generated by: ontBean.jsp (sourceforge.net)
Data source: OntBean
TODO: investigate how efficient, or not, this is. Potential alternatives include superClass binary check using brain. (github.com), or storing the query results for fast-lookup from a local DB.
~~~~~~~~~
:::JSP
<%
//test the spring framework
ServletContext servletContext = this.getServletContext();
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
AutocompleteDAO acdao = (AutocompleteDAO)wac.getBean("autocompleteDAONeuropil");
pageContext.setAttribute("aclNeuropil", acdao.getSynSet());
...
%>
<c:foreach items="${aclNeuron}" var="neuron" varstatus="i">
<c:if test="${ontBean.fbbtId == neuron.fbbtId}">
<c:set var="isNeuron" value="true" scope="request">
</c:set></c:if></c:foreach>
...
<jsp:include page="/jsp/includes/bits/${termMenu}">
<jsp:param name="fbbtId" value="${ontBean.fbbtId}">
</jsp:param></jsp:include>
~~~~~~~
Note - during iteration, over relationships, there is check for whether the object of a relationship is a neuropil or not. If it is, this triggers see in viewer.
:::JSP
<c:forEach items="${ontBean.relationships}" var="curr" varStatus="status">
* ${curr.value[0]}
<a href="/site/tools/anatomy_finder/index.htm?id=${curr.key}" title="Look up" target="_top">${curr.value[1]}</a>
<c:forEach items="${aclNeuropil}" var="neuropil" varStatus="i">
<c:if test="${id == neuropil.fbbtId}">
<a href="/site/stacks/index.htm?add=${id} " target="_top"
title="Add to the selected domains in the viewer">See in the viewer >> </a>
</c:if>
</c:forEach>
This is not ideal for future extension of content. We really need a lookup for whether we have a painted domain (or at least a partonomy tree node) for the term in question.
THIS NEEDS TO CHANGE - FOR THE SAKE OF EASY ADDITION OF NEW IMAGE DATA OF ANY TYPE, THIS CODE NEEDS TO BE GENERIC!
~~~~~~~~
:::JSP
<c:if test="${!isNeuron && !isClone}">
<c:set var="isNeuropil" value="true">
See in the viewer >>
</c:set></c:if>
<c:if test="${isClone}">
<jsp:include page="/do/clone_film_strip.html">
<jsp:param name="action" value="exemplar_neuron">
<jsp:param name="id" value="${ontBean.fbbtId}">
</jsp:param></jsp:param></jsp:include></c:if>
</c:if>
<c:if test="${isNeuron || isCone}">
<br/>
<jsp:include page="/do/neuron_film_strip.html">
<jsp:param name="action" value="exemplar_neuron" />
<jsp:param name="id" value="${ontBean.fbbtId}" />
</jsp:include>
</c:if>
~~~~~~~~~~
Note also the code restricting the see-in-viewer to things that are not Neurons or Clones.
We do need a restriction here, but classification should NOT be on this basis. There are many other things in anatomy that are not clones or Neurons! e.g. tracts & glial cells
"see in viewer" is not appropriate in these cases.
Instead we need a lookup for whether we have a painted domain in a stack (or at least an entry in a browsing tree). In the absence of this, a quick lookup to see if the class if a neuropil would be an improvement.