Added the examples of the wiki page

https://gcube.wiki.gcube-system.org/gcube/Resource_Registry_Service_-_Query_&_Access
This commit is contained in:
Luca Frosini 2021-07-07 19:39:33 +02:00
parent 9909a87644
commit ac1f23c36e
1 changed files with 13 additions and 0 deletions

View File

@ -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<SoftwareFacet> list = ElementMapper.unmarshalList(SoftwareFacet.class, jsonString);
logger.debug("{}", list);
}
}