1. Implemented the backend for accepting shorter urls for visualizations. This partially implements the feature described here http://issues.library.cornell.edu/browse/NIHVIVO-1097

2. Changed the IndividualTemplateModel to render shorter vis urls for temporal graph & ego-centric networks.
3. changed main toggle visualization links in ego-centric networks to use shorter vis urls.
This commit is contained in:
cdtank 2011-04-28 20:28:36 +00:00
parent 4bd69801ce
commit 29ca04f648
18 changed files with 488 additions and 45 deletions

View file

@ -63,6 +63,14 @@
<entry key="person_level">
<ref bean="person_level"></ref>
</entry>
<entry key="author-network">
<ref bean="person_level"></ref>
</entry>
<entry key="investigator-network">
<ref bean="person_level"></ref>
</entry>
<!--
<entry key="entity_comparison">
@ -73,11 +81,14 @@
<entry key="entity_comparison">
<ref bean="entity_comparison"></ref>
</entry>
<entry key="pub_temporal">
<ref bean="pub_temporal"></ref>
</entry>
<entry key="publication-graph">
<ref bean="entity_comparison"></ref>
</entry>
<entry key="coprincipalinvestigator">
<ref bean="coprincipalinvestigator"></ref>
@ -89,7 +100,11 @@
<entry key="grant_temporal">
<ref bean="grant_temporal"></ref>
</entry>
</entry>
<entry key="grant-graph">
<ref bean="entity_grant_count"></ref>
</entry>
</map>
</property>

View file

@ -1310,7 +1310,12 @@
<servlet>
<servlet-name>StandardVisualizationController</servlet-name>
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.StandardVisualizationController</servlet-class>
</servlet>
</servlet>
<servlet>
<servlet-name>ShortURLVisualizationController</servlet-name>
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.ShortURLVisualizationController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>StandardVisualizationController</servlet-name>
@ -1321,6 +1326,14 @@
<servlet-name>StandardVisualizationController</servlet-name>
<url-pattern>/visualization</url-pattern>
</servlet-mapping>
<!--
This mapping is done to facilitate shorter vis urls.
-->
<servlet-mapping>
<servlet-name>ShortURLVisualizationController</servlet-name>
<url-pattern>/vis/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>AjaxVisualizationController</servlet-name>

View file

@ -1,13 +1,14 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#assign standardVisualizationURLRoot ="/visualization">
<#assign shortVisualizationURLRoot ="/vis">
<#assign ajaxVisualizationURLRoot ="/visualizationAjax">
<#assign dataVisualizationURLRoot ="/visualizationData">
<#assign egoURI ="${egoURIParam?url}">
<#assign egoCoAuthorshipDataFeederURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&vis_mode=coauthor_network_stream&labelField=label'>
<#assign coprincipalinvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${egoURI}&vis_mode=copi'>
<#assign coprincipalinvestigatorURL = '${urls.base}${shortVisualizationURLRoot}/investigator-network/?uri=${egoURI}'>
<#assign egoCoAuthorsListDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&vis_mode=coauthors'>
<#assign egoCoAuthorshipNetworkDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&vis_mode=coauthor_network_download'>

View file

@ -1,13 +1,14 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#assign standardVisualizationURLRoot ="/visualization">
<#assign shortVisualizationURLRoot ="/vis">
<#assign ajaxVisualizationURLRoot ="/visualizationAjax">
<#assign dataVisualizationURLRoot ="/visualizationData">
<#assign egoURI ="${egoURIParam?url}">
<#assign egoCoInvestigationDataFeederURL = '${urls.base}${dataVisualizationURLRoot}?vis=coprincipalinvestigator&uri=${egoURI}&vis_mode=copi_network_stream&labelField=label'>
<#assign coauthorshipURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${egoURI}&vis_mode=coauthor'>
<#assign coauthorshipURL = '${urls.base}${shortVisualizationURLRoot}/author-network/?uri=${egoURI}'>
<#assign egoCoInvestigatorsListDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coprincipalinvestigator&uri=${egoURI}&vis_mode=copis'>
<#assign egoCoInvestigationNetworkDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coprincipalinvestigator&uri=${egoURI}&vis_mode=copi_network_download'>