[Yanel-commits] rev 44004 -
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 Aug 5 12:11:18 CEST 2009
Author: michi
Date: 2009-08-05 12:11:18 +0200 (Wed, 05 Aug 2009)
New Revision: 44004
Modified:
public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java
Log:
use searcher interface and replace space has become obsolete
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 2009-08-05 10:05:58 UTC (rev 44003)
+++ public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java 2009-08-05 10:11:18 UTC (rev 44004)
@@ -111,7 +111,7 @@
private StringBuffer getThirdPartyResults(String qs) {
StringBuffer sb = new StringBuffer("");
try {
- ResultSet resultSet = getSearchResults(qs.replaceAll(" ", "+") + "+FOAF");
+ ResultSet resultSet = getSearchResults(qs + "+FOAF");
if (resultSet != null && resultSet.size() > 0) {
sb.append("<provider source-name=\"" + resultSet.getSourceName() + "\" source-domain=\"" + resultSet.getSourceDomain() + "\" numberOfResults=\"" + resultSet.size() + "\">");
@@ -151,7 +151,7 @@
StringBuffer sb = new StringBuffer("");
Repository pRepo = getProfilesRepository();
- Node[] pNodes = pRepo.search(qs);
+ Node[] pNodes = pRepo.getSearcher().search(qs);
if (pNodes != null && pNodes.length > 0) {
sb.append("<provider source-name=\"" + "Wyona-FOAF" + "\" source-domain=\"" + "http://foaf.wyona.org" + "\" numberOfResults=\"" + pNodes.length + "\">");
for (int i = 0; i < pNodes.length; i++) {
More information about the Yanel-commits
mailing list