8 Copyright (C) The Arvados Authors. All rights reserved.
10 SPDX-License-Identifier: CC-BY-SA-3.0
13 In these examples, the site prefix is @aaaaa@.
17 {% codeblock as java %}
18 package org.arvados.example;
20 import java.util.List;
21 import org.arvados.client.config.ConfigProvider;
22 import org.arvados.client.config.ExternalConfigProvider;
23 import org.arvados.client.api.model.CollectionList;
24 import org.arvados.client.api.model.Collection;
25 import org.arvados.client.api.client.CollectionsApiClient;
27 public class CollectionExample {
28 public static void main(String[] argv) {
29 ConfigProvider conf = ExternalConfigProvider.builder().
31 apiHost("zzzzz.arvadosapi.com").
35 CollectionsApiClient collectionsApi = new CollectionsApiClient(conf);
43 {% codeblock as java %}
44 CollectionList cl = collectionsApi.list();
45 List<Collection> items = cl.getItems();
46 for (int i = 0; i < items.size(); i++) {
47 System.out.println(items.get(i));