From 3455159ecc537d875a2d1df56dac4de3fdacf012 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 16 Sep 2022 12:42:58 +0200 Subject: [PATCH] Improving documentation --- src/main/java/org/gcube/gcat/rest/Item.java | 96 +++++++++++---------- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/src/main/java/org/gcube/gcat/rest/Item.java b/src/main/java/org/gcube/gcat/rest/Item.java index d3062ba..49a4bf1 100644 --- a/src/main/java/org/gcube/gcat/rest/Item.java +++ b/src/main/java/org/gcube/gcat/rest/Item.java @@ -52,14 +52,62 @@ public class Item extends REST implements org.gcube.gcat.api.interf *

Filtering options

*

* The listing method offers options to filter the results, thus enacting to search for items including spatial search (see ext_bbox below).
- * It accepts the following query parameters (a subset of Solr search query parameters, see Solr Query Syntax): + *

+ *
+ *
include_private (bool)
+ *
+ * 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 + *
+ * + *
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
+ * 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 Catalog filtering 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. + *
+ *
*

* + *

Solr based Filtering options

+ *

+ * It accepts the following query parameters (a subset of Solr search query parameters, see Solr Query Syntax): + *

*
*
q (string)
*
* Optional.Default:"*:*"
- * The solr query. see Solr Query Syntax
+ * The solr query.
* 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 *
@@ -86,51 +134,7 @@ public class Item extends REST implements org.gcube.gcat.api.interf * E.g. /items?q=title:foo&sort=name+asc returns the items with word "foo" in the 'title' * sorting the results by name ascending. * - * - *
include_private (bool)
- *
- * 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 - *
- * - *
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
- * 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.