Revision 47535
Added by Katerina Iatropoulou almost 7 years ago
SearchApiService.java | ||
---|---|---|
330 | 330 |
|
331 | 331 |
|
332 | 332 |
@GET |
333 |
@Path("/api/organizations/{organizationid}/publications") |
|
334 |
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) |
|
335 |
public Response fetchOrganizationPublications(@PathParam("organizationid") String organizationid, |
|
336 |
@DefaultValue("0") @QueryParam("page") int offset, |
|
337 |
@DefaultValue("10") @QueryParam("size") int limit, |
|
338 |
@QueryParam("format") final String format, |
|
339 |
@QueryParam("fq") final List<String> fieldQueries, |
|
340 |
@Context HttpServletRequest request) { |
|
341 |
String fullQuery = builtEntity2EntityRelationQuery(RequestResponseHandler.Entity.PUBLICATION, "relorganizationid", organizationid, fieldQueries); |
|
342 |
return getResponseByEntity(fullQuery, RequestResponseHandler.Entity.PUBLICATION, offset, limit, format, request, false, null, fieldQueries); |
|
343 |
} |
|
344 |
|
|
345 |
@GET |
|
346 |
@Path("/api/organizations/{organizationid}/datasets") |
|
347 |
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) |
|
348 |
public Response fetchOrganizationDatsets(@PathParam("organizationid") String organizationid, |
|
349 |
@DefaultValue("0") @QueryParam("page") int offset, |
|
350 |
@DefaultValue("10") @QueryParam("size") int limit, |
|
351 |
@QueryParam("format") final String format, |
|
352 |
@QueryParam("fq") final List<String> fieldQueries, |
|
353 |
@Context HttpServletRequest request) { |
|
354 |
String fullQuery = builtEntity2EntityRelationQuery(RequestResponseHandler.Entity.DATASET, "relorganizationid", organizationid, fieldQueries); |
|
355 |
return getResponseByEntity(fullQuery, RequestResponseHandler.Entity.DATASET, offset, limit, format, request, false, null, fieldQueries); |
|
356 |
} |
|
357 |
|
|
358 |
@GET |
|
333 | 359 |
@Path("/api/organizations/{organizationid}/projects") |
334 | 360 |
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) |
335 | 361 |
public Response fetchOrganizationProjects(@PathParam("organizationid") String organizationid, |
Also available in: Unified diff
Enhanced the api to support /organizations/{organizationid}/publications #2917. Fixed pom range dependencies.