Package com.sodius.oslc.core.ldp.model
Class PagingLink
java.lang.Object
com.sodius.oslc.core.ldp.model.PagingLink
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuildsLinkheaders to handle LDP pagination. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PagingLink.PagingLinkBuilderbuilder()Creates a new LDP Paging Link builder.Creates aLinkheader value from this PagingLink.Gets the canonical URI, if any.getETag()Gets the etag, if any.getFirst()Gets the first page URI, if any.getLast()Gets the last page URI, if any.getNext()Gets the next page URI, if any.getPrev()Gets the previous page URI, if any.getType()Gets the type, if any.static PagingLinkof(Collection<String> linkHeaders) Creates a PagingLink from one or moreLinkheaders.static PagingLink.PagingLinkBuilderCreates a LDP Paging Link builder initialized with thehttp://www.w3.org/ns/ldp#Pagetype.
-
Constructor Details
-
PagingLink
public PagingLink()
-
-
Method Details
-
builder
Creates a new LDP Paging Link builder.- Returns:
- a LDP page link builder
-
pageBuilder
Creates a LDP Paging Link builder initialized with thehttp://www.w3.org/ns/ldp#Pagetype. 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
Creates a PagingLink from one or moreLinkheaders.- Parameters:
linkHeaders- theLinkheaders to parse.- Returns:
- the PagingLink
- Since:
- 3.14.0
-
createLinkHeader
Creates aLinkheader value from this PagingLink.- Returns:
- a Link header value
-
getFirst
Gets the first page URI, if any.- Returns:
- the first page URI, if any.
- Since:
- 3.14.0
-
getNext
Gets the next page URI, if any.- Returns:
- the next page URI, if any.
- Since:
- 3.14.0
-
getLast
Gets the last page URI, if any.- Returns:
- the last page URI, if any.
- Since:
- 3.14.0
-
getPrev
Gets the previous page URI, if any.- Returns:
- the previous page URI, if any.
- Since:
- 3.14.0
-
getType
Gets the type, if any.- Returns:
- the type, if any.
- Since:
- 3.14.0
-
getCanonical
Gets the canonical URI, if any.- Returns:
- the canonical URI, if any.
- Since:
- 3.14.0
-
getETag
Gets the etag, if any.- Returns:
- the etag, if any.
- Since:
- 3.14.0
-