Class URIBuilder

java.lang.Object
com.inrupt.client.util.URIBuilder

public final class URIBuilder extends Object
A utility for building URI objects.
  • Method Details

    • newBuilder

      public static URIBuilder newBuilder(URI uri)
      Create a new URI builder from an existing URI.
      Parameters:
      uri - the URI
      Returns:
      the builder
    • path

      public URIBuilder path(String path)
      Append a path segment to a URI.
      Parameters:
      path - the path segment
      Returns:
      this builder
    • queryParam

      public URIBuilder queryParam(String param, String value)
      Set a query parameter for a URI.
      Parameters:
      param - the parameter name
      value - the parameter value
      Returns:
      this builder
    • fragment

      public URIBuilder fragment(String fragment)
      Set a fragment value for a URI.
      Parameters:
      fragment - the fragment value
      Returns:
      this builder
    • build

      public URI build()
      Build a URI.
      Returns:
      the newly constructed URI