Class Headers.Link

java.lang.Object
com.inrupt.client.Headers.Link
Enclosing class:
Headers

public static final class Headers.Link extends Object
A class for representing an HTTP Link header.
See Also:
  • Method Details

    • getUri

      public URI getUri()
      Get the URI of the link header.
      Returns:
      the URI value
    • getParameter

      public String getParameter(String parameter)
      Get the value of the given parameter.
      Parameters:
      parameter - the parameter name
      Returns:
      the parameter value, may be null
    • getParameters

      public Map<String,String> getParameters()
      Get all the parameters for this Link.
      Returns:
      the complete collection of parameters
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • of

      public static Headers.Link of(URI uri, String rel)
      Create a new Link object with a specific URI-Reference and relation parameter.
      Parameters:
      uri - the link URI
      rel - the relation value
      Returns:
      the new Headers.Link object
    • of

      public static Headers.Link of(URI uri, URI rel)
      Create a new Link object with a specific URI-Reference and relation parameter.
      Parameters:
      uri - the link URI
      rel - the relation value
      Returns:
      the new Headers.Link object
    • of

      public static Headers.Link of(URI uri, Map<String,String> parameters)
      Create a new Link object with a specific URI-Reference and parameters.
      Parameters:
      uri - the link URI
      parameters - the link parameters
      Returns:
      the new Headers.Link object
    • parse

      public static List<Headers.Link> parse(String... headers)
      A parser to convert link header string representations into a collection of links.
      Parameters:
      headers - the link headers
      Returns:
      a list of links