public final class Link extends Object implements Serializable
atom:link
element and the draft spec for the HTTP Link
header.
Note: this is not the legacy com.escenic.link type.Modifier and Type | Field and Description |
---|---|
static String |
EDIT_RELATION |
Constructor and Description |
---|
Link(URI pHref,
Collection<String> pRelations,
String pMimeType,
String pTitle)
Creates a
Link . |
Link(URI pHref,
String pRelation,
String pMimeType,
String pTitle)
Creates a
Link . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object pThat) |
URI |
getHref()
Returns the link's URI.
|
String |
getMimeType()
Returns the link's MIME type.
|
List<String> |
getRelation()
Returns an immutable list of relation strings.
|
String |
getTitle()
Returns the link's title.
|
int |
hashCode() |
boolean |
isLocalFile()
Returns
true if this Link represents a local file. |
String |
toString() |
public static final String EDIT_RELATION
public Link(URI pHref, Collection<String> pRelations, String pMimeType, String pTitle)
Link
.pHref
- the URI the link points to.pRelations
- the link's relations (to some other resource),
defaults to "alternate"
if null
or empty collection.
If non-null
, it may not contain null
-elements.pMimeType
- the link's MIME type, defaults to "application/octet-stream"
if null
.pTitle
- the link's title, may be null
(no default).IllegalArgumentException
- if pHref
is null
, or if pRelations
contains null
-elementspublic Link(URI pHref, String pRelation, String pMimeType, String pTitle)
Link
.pHref
- the URI the link points topRelation
- the link's relations (to some other resource), defaults to "alternate"
if null
pMimeType
- the link's MIME type, defaults to "application/octet-stream"
if null
pTitle
- the link's title, may be null
(no default)IllegalArgumentException
- if pHref
} is null
public String getTitle()
null
.public URI getHref()
public List<String> getRelation()
null
.public String getMimeType()
public boolean isLocalFile()
true
if this Link represents a local file. It will check the scheme part of the mHref
.true
if the link represents a local file.© 1998- 2018 Stibo DX