JCL-382: Access Credential Query builder by acoburn · Pull Request #532 · inrupt/solid-client-java

This adds an AccessCredentialQuery class to make it easier to add permutations to the query interface. In particular, this makes it possible to add multiple access modes ("Read", "Write") and purpose identifiers to a query.

Otherwise, one needs to make multiple requests with the client and manage the set operations manually.

This builder looks like this:

var q = AccessCredentialQuery.newBuilder()
        .resource(uri)
        .recipient(agent)
        .purpose(purpose1)
        .purpose(purpose2)
        .mode("Read")
        .mode("Write")
        .build(AccessGrant.class);

client.query(q)
        .toCompletableFuture()
        .join();