WebID Profile and Pod URLs

A WebID is a unique URL that identifies an agent in the Solid ecosystem. Dereferencing the WebID yields a publicly readable WebID Profile document. A WebID Profile is an RDF Resource that contains data about the user, such as the user’s Pod URLs.

To facilitate reading WebID Profile, Inrupt’s Java Client Libraries provide the WebIdProfilearrow-up-right class. For example, the following code reads the Pod URLs associated with the WebID.

import com.inrupt.client.webid.WebIdProfile;

// ...

public Set<URI> getPods(String webID) {
    try (final var profile = client.read(URI.create(webID), WebIdProfile.class)) {
         return profile.getStorages();
    }
}
circle-info

Note

Although an RDF Resource, the WebID Profile is not necessarily hosted on a Solid Pod and may not necessarily be a Solid Resource per the Solid Protocolarrow-up-right. That is, the WebID Profile may be mapped to the RDFSourcearrow-up-right class (which is extended by WebIdProfilearrow-up-right) but not necessarily to the SolidRDFSourcearrow-up-right.

As such, Solid applications cannot rely on the Solid Protocol to read and write the WebID profile. See also https://solid.github.io/webid-profile/#introductionarrow-up-right.

Last updated