[Yanel-commits] rev 29325 -
public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend
michi at wyona.com
michi at wyona.com
Wed Nov 28 21:46:51 CET 2007
Author: michi
Date: 2007-11-28 21:46:50 +0100 (Wed, 28 Nov 2007)
New Revision: 29325
Modified:
public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java
Log:
remove suffix
Modified: public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java
===================================================================
--- public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java 2007-11-28 20:46:22 UTC (rev 29324)
+++ public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java 2007-11-28 20:46:50 UTC (rev 29325)
@@ -104,7 +104,7 @@
sb.append("<result number=\"" + "1" + "\" source-name=\"" + "Wyona-FOAF" + "\">");
sb.append("<title><![CDATA[" + "Foo Bar" + "]]></title>");
sb.append("<excerpt><![CDATA[" + "About Foo Bar ..." + "]]></excerpt>");
- sb.append("<url><![CDATA[" + "profiles/" + pNodes[i].getName() + ".html" + "]]></url>");
+ sb.append("<url><![CDATA[" + "profiles/" + withoutSuffix(pNodes[i].getName()) + ".html" + "]]></url>");
sb.append("<last-modified><![CDATA[" + "null" + "]]></last-modified>");
sb.append("<mime-type suffix=\"html\">application/xhtml+xml</mime-type>");
sb.append("</result>");
@@ -188,4 +188,11 @@
}
return repo;
}
+
+ /**
+ *
+ */
+ private String withoutSuffix(String name) {
+ return name.substring(0, name.lastIndexOf("."));
+ }
}
More information about the Yanel-commits
mailing list