public class FcrepoLink extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FcrepoLink.Builder
Builder class for link headers represented as FcrepoLinks
|
| Constructor and Description |
|---|
FcrepoLink(String link)
Create a representation of a Link header.
|
| Modifier and Type | Method and Description |
|---|---|
static List<FcrepoLink> |
fromHeader(String headerValue)
Parser which converts a link header containing one or more links into a list of FcrepoLink objects.
|
static FcrepoLink.Builder |
fromUri(String uri)
Create a new builder instance initialized from an existing URI represented as a string.
|
static FcrepoLink.Builder |
fromUri(URI uri)
Create a new builder instance initialized from an existing URI.
|
String |
getParam(String name)
Retrieve a parameter from the link header
|
Map<String,String> |
getParams()
Retrieve a map of parameters from the link header
|
String |
getRel()
Retrieve the REL portion of the link
|
String |
getType()
Retrieve the type portion of the link
|
URI |
getUri()
Retrieve the URI of the link
|
String |
toString() |
static FcrepoLink |
valueOf(String link)
Simple parser to convert a link header containing a single link into an FcrepoLink object.
|
public FcrepoLink(String link)
link - the value for a Link headerpublic String getRel()
public String getType()
public String getParam(String name)
name - name of the parameter in the link headerpublic Map<String,String> getParams()
public static FcrepoLink.Builder fromUri(String uri)
uri - URI which will be used to initialize the builderIllegalArgumentException - if uri is null.public static FcrepoLink.Builder fromUri(URI uri)
uri - URI which will be used to initialize the builderIllegalArgumentException - if uri is null.public static FcrepoLink valueOf(String link)
link - link header value.public static List<FcrepoLink> fromHeader(String headerValue)
headerValue - link header value.Copyright © 2013–2021 DuraSpace, Inc.. All rights reserved.