From: <vga...@us...> - 2010-04-01 20:20:44
|
Revision: 664 http://treebase.svn.sourceforge.net/treebase/?rev=664&view=rev Author: vgapeyev Date: 2010-04-01 20:20:37 +0000 (Thu, 01 Apr 2010) Log Message: ----------- Introducing JNDI parameters (to be used in Tomcat config in treebase-web.xml) PurlBase - instead of a compile-time parameter in treebase.properties; this fixes SF#2978838 SiteUrl - as requested recently, to support redirection to phylowidget.org Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/PhyloWSPath.java trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseUtil.java trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java trunk/treebase-core/src/main/resources/treebase.properties trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchResultsAsRDFController.java trunk/treebase-web/src/main/webapp/META-INF/context.xml.example trunk/treebase-web/src/main/webapp/WEB-INF/pages/journal.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/submissionSummaryView.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/urlAPI.jsp trunk/treebase-web/src/main/webapp/WEB-INF/web.xml Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/PhyloWSPath.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/PhyloWSPath.java 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/PhyloWSPath.java 2010-04-01 20:20:37 UTC (rev 664) @@ -24,13 +24,12 @@ } /** - * This method constructs a permanent url based on the - * treebase.purl.domain property (as computed by TreebaseUtil.getPurlDomain()), + * Constructs a PURL, based on the base URL of the PURL service (looked up through JNDI) * the phylows path and the namespaced GUID for the object. - * @return the permanent url for the object + * @return the PURL for the object */ public URL getPurl () { - StringBuilder sb = new StringBuilder(TreebaseUtil.getPurlDomain()); + StringBuilder sb = new StringBuilder(TreebaseUtil.getPurlBase()); sb = getPath(sb).append(mNamespacedGUID.toString()); LOGGER.info(sb); URL url = null; Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseUtil.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseUtil.java 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseUtil.java 2010-04-01 20:20:37 UTC (rev 664) @@ -16,6 +16,9 @@ import java.util.Properties; import java.util.TimeZone; +import javax.naming.InitialContext; +import javax.naming.NamingException; + import org.apache.log4j.Logger; import org.cipres.treebase.domain.study.Citation; import org.cipres.treebase.domain.study.Study; @@ -40,7 +43,8 @@ public static final String LINESEP = System.getProperty("line.separator"); public static final int citationMaxLength = 5000; private static final Logger LOGGER = Logger.getLogger(TreebaseUtil.class); - private static String mPurlDomain; + private static String mPurlBase; + private static String mSiteUrl; private TreebaseUtil() { super(); @@ -435,7 +439,8 @@ * * @return domain name */ - public static String getPurlDomain() { + /*-- + public static String getPurlBase() { if ( null == mPurlDomain ) { Properties properties = new Properties(); try { @@ -459,8 +464,54 @@ return mPurlDomain; } } +*/ + + /** + * Returns the base URL of the PURL service associated with this Treebase instance, + * which can be used to construct full PURLs by suffixing with a PhyloWS command, e.g. "/study/TB2:S1925" + * + * @return the base URL of the PURL service + */ + public static String getPurlBase() { + if (null != mPurlBase) + return mPurlBase; + else { + try { + mPurlBase = "http://DUMMY_PURL_BASE/"; + InitialContext ic = new InitialContext(); + mPurlBase = (String) ic.lookup("java:comp/env/tb2/PurlBase"); + } catch (NamingException e) { + LOGGER.info("Failure looking up tb2/PurlBase via JNDI"); + e.printStackTrace(); + } + return mPurlBase; + } + } + /** + * Returns the base URL of this Treebase instance, by looking it up in Tomcat via JNDI. + * + * @return the base URL of of this Treebase instance + */ + public static String getSiteUrl() { + if (null != mSiteUrl) + return mSiteUrl; + else { + try { + mSiteUrl = "http://DUMMY_SITE_URL/"; + InitialContext ic = new InitialContext(); + mSiteUrl = (String) ic.lookup("java:comp/env/tb2/SiteUrl"); + } catch (NamingException e) { + LOGGER.info("Failure looking up tb2/SiteUrl via JNDI"); + e.printStackTrace(); + } + return mSiteUrl; + } + } + + + /** * This method appends header information upon formatting to the nexus file. * * @param pStudy Study is needed to extract the citation information Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2010-04-01 20:20:37 UTC (rev 664) @@ -113,7 +113,7 @@ // This is called by child classes using super.getAnnotations() // to get the common annotations out of the way List<Annotation> annotations = new ArrayList<Annotation>(); - URI uri = URI.create(TreebaseUtil.getPurlDomain()+getPhyloWSPath()); + URI uri = URI.create(TreebaseUtil.getPurlBase()+getPhyloWSPath()); annotations.add(new Annotation(Constants.OWLURI,"owl:sameAs",uri)); return annotations; } Modified: trunk/treebase-core/src/main/resources/treebase.properties =================================================================== --- trunk/treebase-core/src/main/resources/treebase.properties 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-core/src/main/resources/treebase.properties 2010-04-01 20:20:37 UTC (rev 664) @@ -1,3 +1,2 @@ #options are: NexusServiceMesquite | NexusServiceNCL nexus.parser.impl=NexusServiceMesquite -treebase.purl.domain=http://purl.org/phylo/treebase/phylows/ Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java 2010-04-01 20:20:37 UTC (rev 664) @@ -49,7 +49,7 @@ // .append(':') // .append(request.getServerPort()) // .append("/treebase-web/phylows/"); - properties.setProperty("nexml.uri.base", TreebaseUtil.getPurlDomain()); + properties.setProperty("nexml.uri.base", TreebaseUtil.getPurlBase()); return properties; } Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java 2010-04-01 20:20:37 UTC (rev 664) @@ -91,7 +91,7 @@ request.getSession().setAttribute("namespacedGUID", namespacedGUID.toString()); // <c:set var="baseURL" value="http://localhost:8080/treebase-web/PhyloWS"/> // treebase.purl.domain=http://purl.org/phylo/treebase/phylows/ - request.getSession().setAttribute("baseURL", TreebaseUtil.getPurlDomain()); + request.getSession().setAttribute("baseURL", TreebaseUtil.getPurlBase()); request.getSession().setAttribute("phyloWSPath", phyloWSPath); return new ModelAndView("anyObjectAsRDF"); } Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchResultsAsRDFController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchResultsAsRDFController.java 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchResultsAsRDFController.java 2010-04-01 20:20:37 UTC (rev 664) @@ -35,7 +35,7 @@ request.getSession().setAttribute("searchResultsThawed", searchResults); request.getSession().setAttribute("recordSchema", request.getSession().getAttribute("recordSchema")); request.getSession().setAttribute("format", "rss1"); - request.getSession().setAttribute("baseURL", TreebaseUtil.getPurlDomain()); + request.getSession().setAttribute("baseURL", TreebaseUtil.getPurlBase()); request.getSession().setAttribute("phyloWSPath", phyloWSPath); if ( null != request.getParameter("query") ) { String query = request.getParameter("query"); Modified: trunk/treebase-web/src/main/webapp/META-INF/context.xml.example =================================================================== --- trunk/treebase-web/src/main/webapp/META-INF/context.xml.example 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-web/src/main/webapp/META-INF/context.xml.example 2010-04-01 20:20:37 UTC (rev 664) @@ -16,7 +16,7 @@ <Context reloadable="true"> - <Resource name="jdbc/TreebaseDB" auth="Container" + <Resource name="jdbc/TreebaseDB" auth="Container" type="javax.sql.DataSource" description="The JNDI DataSource for the Treebase postgres instance." driverClassName="org.postgresql.Driver" @@ -25,10 +25,18 @@ maxActive="20" maxIdle="10" maxWait="-1" /> - <Environment name="tb2/MesquiteFolder" value="/PATH/TO/YOUR/mesquite-2.01.tb" + <Environment name="tb2/MesquiteFolder" value="/PATH/TO/YOUR/mesquite-2.01.tb" type="java.lang.String" override="false" description="Absolute path to the directory where headless Mesquite is unpacked on the host system."/> + <Environment name="tb2/SiteUrl" value="http://YOUR-HOST/treebase-web/" + type="java.lang.String" override="false" + description="The base URL from which this Treebase instance is served."/> + + <Environment name="tb2/PurlBase" value="http://purl.org/YOUR/PURL/DOMAIN/phylows/" + type="java.lang.String" override="false" + description="The base URL of a PURL service that redirects to this Treebase instance."/> + </Context> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/journal.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/journal.jsp 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/journal.jsp 2010-04-01 20:20:37 UTC (rev 664) @@ -1,3 +1,6 @@ +<%@page import="org.cipres.treebase.TreebaseUtil"%> +<% String purlBase = TreebaseUtil.getPurlBase(); %> + <div class="gutter"> <h1>Journals</h1> <p>In addition to providing a digital library, TreeBASE serves the @@ -34,9 +37,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DEvolution" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DEvolution" title="Find records in TreeBASE for articles published in Evolution"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DEvolution + <%=purlBase%>study/find?query=prism.publicationName%3D%3DEvolution </a></p> </td> </tr> @@ -52,9 +55,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Evolutionary+Applications%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Evolutionary+Applications%22" title="Find records in TreeBASE for articles published in Evolutionary Applications"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Evolutionary+Applications%22 + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Evolutionary+Applications%22 </a></p> </td> </tr> @@ -70,9 +73,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Fungal+Biology%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Fungal+Biology%22" title="Find records in TreeBASE for articles published in Fungal Biology"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Fungal+Biology%22 + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Fungal+Biology%22 </a></p> </td> </tr> @@ -88,9 +91,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Invertebrate+Systematics%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Invertebrate+Systematics%22" title="Find records in TreeBASE for articles published in Invertebrate Systematics"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Invertebrate+Systematics%22 + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Invertebrate+Systematics%22 </a></p> </td> </tr> @@ -101,9 +104,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DMycologia" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DMycologia" title="Find records in TreeBASE for articles published in Mycologia"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DMycologia</a> + <%=purlBase%>study/find?query=prism.publicationName%3D%3DMycologia</a> </p> </td> </tr> @@ -116,9 +119,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Mycologial+Progress%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Mycologial+Progress%22" title="Find records in TreeBASE for articles published in Mycologial Progress"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Mycologial+Progress%22</a> + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Mycologial+Progress%22</a> </p> </td> </tr> @@ -132,9 +135,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Mycologial+Research%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Mycologial+Research%22" title="Find records in TreeBASE for articles published in Mycologial Research"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Mycologial+Research%22</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Mycologial+Research%22</a></p> </td> </tr> <tr> @@ -146,9 +149,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DMycoscience" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DMycoscience" title="Find records in TreeBASE for articles published in Mycoscience"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DMycoscience</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3DMycoscience</a></p> </td> </tr> <tr> @@ -158,9 +161,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DMycosphere" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DMycosphere" title="Find records in TreeBASE for articles published in Mycosphere"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DMycosphere</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3DMycosphere</a></p> </td> </tr> <tr> @@ -173,9 +176,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Organisms+Diversity+&+Evolution%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Organisms+Diversity+&+Evolution%22" title="Find records in TreeBASE for articles published in Organisms Diversity & Evolution"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Organisms+Diversity+&+Evolution%22</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Organisms+Diversity+&+Evolution%22</a></p> </td> </tr> <tr> @@ -185,9 +188,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DPersoonia" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DPersoonia" title="Find records in TreeBASE for articles published in Persoonia"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DPersoonia</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3DPersoonia</a></p> </td> </tr> <tr> @@ -203,9 +206,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DPhytopahology" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DPhytopahology" title="Find records in TreeBASE for articles published in Phytopahology"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DPhytopahology</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3DPhytopahology</a></p> </td> </tr> <tr> @@ -216,9 +219,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Plant+Disease%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Plant+Disease%22" title="Find records in TreeBASE for articles published in Plant Disease"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Plant+Disease%22</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Plant+Disease%22</a></p> </td> </tr> <tr> @@ -229,9 +232,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DRhodora" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DRhodora" title="Find records in TreeBASE for articles published in Rhodora"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DRhodora</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3DRhodora</a></p> </td> </tr> <tr> @@ -243,9 +246,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DMuelleria" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DMuelleria" title="Find records in TreeBASE for articles published in Muelleria"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DMuelleria</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3DMuelleria</a></p> </td> </tr> <tr> @@ -256,9 +259,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Studies+in+Mycology%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Studies+in+Mycology%22" title="Find records in TreeBASE for articles published in Studies in Mycology"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Studies+in+Mycology%22</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Studies+in+Mycology%22</a></p> </td> </tr> <tr> @@ -269,9 +272,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Systematic+Biology%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Systematic+Biology%22" title="Find records in TreeBASE for articles published in Systematic Biology"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Systematic+Biology%22</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Systematic+Biology%22</a></p> </td> </tr> <tr> @@ -282,9 +285,9 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Systematic+Botany%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Systematic+Botany%22" title="Find records in TreeBASE for articles published in Systematic Botany"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Systematic+Botany%22</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Systematic+Botany%22</a></p> </td> </tr> <tr> @@ -295,56 +298,56 @@ </td> <td> <p><a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Tropical+Bryology%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Tropical+Bryology%22" title="Find records in TreeBASE for articles published in Tropical Bryology"> - http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Tropical+Bryology%22</a></p> + <%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Tropical+Bryology%22</a></p> </td> </tr> </table> <p><b>Other Journals with a Significant Presence in TreeBASE</b>: <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%2American+Journal+of+Botany%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%2American+Journal+of+Botany%22" title="American Journal of Botany">American Journal of Botany</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Annals+of+the+Missouri+Botanical+Garden%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Annals+of+the+Missouri+Botanical+Garden%22" title="Annals of the Missouri Botanical Garden">Annals of the Missouri Botanical Garden</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Biological+Journal+of+the+Linnean+Society%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Biological+Journal+of+the+Linnean+Society%22" title="Biological Journal of the Linnean Society">Biological Journal of the Linnean Society</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22BMC+Evolutionary+Biology%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22BMC+Evolutionary+Biology%22" title="BMC Evolutionary Biology">BMC Evolutionary Biology</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Canadian+Journal+of+Botany%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Canadian+Journal+of+Botany%22" title="Canadian Journal of Botany">Canadian Journal of Botany</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DCladistics" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DCladistics" title="Cladistics">Cladistics</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Fungal+Diversity%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Fungal+Diversity%22" title="Fungal Diversity">Fungal Diversity</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22International+Journal+of+Plant+Sciences%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22International+Journal+of+Plant+Sciences%22" title="International Journal of Plant Sciences">International Journal of Plant Sciences</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Journal+of+Phycology%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Journal+of+Phycology%22" title="Journal of Phycology">Journal of Phycology</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Molecular+Biology+and+Evolution%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Molecular+Biology+and+Evolution%22" title="Molecular Biology and Evolution">Molecular Biology and Evolution</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Molecular+Ecology%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Molecular+Ecology%22" title="Molecular Ecology">Molecular Ecology</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Molecular+Phylogenetics+and+Evolution%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Molecular+Phylogenetics+and+Evolution%22" title="Molecular Phylogenetics and Evolution">Molecular Phylogenetics and Evolution</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Plant+Systematics+and+Evolution%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Plant+Systematics+and+Evolution%22" title="Plant Systematics and Evolution">Plant Systematics and Evolution</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Proceeding+of+the+National+Academy+of+Sciences+of+the+United+States+of+America%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Proceeding+of+the+National+Academy+of+Sciences+of+the+United+States+of+America%22" title="Proceeding of the National Academy of Sciences of the United States of America"> Proceeding of the National Academy of Sciences of the United States of America</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3D%22Proceedings+of+the+Royal+Society+B%22" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3D%22Proceedings+of+the+Royal+Society+B%22" title="Proceedings of the Royal Society B">Proceedings of the Royal Society B</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DTaxon" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DTaxon" title="Taxon">Taxon</a>; <a - href="http://purl.org/phylo/treebase/phylows/study/find?query=prism.publicationName%3D%3DZootaxa" + href="<%=purlBase%>study/find?query=prism.publicationName%3D%3DZootaxa" title="Zootaxa">Zootaxa</a></p> </div> \ No newline at end of file Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/submissionSummaryView.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/submissionSummaryView.jsp 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/submissionSummaryView.jsp 2010-04-01 20:20:37 UTC (rev 664) @@ -1,4 +1,7 @@ +<%@page import="org.cipres.treebase.TreebaseUtil"%> +<% String purlBase = TreebaseUtil.getPurlBase(); %> <%@ include file="/common/taglibs.jsp"%> + <head> <title>Summary Information</title> <content tag="heading">Summary for current study</content> @@ -28,10 +31,10 @@ </a> <br/> <br/> -<a href="<c:out value="http://purl.org/phylo/treebase/phylows/study/TB2:S"/><c:out value="${submission.study.id}"/>"> +<a href="<c:out value="${submission.study.phyloWSPath.purl}"/>"> <img class="iconButton" alt="link" src="<fmt:message key="icons.weblink"/>" /> Study Accession URL:<br/> - <c:out value="http://purl.org/phylo/treebase/phylows/study/TB2:S"/><c:out value="${submission.study.id}"/> + <c:out value="${submission.study.phyloWSPath.purl}"/> </a> <div><strong>You can cite this URL in your manuscript. It will become the permanent and resolvable resource locator after your submission has been approved and the data are made public.</strong></div> <br/> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/urlAPI.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/urlAPI.jsp 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/urlAPI.jsp 2010-04-01 20:20:37 UTC (rev 664) @@ -1,3 +1,6 @@ +<%@page import="org.cipres.treebase.TreebaseUtil"%> +<% String purlBase = TreebaseUtil.getPurlBase(); %> + <div class="gutter"> <h1>Data Access</h1> <h2>Web Browser User Interface</h2> @@ -41,11 +44,11 @@ </p> <dl> <dt>URI to a study</dt> - <dd>http://purl.org/phylo/treebase/phylows/study/TB2:S1925</dd> + <dd><%=purlBase%>study/TB2:S1925</dd> <dt>URI to a matrix</dt> - <dd>http://purl.org/phylo/treebase/phylows/matrix/TB2:M2610</dd> + <dd><%=purlBase%>matrix/TB2:M2610</dd> <dt>URI to a tree</dt> - <dd>http://purl.org/phylo/treebase/phylows/tree/TB2:Tr2026</dd> + <dd><%=purlBase%>tree/TB2:Tr2026</dd> </dl> <h2>RSS Feeds</h2> <p> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/web.xml =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/web.xml 2010-03-31 18:46:29 UTC (rev 663) +++ trunk/treebase-web/src/main/webapp/WEB-INF/web.xml 2010-04-01 20:20:37 UTC (rev 664) @@ -54,8 +54,26 @@ <env-entry-name>tb2/MesquiteFolder</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> </env-entry> - + + <env-entry> + <description>The base URL from which this Treebase instance is served. + Most likely, it has the form "http://your.server.xxx/treebase-web/". + Trailing slash is required.</description> + <env-entry-name>tb2/SiteUrl</env-entry-name> + <env-entry-type>java.lang.String</env-entry-type> + </env-entry> + + <env-entry> + <description>The base URL of a PURL service that redirects to this Treebase instance. + The PURL service should resolve tb2/PurlBase value into something + like "http://your.server.xxx/..../treebase-web/phylows/", + which must be the valid PhyloWS URL of this Treebase instance. + Trailing slash is required.</description> + <env-entry-name>tb2/PurlBase</env-entry-name> + <env-entry-type>java.lang.String</env-entry-type> + </env-entry> + <!-- ========================================================== --> <!-- List of Filters --> <!-- ========================================================== --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |