Menu

TermInfo

David Osumi-Sutherland

TermInfo technical description

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

  1. Check content type: Neuron, Neuropil, Tract or Clone. Then roll the appropriate menus. This check uses lists generated by DL queries for autocomplete that are stored in memory.

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>


~~~~~~~

  1. Then look up and print names, synonyms, refs, relationships from ontBean.

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">
            &nbsp;&nbsp;&nbsp; * ${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}">
                    &nbsp;&nbsp;<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.

  1. Include film strip at bottom. Currently this code first checks whether the ontBean is a clone or a neurons, then chooses a type of film strip accordingly.

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 &amp;&amp; !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.


Related

Wiki: page_descriptions

MongoDB Logo MongoDB