org.apache.stanbol.contenthub.web.resources
Class FeaturedSearchResource
java.lang.Object
org.apache.stanbol.commons.web.base.resource.BaseStanbolResource
org.apache.stanbol.contenthub.web.resources.FeaturedSearchResource
public class FeaturedSearchResource
- extends BaseStanbolResource
This class is the web resource which provides RESTful and HTTP interfaces for
FeaturedSearch services.
- Author:
- anil.sinaci, suat
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FeaturedSearchResource
public FeaturedSearchResource(@Context
javax.servlet.ServletContext context,
java.lang.String indexName)
throws java.io.IOException,
org.osgi.framework.InvalidSyntaxException
- Parameters:
context - indexName - Name of the LDPath program (name of the Solr core/index) to be
used while storing this content item. LDPath programs can be
managed through SemanticIndexManagerResource or
SemanticIndexManager
- Throws:
java.io.IOException
org.osgi.framework.InvalidSyntaxException
handleCorsPreflight
public javax.ws.rs.core.Response handleCorsPreflight(@Context
javax.ws.rs.core.HttpHeaders headers)
get
public final javax.ws.rs.core.Response get(java.lang.String queryTerm,
java.lang.String solrQuery,
java.lang.String jsonCons,
java.lang.String graphURI,
int offset,
int limit,
java.lang.String fromStore,
@Context
javax.ws.rs.core.HttpHeaders headers)
throws java.lang.IllegalArgumentException,
SearchException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
org.apache.solr.client.solrj.SolrServerException,
java.io.IOException
- HTTP GET method to make a featured search over Contenthub.
- Parameters:
queryTerm - A keyword a statement or a set of keywords which can be
regarded as the query term.solrQuery - Solr query string. This is the string format which is accepted
by a Solr server. For example, q="john doe"&fl=score
is a valid value for this parameter. If this parameter exists,
search is performed based on this solrQuery and any queryTerms
are neglected.jsonCons - Constrainst in JSON format. These constraints are tranformed
to corresponding Solr queries to enable faceted search. Each
constraint is a facet field and values of the constraints maps
to the values of the facet fields in Solr queries.graphURI - URI of the ontology in which related keywords will be searched
by
RelatedKeywordSearchManager.getRelatedKeywordsFromOntology(String, String)offset - The offset of the document from which the resultant documents
will start as the search result. offset and
limit parameters can be used to make a pagination
mechanism for search results.limit - Maximum number of resultant documents to be returned as the
search result. offset and limit parameters can
be used to make a pagination mechanism for search results.fromStore - Special parameter for HTML view only.headers - HTTP headers
- Returns:
- HTML view or JSON representation of the search results or HTTP
BAD REQUEST(400)
- Throws:
java.lang.IllegalArgumentException
SearchException
java.lang.InstantiationException
java.lang.IllegalAccessException
org.apache.solr.client.solrj.SolrServerException
java.io.IOException
getMoreRecentItems
public java.lang.Object getMoreRecentItems()
getOlderItems
public java.lang.Object getOlderItems()
getOffset
public int getOffset()
getPageSize
public int getPageSize()
getSearchResults
public java.lang.Object getSearchResults()
getDocuments
public java.lang.Object getDocuments()
getOntologies
public java.lang.Object getOntologies()
getQueryTerm
public java.lang.Object getQueryTerm()
getChosenFacets
public java.lang.String getChosenFacets()
getIndexName
public java.lang.String getIndexName()
Copyright © 2011-2012 The Apache Software Foundation. All Rights Reserved.