From ac1f23c36e80141e104219657cddea09555f5212 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 7 Jul 2021 19:39:33 +0200 Subject: [PATCH] Added the examples of the wiki page https://gcube.wiki.gcube-system.org/gcube/Resource_Registry_Service_-_Query_&_Access --- .../ResourceRegistryClientTestWikiExamples.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTestWikiExamples.java b/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTestWikiExamples.java index e9e15c7..eff80f1 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTestWikiExamples.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTestWikiExamples.java @@ -190,4 +190,17 @@ public class ResourceRegistryClientTestWikiExamples extends ContextTest { logger.debug("{}", list); } + @Test + public void rawQueryExample1() throws ResourceRegistryException, Exception{ + String jsonString = resourceRegistryClient.query("SELECT FROM SoftwareFacet", 1, null, true); + logger.debug("{}", jsonString); + } + + @Test + public void rawQueryExample2() throws ResourceRegistryException, Exception{ + String jsonString = resourceRegistryClient.query("SELECT FROM SoftwareFacet", 1, null); + List list = ElementMapper.unmarshalList(SoftwareFacet.class, jsonString); + logger.debug("{}", list); + } + }