You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by fc...@apache.org on 2012/04/17 21:03:38 UTC
svn commit: r1327226 - in
/incubator/stanbol/branches/0.9.0-incubating/contenthub: servicesapi/
servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/related/
web/ web/src/appended-resources/ web/src/main/appended-resources/ web/sr...
Author: fchrist
Date: Tue Apr 17 19:03:38 2012
New Revision: 1327226
URL: http://svn.apache.org/viewvc?rev=1327226&view=rev
Log:
STANBOL-585 STANBOL-586 merged changes in #1326932 for removing JAWS to 0.9.0-incubating branch
Modified:
incubator/stanbol/branches/0.9.0-incubating/contenthub/servicesapi/ (props changed)
incubator/stanbol/branches/0.9.0-incubating/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/related/RelatedKeywordSearchManager.java
incubator/stanbol/branches/0.9.0-incubating/contenthub/web/ (props changed)
incubator/stanbol/branches/0.9.0-incubating/contenthub/web/src/appended-resources/ (props changed)
incubator/stanbol/branches/0.9.0-incubating/contenthub/web/src/main/appended-resources/ (props changed)
incubator/stanbol/branches/0.9.0-incubating/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/resources/RelatedKeywordResource.java
Propchange: incubator/stanbol/branches/0.9.0-incubating/contenthub/servicesapi/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Apr 17 19:03:38 2012
@@ -0,0 +1 @@
+/incubator/stanbol/trunk/contenthub/servicesapi:1301064-1303319,1303391-1303402,1303405-1304408,1326932
Modified: incubator/stanbol/branches/0.9.0-incubating/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/related/RelatedKeywordSearchManager.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/0.9.0-incubating/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/related/RelatedKeywordSearchManager.java?rev=1327226&r1=1327225&r2=1327226&view=diff
==============================================================================
--- incubator/stanbol/branches/0.9.0-incubating/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/related/RelatedKeywordSearchManager.java (original)
+++ incubator/stanbol/branches/0.9.0-incubating/contenthub/servicesapi/src/main/java/org/apache/stanbol/contenthub/servicesapi/search/related/RelatedKeywordSearchManager.java Tue Apr 17 19:03:38 2012
@@ -70,20 +70,6 @@ public interface RelatedKeywordSearchMan
SearchResult getRelatedKeywordsFromAllSources(String keyword, String ontologyURI) throws SearchException;
/**
- * Searches related keywords in the Wordnet database for the given <code>keyword</code>.
- *
- * @param keyword
- * Keyword for which related keywords will be obtained
- * @return a {@link SearchResult} instance which encapsulates the related keyword {@link Map}. This map
- * would have a single key which is the given <code>keyword</code>. The value corresponding to the
- * key is another map. It also has a single key which indicates the "Wordnet" source. Value
- * corresponding to this key contains {@link List} of {@link RelatedKeyword}s obtained from
- * Wordnet.
- * @throws SearchException
- */
- SearchResult getRelatedKeywordsFromWordnet(String keyword) throws SearchException;
-
- /**
* Searches related keywords from the ontology specified by <code>ontologyURI</code> for the given
* <code>keyword</code>.
*
Propchange: incubator/stanbol/branches/0.9.0-incubating/contenthub/web/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Apr 17 19:03:38 2012
@@ -0,0 +1 @@
+/incubator/stanbol/trunk/contenthub/web:1301064-1303319,1303391-1303402,1303405-1304408,1326932
Propchange: incubator/stanbol/branches/0.9.0-incubating/contenthub/web/src/appended-resources/
------------------------------------------------------------------------------
Merged /incubator/stanbol/trunk/contenthub/web/src/appended-resources:r1326932
Propchange: incubator/stanbol/branches/0.9.0-incubating/contenthub/web/src/main/appended-resources/
------------------------------------------------------------------------------
Merged /incubator/stanbol/trunk/contenthub/web/src/main/appended-resources:r1326932
Modified: incubator/stanbol/branches/0.9.0-incubating/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/resources/RelatedKeywordResource.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/branches/0.9.0-incubating/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/resources/RelatedKeywordResource.java?rev=1327226&r1=1327225&r2=1327226&view=diff
==============================================================================
--- incubator/stanbol/branches/0.9.0-incubating/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/resources/RelatedKeywordResource.java (original)
+++ incubator/stanbol/branches/0.9.0-incubating/contenthub/web/src/main/java/org/apache/stanbol/contenthub/web/resources/RelatedKeywordResource.java Tue Apr 17 19:03:38 2012
@@ -116,7 +116,7 @@ public class RelatedKeywordResource exte
return Response.status(Status.BAD_REQUEST).build();
}
- keyword = RestUtil.nullify(keyword);
+ keyword = RestUtil.nullify(keyword);
if (keyword == null) {
String msg = "RelatedKeywordResource.findAllRelatedKeywords requires \"keyword\" parameter. \"graphURI\" is optional";
log.error(msg);
@@ -131,39 +131,6 @@ public class RelatedKeywordResource exte
}
/**
- * HTTP GET method to retrieve related keywords from Wordnet. If a Wordnet database is not installed into
- * Contenthub, this method cannot find any related keywords.
- *
- * @param keyword
- * The keyword whose related keywords will be retrieved from Wordnet.
- * @param headers
- * HTTP headers
- * @return JSON string which is constructed by {@link SearchResultWriter}. {@link SearchResult} returned
- * by {@link RelatedKeywordSearchManager#getRelatedKeywordsFromWordnet(String)} contains only related keywords from Wordnet. (No
- * resultant documents or facet fields are returned within the {@link SearchResult}).
- * @throws SearchException
- */
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- @Path("/wordnet")
- public final Response findWordnetRelatedKeywords(@QueryParam("keyword") String keyword,
- @Context HttpHeaders headers) throws SearchException {
- if (!RestUtil.isJSONaccepted(headers)) {
- return Response.status(Status.BAD_REQUEST).build();
- }
-
- keyword = RestUtil.nullify(keyword);
- if (keyword == null) {
- String msg = "RelatedKeywordResource.findWordnetRelatedKeywords requires \"keyword\" parameter.";
- log.error(msg);
- throw new IllegalArgumentException(msg);
- }
-
- SearchResult searchResult = relatedKeywordSearchManager.getRelatedKeywordsFromWordnet(keyword);
- return prepareResponse(searchResult, headers);
- }
-
- /**
* HTTP GET method to retrieve related keywords from ontology resources. Given the ontology URI, this
* method looks for subsumption/hierarchy relations among the concepts to come up with related keywords.
*