|
From: <rv...@us...> - 2009-06-28 11:49:39
|
Revision: 152
http://treebase.svn.sourceforge.net/treebase/?rev=152&view=rev
Author: rvos
Date: 2009-06-28 11:49:36 +0000 (Sun, 28 Jun 2009)
Log Message:
-----------
Made redirect URLs absolute
Modified Paths:
--------------
trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/PhyloWSController.java
trunk/treebase-web/src/main/webapp/WEB-INF/pages/anyObjectAsRDF.jsp
Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/PhyloWSController.java
===================================================================
--- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/PhyloWSController.java 2009-06-28 11:09:50 UTC (rev 151)
+++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/PhyloWSController.java 2009-06-28 11:49:36 UTC (rev 152)
@@ -60,6 +60,7 @@
throws Exception {
res.setContentType("text/plain");
String url = null;
+ String domain = "http://" + req.getServerName() + ":" + req.getServerPort();
try {
String pathInfo = req.getPathInfo();
if ( TreebaseUtil.isEmpty(pathInfo) ) {
@@ -81,17 +82,17 @@
TreebaseIDString tbID = namespacedGUID.getTreebaseIDString();
if ( hasWebPage(pathComponents) ) {
if ( TreebaseUtil.isEmpty(req.getParameter(format)) ) {
- url = "/treebase-web/search/study/anyObjectAsRDF.html?namespacedGUID=" + namespacedGUID.toString();
+ url = domain + "/treebase-web/search/study/anyObjectAsRDF.html?namespacedGUID=" + namespacedGUID.toString();
}
else if ( req.getParameter(format).equals("html") ) {
- url = createUrl(tbID.getTypePrefix(),tbID.getId());
+ url = domain + createUrl(tbID.getTypePrefix(),tbID.getId());
}
else {
- url = createDownloadUrl(tbID.getTypePrefix(),tbID.getId(),req.getParameter(format));
+ url = domain + createDownloadUrl(tbID.getTypePrefix(),tbID.getId(),req.getParameter(format));
}
}
else {
- url = "/treebase-web/search/study/anyObjectAsRDF.html?namespacedGUID=" + namespacedGUID.toString();
+ url = domain + "/treebase-web/search/study/anyObjectAsRDF.html?namespacedGUID=" + namespacedGUID.toString();
}
}
} catch ( MalformedTreebaseIDString e ) {
Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/anyObjectAsRDF.jsp
===================================================================
--- trunk/treebase-web/src/main/webapp/WEB-INF/pages/anyObjectAsRDF.jsp 2009-06-28 11:09:50 UTC (rev 151)
+++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/anyObjectAsRDF.jsp 2009-06-28 11:49:36 UTC (rev 152)
@@ -7,7 +7,7 @@
xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="${baseURL}/${phyloWSPath}">
<title>${phyloWSPath}</title>
- <link>${baseURL}/${phyloWSPath}</link>
+ <link>${baseURL}</link>
<description>Serializations for ${phyloWSPath}</description>
<image rdf:resource="${domainAddress}<fmt:message key="icons.treebase.16px"/>"/>
<items>
@@ -21,7 +21,7 @@
</channel>
<image rdf:about="${domainAddress}<fmt:message key="icons.treebase.16px"/>">
<title>${phyloWSPath}</title>
- <link>${baseURL}/${phyloWSPath}</link>
+ <link>${baseURL}</link>
<url>${domainAddress}<fmt:message key="icons.treebase.16px"/></url>
</image>
<c:if test="${hasWebPage}">
@@ -29,7 +29,7 @@
<title>Web page</title>
<link>${baseURL}/${phyloWSPath}?format=html</link>
<description>A human-readable version of the resource</description>
- <!--dcterms:format>text/html</dcterms:format-->
+ <dc:format>text/html</dc:format>
<dc:language>EN-US</dc:language>
</item>
</c:if>
@@ -38,7 +38,7 @@
<title>NeXML file</title>
<link>${baseURL}/${phyloWSPath}?format=nexml</link>
<description>A NeXML serialization of the resource</description>
- <!--dcterms:format>application/xml</dcterms:format-->
+ <dc:format>application/xml</dc:format>
</item>
</c:if>
<c:if test="${hasNexus}">
@@ -46,7 +46,7 @@
<title>Nexus file</title>
<link>${baseURL}/${phyloWSPath}?format=nexus</link>
<description>A Nexus serialization of the resource</description>
- <!--dcterms:format>text/plain</dcterms:format-->
+ <dc:format>text/plain</dc:format>
</item>
</c:if>
<c:if test="${hasRdf}">
@@ -54,7 +54,7 @@
<title>RDF file</title>
<link>${baseURL}/${phyloWSPath}?format=rdf</link>
<description>An RDF/XML serialization of the resource</description>
- <!--dcterms:format>application/rdf+xml</dcterms:format-->
+ <dc:format>application/rdf+xml</dc:format>
</item>
</c:if>
</rdf:RDF>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|