Appendix: 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 WebIdProfile class. For example, the following code reads the Pod URL(s) 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();
    }
}

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 Protocol. That is, the WebID Profile may be mapped to the RDFSource class (which is extended by WebIdProfile) but not necessarily to the SolidRDFSource.

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/#introduction.