@Path(value="/")
public class IndexService
extends org.gcube.rest.resourceawareservice.ResourceAwareService<org.gcube.rest.index.common.resources.IndexResource>
implements org.gcube.rest.index.common.apis.IndexServiceAPI
| Constructor and Description |
|---|
IndexService(IndexResourceFactory factory,
org.gcube.rest.resourcemanager.publisher.ResourcePublisher<org.gcube.rest.index.common.resources.IndexResource> publisher,
org.gcube.rest.index.common.discover.IndexDiscovererAPI<org.gcube.rest.index.common.resources.IndexResource> indexDiscoverer,
com.google.inject.Provider<org.gcube.rest.index.client.IndexClient.Builder> clientProvider,
org.gcube.rest.commons.filter.IResourceFilter<org.gcube.rest.index.common.resources.IndexResource> resourceFilter,
org.gcube.rest.commons.resourcefile.IResourceFileUtils<org.gcube.rest.index.common.resources.IndexResource> resourceFileUtils) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
activateIndex(String scope,
String resourceID,
String indexName) |
javax.ws.rs.core.Response |
clustering(String scope,
String resourceID,
String queryString,
String queryHint,
Integer clustersCount,
String urlField,
List<String> titleFields,
List<String> contentFields,
List<String> languageFields,
String algorithm,
Integer searchHits,
Set<String> sids,
Boolean useRR,
Boolean pretty) |
javax.ws.rs.core.Response |
collectionCount(String scope,
String resourceID,
String collectionID) |
javax.ws.rs.core.Response |
collectionsOfIndex(String scope,
String resourceID,
String indexName) |
javax.ws.rs.core.Response |
deactivateIndex(String scope,
String resourceID,
String indexName) |
javax.ws.rs.core.Response |
deleteDocuments(String scope,
String resourceID,
List<String> docIDs) |
javax.ws.rs.core.Response |
deleteIndex(String scope,
String resourceID,
String indexName) |
javax.ws.rs.core.Response |
destroyCluster(String scope,
String resourceID) |
javax.ws.rs.core.Response |
feedLocator(String scope,
String resourceID,
String resultSetLocation,
String indexName,
Boolean activate,
Set<String> sids,
Boolean block) |
javax.ws.rs.core.Response |
flush(String scope,
String resourceID) |
javax.ws.rs.core.Response |
frequentTerms(String scope,
String resourceID,
String queryString,
Integer maxTerms,
Set<String> sids,
Boolean useRR,
Boolean pretty) |
String |
getResourceClass() |
String |
getResourceNamePref() |
String |
getScope() |
javax.ws.rs.core.Response |
indicesOfCollection(String scope,
String resourceID,
String collectionID) |
javax.ws.rs.core.Response |
query(String scope,
String resourceID,
String queryString,
Integer from,
Integer count,
Set<String> sids,
Boolean useRR,
Boolean result,
Boolean stream,
Boolean pretty) |
javax.ws.rs.core.Response |
rebuildMetaIndex(String scope,
String resourceID) |
javax.ws.rs.core.Response |
refresh(String scope,
String resourceID) |
javax.ws.rs.core.Response |
setCollectionsAndFields(String scope,
String resourceID,
List<String> collections,
List<String> fields) |
void |
setScope(String scope) |
javax.ws.rs.core.Response |
shutdown(String scope,
String resourceID,
Boolean delete) |
static void |
updateAllResourcesCollectionsAndFields(org.gcube.elasticsearch.FullTextNode fulltextnode,
org.gcube.rest.index.client.IndexClient.Builder clientBuilder,
String clusterID,
org.gcube.rest.index.common.discover.IndexDiscovererAPI<org.gcube.rest.index.common.resources.IndexResource> indexDiscoverer,
String scope) |
closeService, createResource, createResourceREST, destroyResource, destroyResourceREST, filterResourcesREST, getAllResources, getResource, getResourceIDsByFilter, getResourceREST, getResourcesByFilter, listResourceIDs, listResources, listResourcesREST, loadResources, onClose, saveResource, startService@Inject public IndexService(IndexResourceFactory factory, org.gcube.rest.resourcemanager.publisher.ResourcePublisher<org.gcube.rest.index.common.resources.IndexResource> publisher, org.gcube.rest.index.common.discover.IndexDiscovererAPI<org.gcube.rest.index.common.resources.IndexResource> indexDiscoverer, com.google.inject.Provider<org.gcube.rest.index.client.IndexClient.Builder> clientProvider, org.gcube.rest.commons.filter.IResourceFilter<org.gcube.rest.index.common.resources.IndexResource> resourceFilter, org.gcube.rest.commons.resourcefile.IResourceFileUtils<org.gcube.rest.index.common.resources.IndexResource> resourceFileUtils) throws org.gcube.rest.resourceawareservice.exceptions.ResourceAwareServiceException
org.gcube.rest.resourceawareservice.exceptions.ResourceAwareServiceExceptionpublic void setScope(String scope)
public String getScope()
getScope in class org.gcube.rest.resourceawareservice.ResourceAwareService<org.gcube.rest.index.common.resources.IndexResource>public String getResourceClass()
getResourceClass in class org.gcube.rest.resourceawareservice.ResourceAwareService<org.gcube.rest.index.common.resources.IndexResource>public String getResourceNamePref()
getResourceNamePref in class org.gcube.rest.resourceawareservice.ResourceAwareService<org.gcube.rest.index.common.resources.IndexResource>@GET
@Path(value="/{id}/feedLocator")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response feedLocator(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="rsuri")
String resultSetLocation,
@QueryParam(value="indexName")
String indexName,
@DefaultValue(value="false")@QueryParam(value="activate")
Boolean activate,
@QueryParam(value="sids")
Set<String> sids,
@DefaultValue(value="false")@QueryParam(value="block")
Boolean block)
feedLocator in interface org.gcube.rest.index.common.apis.IndexServiceAPI@POST
@Path(value="/{id}/query")
@Produces(value="application/json; charset=UTF-8")
@Consumes(value="application/x-www-form-urlencoded;charset=UTF-8")
public javax.ws.rs.core.Response query(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@FormParam(value="queryString")
String queryString,
@DefaultValue(value="0")@FormParam(value="from")
Integer from,
@DefaultValue(value="-1")@FormParam(value="count")
Integer count,
@FormParam(value="sids")
Set<String> sids,
@DefaultValue(value="true")@FormParam(value="useRR")
Boolean useRR,
@DefaultValue(value="false")@FormParam(value="result")
Boolean result,
@DefaultValue(value="false")@FormParam(value="stream")
Boolean stream,
@DefaultValue(value="false")@FormParam(value="pretty")
Boolean pretty)
query in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/frequentTerms")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response frequentTerms(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="queryString")
String queryString,
@DefaultValue(value="10")@QueryParam(value="maxTerms")
Integer maxTerms,
@QueryParam(value="sids")
Set<String> sids,
@DefaultValue(value="true")@QueryParam(value="useRR")
Boolean useRR,
@DefaultValue(value="false")@QueryParam(value="pretty")
Boolean pretty)
frequentTerms in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/clustering")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response clustering(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="queryString")
String queryString,
@DefaultValue(value="")@QueryParam(value="queryHint")
String queryHint,
@QueryParam(value="clustersCount")
Integer clustersCount,
@QueryParam(value="urlField")
String urlField,
@QueryParam(value="titleFields")
List<String> titleFields,
@QueryParam(value="contentFields")
List<String> contentFields,
@QueryParam(value="languageFields")
List<String> languageFields,
@DefaultValue(value="kmeans")@QueryParam(value="algorithm")
String algorithm,
@DefaultValue(value="100")@QueryParam(value="searchHits")
Integer searchHits,
@QueryParam(value="sids")
Set<String> sids,
@DefaultValue(value="true")@QueryParam(value="useRR")
Boolean useRR,
@DefaultValue(value="false")@QueryParam(value="pretty")
Boolean pretty)
clustering in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/refresh")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response refresh(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID)
refresh in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/rebuildMetaIndex")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response rebuildMetaIndex(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID)
rebuildMetaIndex in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/activateIndex")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response activateIndex(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="indexName")
String indexName)
activateIndex in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/deactivateIndex")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response deactivateIndex(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="indexName")
String indexName)
deactivateIndex in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/flush")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response flush(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID)
flush in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/deleteIndex")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response deleteIndex(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="indexName")
String indexName)
deleteIndex in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/collectionCount")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response collectionCount(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="collectionID")
String collectionID)
collectionCount in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/collectionsOfIndex")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response collectionsOfIndex(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="indexName")
String indexName)
collectionsOfIndex in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/indicesOfCollection")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response indicesOfCollection(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="collectionID")
String collectionID)
indicesOfCollection in interface org.gcube.rest.index.common.apis.IndexServiceAPI@POST
@Path(value="/{id}/setCollectionsAndFields")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response setCollectionsAndFields(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@FormParam(value="collections")
List<String> collections,
@FormParam(value="fields")
List<String> fields)
setCollectionsAndFields in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/shutdown")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response shutdown(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@DefaultValue(value="false")@QueryParam(value="delete")
Boolean delete)
shutdown in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/destroyCluster")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response destroyCluster(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID)
destroyCluster in interface org.gcube.rest.index.common.apis.IndexServiceAPI@GET
@Path(value="/{id}/deleteDocuments")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response deleteDocuments(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@QueryParam(value="docIDs")
List<String> docIDs)
deleteDocuments in interface org.gcube.rest.index.common.apis.IndexServiceAPIpublic static void updateAllResourcesCollectionsAndFields(org.gcube.elasticsearch.FullTextNode fulltextnode,
org.gcube.rest.index.client.IndexClient.Builder clientBuilder,
String clusterID,
org.gcube.rest.index.common.discover.IndexDiscovererAPI<org.gcube.rest.index.common.resources.IndexResource> indexDiscoverer,
String scope)
throws Exception
ExceptionCopyright © 2015. All Rights Reserved.