Package org.apache.juneau.bean.hal
Class HalLink
java.lang.Object
org.apache.juneau.bean.hal.HalLink
Represents a HAL Link Object as defined by
draft-kelly-json-hal-08 § 5.
A Link Object describes a hyperlink from the containing resource to another resource. The href property is
the only required field; all other fields are optional.
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBean property getter:deprecation .getHref()Bean property getter:href .Bean property getter:hreflang .getName()Bean property getter:name .Bean property getter:profile .Bean property getter:templated .getTitle()Bean property getter:title .getType()Bean property getter:type .setDeprecation(String value) Bean property setter:deprecation .Bean property setter:href .setHreflang(String value) Bean property setter:hreflang .Bean property setter:name .setProfile(String value) Bean property setter:profile .setTemplated(Boolean value) Bean property setter:templated .Bean property setter:title .Bean property setter:type .toString()
-
Constructor Details
-
HalLink
public HalLink()Default constructor. -
HalLink
Convenience constructor with the requiredhreffield.- Parameters:
href- The link URI or URI template. Can benull to leave the property unset.
-
-
Method Details
-
getHref
Bean property getter:href .The link's target URI or URI template (per RFC 6570). This is the only required HAL Link field.
- Returns:
- The value of the
href property, ornull if it is not set.
-
setHref
Bean property setter:href .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getTemplated
Bean property getter:templated .Indicates whether
hrefis a URI template per RFC 6570.- Returns:
- The value of the
templated property, ornull if it is not set.
-
setTemplated
Bean property setter:templated .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getType
Bean property getter:type .A hint about the media type expected when dereferencing the target resource.
- Returns:
- The value of the
type property, ornull if it is not set.
-
setType
Bean property setter:type .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getDeprecation
Bean property getter:deprecation .A URL providing information about deprecation of the link.
- Returns:
- The value of the
deprecation property, ornull if it is not set.
-
setDeprecation
Bean property setter:deprecation .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getName
Bean property getter:name .A secondary key for selecting a link from a set sharing the same relation.
- Returns:
- The value of the
name property, ornull if it is not set.
-
setName
Bean property setter:name .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getProfile
Bean property getter:profile .A URI hint about the profile (additional semantics) of the target resource.
- Returns:
- The value of the
profile property, ornull if it is not set.
-
setProfile
Bean property setter:profile .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getTitle
Bean property getter:title .A human-readable identifier for the link, suitable for display.
- Returns:
- The value of the
title property, ornull if it is not set.
-
setTitle
Bean property setter:title .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getHreflang
Bean property getter:hreflang .The language of the target resource (RFC 5646 language tag).
- Returns:
- The value of the
hreflang property, ornull if it is not set.
-
setHreflang
Bean property setter:hreflang .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
toString
-