Class PagingLink

java.lang.Object
com.sodius.oslc.core.ldp.model.PagingLink

public class PagingLink extends Object
Provides utilities to help with the implementation of LDP Paging, as defined in the following W3C specification: https://www.w3.org/TR/ldp-paging/
Since:
1.12.0
  • Constructor Details

    • PagingLink

      public PagingLink()
  • Method Details

    • builder

      public static PagingLink.PagingLinkBuilder builder()
      Creates a new LDP Paging Link builder.
      Returns:
      a LDP page link builder
    • pageBuilder

      public static PagingLink.PagingLinkBuilder pageBuilder()
      Creates a LDP Paging Link builder initialized with the http://www.w3.org/ns/ldp#Page type. It tells the client that the response is an in-sequence page resource, and therefore it needs to examine the other response headers to see if more data existed in the canonical paged resource when the response was generated by the server.
      Returns:
      a LDP page link builder
    • of

      public static PagingLink of(Collection<String> linkHeaders)
      Creates a PagingLink from one or more Link headers.
      Parameters:
      linkHeaders - the Link headers to parse.
      Returns:
      the PagingLink
      Since:
      3.14.0
    • createLinkHeader

      public String createLinkHeader()
      Creates a Link header value from this PagingLink.
      Returns:
      a Link header value
    • getFirst

      public Optional<URI> getFirst()
      Gets the first page URI, if any.
      Returns:
      the first page URI, if any.
      Since:
      3.14.0
    • getNext

      public Optional<URI> getNext()
      Gets the next page URI, if any.
      Returns:
      the next page URI, if any.
      Since:
      3.14.0
    • getLast

      public Optional<URI> getLast()
      Gets the last page URI, if any.
      Returns:
      the last page URI, if any.
      Since:
      3.14.0
    • getPrev

      public Optional<URI> getPrev()
      Gets the previous page URI, if any.
      Returns:
      the previous page URI, if any.
      Since:
      3.14.0
    • getType

      public Optional<URI> getType()
      Gets the type, if any.
      Returns:
      the type, if any.
      Since:
      3.14.0
    • getCanonical

      public Optional<URI> getCanonical()
      Gets the canonical URI, if any.
      Returns:
      the canonical URI, if any.
      Since:
      3.14.0
    • getETag

      public Optional<String> getETag()
      Gets the etag, if any.
      Returns:
      the etag, if any.
      Since:
      3.14.0