Examples

In these examples, the site prefix is aaaaa.

Initialize SDK

package org.arvados.example;

import java.util.List;
import org.arvados.client.config.ConfigProvider;
import org.arvados.client.config.ExternalConfigProvider;
import org.arvados.client.api.model.CollectionList;
import org.arvados.client.api.model.Collection;
import org.arvados.client.api.client.CollectionsApiClient;

public class CollectionExample {
    public static void main(String[] argv) {
        ConfigProvider conf = ExternalConfigProvider.builder().
            apiProtocol("https").
            apiHost("zzzzz.arvadosapi.com").
            apiPort(443).
            apiToken("...").
            build();
        CollectionsApiClient collectionsApi = new CollectionsApiClient(conf);
        /* ... */
    }
}

list

        CollectionList cl = collectionsApi.list();
        List<Collection> items = cl.getItems();
        for (int i = 0; i < items.size(); i++) {
            System.out.println(items.get(i));
        }

Previous: Installation Next: Javadoc Reference

The content of this documentation is licensed under the Creative Commons Attribution-Share Alike 3.0 United States licence.
Code samples in this documentation are licensed under the Apache License, Version 2.0.