public class Link extends Object implements HasJsonKey
| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
NON_UNIQUE_RELS
The list of link rels that support multi-valued links.
|
| Modifier and Type | Method and Description |
|---|---|
Link |
accept(String accept)
Build out this link with an accept.
|
Link |
allow(String allow)
Build out this link with an 'allow'.
|
Link |
count(Integer count)
Build out this link with a count.
|
String |
getAccept()
Metadata about the acceptable media type(s) that can be used to update (i.e.
|
String |
getAllow()
Metadata about the allowable methods that can be used to transition to the resource being linked.
|
Integer |
getCount()
The number of elements in the page, if this link refers to a page of resources.
|
URI |
getHref()
The target IRI of the link.
|
String |
getHreflang()
The language of the resource being linked to.
|
String |
getHttpHeaderValue()
Format this link as a Link header per RFC 5988.
|
String |
getJsonKey()
The json key that is used define this link in a map.
|
Integer |
getOffset()
The index of the offset of the page, if this link refers to a page of resources.
|
String |
getRel()
The link relationship.
|
Integer |
getResults()
The total number of results in the page to which this links, if this link refers to a page of resources.
|
String |
getTemplate()
A URI template per RFC 6570, used to link to a range of
URIs, such as for the purpose of linking to a query.
|
String |
getTitle()
Human-readable information about the link.
|
String |
getType()
Metadata about the available media type(s) of the resource being linked to.
|
Link |
href(URI href)
Build out this link with an href.
|
Link |
hreflang(String hreflang)
Build out this link with an href lang.
|
boolean |
isHasUniqueKey() |
Link |
offset(Integer offset)
Build out this link with an offset.
|
Link |
rel(String rel)
Build out this link with a rel.
|
Link |
results(Integer results)
Build out this link with total results.
|
void |
setAccept(String accept)
Metadata about the media type(s) that can be used to update (i.e.
|
void |
setAllow(String allow)
Metadata about the allowable methods that can be used to transition to the resource being linked.
|
void |
setCount(Integer count)
The number of elements in the page, if this link refers to a page of resources.
|
void |
setHref(URI href)
The link URI.
|
void |
setHreflang(String hreflang)
The language of the resource being linked to.
|
void |
setJsonKey(String jsonKey)
The json key that is used define this link in a map.
|
void |
setOffset(Integer offset)
The index of the offset of the page, if this link refers to a page of resources.
|
void |
setRel(String rel)
The link relationship.
|
void |
setResults(Integer results)
The total number of results in the page to which this links, if this link refers to a page of resources.
|
void |
setTemplate(String template)
A URI template per RFC 6570, used to link to a range of
URIs, such as for the purpose of linking to a query.
|
void |
setTitle(String title)
Human-readable information about the link.
|
void |
setType(String type)
Metadata about the available media type(s) of the resource being linked to.
|
Link |
template(String template)
Build out this link with a template.
|
Link |
title(String title)
Build out this link with a title.
|
String |
toString() |
Link |
type(String type)
Build out this link with a type.
|
public boolean isHasUniqueKey()
isHasUniqueKey in interface HasJsonKeypublic String getRel()
public void setRel(String rel)
rel - The link relationship.public Link rel(String rel)
rel - The rel.public String getJsonKey()
getJsonKey in interface HasJsonKeypublic void setJsonKey(String jsonKey)
setJsonKey in interface HasJsonKeyjsonKey - The json key that is used define this link in a map.public URI getHref()
public void setHref(URI href)
href - The link URI.public Link href(URI href)
href - The href.public String getTemplate()
public void setTemplate(String template)
template - A URI template per RFC 6570, used to link to a range of
URIs, such as for the purpose of linking to a query.public Link template(String template)
template - The templatepublic String getType()
public void setType(String type)
type - Metadata about the available media type(s) of the resource being linked to.public Link type(String type)
type - The type.public String getAccept()
public void setAccept(String accept)
accept - Metadata about the available media type(s) of the resource being linked to.public Link accept(String accept)
accept - The accept.public String getAllow()
public void setAllow(String allow)
allow - Metadata about the available media type(s) of the resource being linked to.public Link allow(String allow)
allow - The allow.public String getHreflang()
public void setHreflang(String hreflang)
hreflang - The language of the resource being linked to.public Link hreflang(String hreflang)
hreflang - The hreflang.public String getTitle()
public void setTitle(String title)
title - Human-readable information about the link.public Link title(String title)
title - The title.public Integer getCount()
public void setCount(Integer count)
count - The number of elements in the page, if this link refers to a page of resources.public Link count(Integer count)
count - The count.public Integer getOffset()
public void setOffset(Integer offset)
offset - The index of the offset of the page, if this link refers to a page of resources.public Link offset(Integer offset)
offset - The offset.public Integer getResults()
public void setResults(Integer results)
results - The total number of results in the page to which this links, if this link refers to a page of resources.public Link results(Integer results)
results - The total results count.public String getHttpHeaderValue()
Copyright © 2016. All rights reserved.