Package com.sodius.oslc.core.ldp.model
Class PagingLink.PagingLinkBuilder
java.lang.Object
com.sodius.oslc.core.ldp.model.PagingLink.PagingLinkBuilder
- Enclosing class:
PagingLink
Builds
Link headers to handle LDP pagination.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a {code PagingLink} with the required features.Specifies the URI of the canonical resource.Specifies the URI of the first page.Specifies the URI of the last page.Specifies the URI of the next page.Specifies the URI of the previous page.Specifies the type of LDP response.
-
Method Details
-
first
Specifies the URI of the first page. It is the one that a LDP Paging server redirects to (303 response) in response to a retrieval request for the paged resource's URI.- Parameters:
first- the first page URI- Returns:
- this builder
-
next
Specifies the URI of the next page. It tells the client that at least one more in-sequence page resource exists, and how to retrieve it.- Parameters:
next- the next page URI- Returns:
- this builder
-
last
Specifies the URI of the last page.- Parameters:
last- the last page URI- Returns:
- this builder
-
prev
Specifies the URI of the previous page.- Parameters:
prev- the previous page URI- Returns:
- this builder
-
type
Specifies the type of LDP response.http://www.w3.org/ns/ldp#Pagetells 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.- Parameters:
type- the type of LDP response- Returns:
- this builder
-
canonical
Specifies the URI of the canonical resource. It tells the client, for a given page, which paginated resource is it a page of. The etag parameter gives the client a way to know, during its page traversal, whether or not the canonical paged resource has changed; not all clients will use this information, but it is there for those that can make use of it.- Parameters:
canonical- the canonical resource URIetag- the canonical resource etag- Returns:
- this builder
-
build
Builds a {code PagingLink} with the required features.- Returns:
- the PagingLink
-