From 42433c4007867a715d6498af67fb6127f52a50f3 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 16 Sep 2022 12:37:06 +0200 Subject: [PATCH] Improving documentation --- src/main/java/org/gcube/gcat/rest/Item.java | 57 ++++++++++++++++----- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/gcube/gcat/rest/Item.java b/src/main/java/org/gcube/gcat/rest/Item.java index 2eeb4a1..d3062ba 100644 --- a/src/main/java/org/gcube/gcat/rest/Item.java +++ b/src/main/java/org/gcube/gcat/rest/Item.java @@ -58,34 +58,39 @@ public class Item extends REST implements org.gcube.gcat.api.interf *
*
q (string)
*
- * the solr query. Optional. Default: "*:*" See Solr Query Syntax. - * E.g. /items?q=title:foo returns the items with word "foo" in the title; + * Optional.Default:"*:*"
+ * The solr query. see Solr Query Syntax
+ * E.g. /items?q=title:foo returns the items with word "foo" in the title.
+ * E.g. /items?q=extras_systemtype:MyProfile returns the items having the profile MyProfile *
* *
fq (string)
*
- * Filter query. A query string that limits the query results without influencing their scores. - * Note: +site_id:{ckan_site_id} is added to this string prior to the query being executed.
- * E.g. /items?q=title:foo&fq=notes:bar returns with word "foo" in the 'title' and the word "bar" in the 'notes'; + * Optional.Default:null.
+ * Filter query. A query string that limits the query results without influencing their scores.
+ * E.g. /items?q=title:foo&fq=notes:bar returns with word "foo" in the 'title' and the word "bar" in the 'notes'. *
* *
fq_list (list of strings)
*
- * additional filter queries to apply.
- * E.g. /items?q=title:foo&fq_list=... returns the items with word "foo" in the 'title' + * Optional.Default:null.
+ * Additional filter queries to apply.
+ * E.g. /items?q=title:foo&fq_list=... returns the items with word "foo" in the 'title'. *
* *
sort (string)
*
- * sorting of the search results. Optional. Default: 'relevance asc, metadata_modified desc'. + * Optional.Default:"relevance asc, metadata_modified desc".
+ * Sorting of the search results.
* As per the solr documentation, this is a comma-separated string of field names and sort-orderings.
* E.g. /items?q=title:foo&sort=name+asc returns the items with word "foo" in the 'title' - * sorting the results by name ascending; + * sorting the results by name ascending. *
* *
include_private (bool)
*
- * if True, private datasets will be included in the results. + * Optional.Default:false.
+ * If True, private datasets will be included in the results.
* Only private datasets from the user’s organizations will be returned. For the sysadmins will be returned all private datasets. * Optional, the default is False.
* E.g. /items?include_private=true @@ -93,19 +98,47 @@ public class Item extends REST implements org.gcube.gcat.api.interf * *
ext_bbox
*
+ * Optional.Default:null.
* The coordinates of the upper-right and bottom-left angle of a rectangular to query for. - * The form is Lat,Long,Lat,Long
+ * The form is Lat,Long,Lat,Long
* E.g. /items?limit=10&offset=0&q=Pollution&ext_bbox=-7.535093,49.208494,3.890688,57.372349 * returns the first 10 items with 'Pollution' having a spatial coverage in the specified bounding box. *
+ * + *
own_only (bool)
+ *
+ * Optional.Default:false.
+ * If True, only the items of the requester user will be included in the result.
+ * E.g. /items?limit=10&offset=0&own_only=true> + *
+ * + *
all_fields
+ *
+ * Optional.Default:false. + * If True, the returned array list contains the whole item representation and not only the id (i.e. the name). + * E.g. /items?limit=10&offset=0&all_fields=true + *
+ * *
* + *

Moderated Catalogues options

+ *
+ *
status (enum)
+ *
+ * Optional.Default:null.
+ * It has sense only for moderated catalogs. + * It can assume the following values: pending; rejected; approved. + * If null return both approved items and items which have been published before the activation of the moderation. + *
+ *
+ * + * * @param limit To get unlimited results the limit query parameters must be set to -1. * If the results are too much the operation could fail. * It is recommended to request no more than 1000 results. * @param offset The offset parameter indicates the starting position of the result. * @param count It indicate that the result must contains only the total number of items of the query. - * @return It returns an array list of string containing the ids (i.e. names) of the items.
+ * @return It returns an array list of string containing the ids (i.e. names) of the items. * E.g.
["item0","items1",...,"item10"]
* * In the case the query parameter count=true it returns the total number of items of the query.