public class LinkBuilder extends AbstractLanguageSpecificBuilder<LinkBuilder>
Modifier | Constructor and Description |
---|---|
protected |
LinkBuilder() |
Modifier and Type | Method and Description |
---|---|
LinkBuilder |
artifact(String artifact)
For use with rel="installationmedia" to identify the canonical name for an installation media
resource.
|
static LinkBuilder |
create() |
String |
getArtifact() |
URI |
getHref() |
String |
getMedia() |
String |
getMediaType() |
LinkOwnership |
getOwnership() |
String |
getRel() |
LinkUse |
getUse() |
LinkBuilder |
href(URI uri)
Sets the to-be-built link's href to the provided value.
|
LinkBuilder |
media(String query)
Sets the to-be-built link's media to the provided value.
|
LinkBuilder |
mediaType(String mediaType)
Provide the IANA MediaType for the resource targeted by the href attribute; this provides the
consumer with knowledge of the format of the referenced resource.
|
LinkBuilder |
ownership(LinkOwnership ownership)
Sets the to-be-built link's ownership to the provided value.
|
LinkBuilder |
rel(String rel)
Sets the to-be-built link's rel to the provided value.
|
void |
reset() |
LinkBuilder |
use(LinkUse use)
Sets the to-be-built link's use to the provided value.
|
void |
validate() |
getLanguage, language
isValid, validateNonEmpty, validateNonEmpty, validateNonEmpty, validateNonEmpty, validateNonNull, validatePatternMatch
public static LinkBuilder create()
public void reset()
reset
in interface Builder
reset
in class AbstractLanguageSpecificBuilder<LinkBuilder>
public String getArtifact()
public URI getHref()
public String getMedia()
public LinkOwnership getOwnership()
public String getRel()
public String getMediaType()
public LinkUse getUse()
public LinkBuilder artifact(String artifact)
artifact
- a cononical name for the installation mediapublic LinkBuilder href(URI uri)
uri
- a URI identifying the linked resourcepublic LinkBuilder media(String query)
query
- a media query as defined by ISO/IEC 19770-2:2015public LinkBuilder ownership(LinkOwnership ownership)
ownership
- a valid non-null enumeration valuepublic LinkBuilder rel(String rel)
rel
- the link relation typepublic LinkBuilder mediaType(String mediaType)
mediaType
- a valid media type valuepublic LinkBuilder use(LinkUse use)
use
- a valid, non-null enumeration valuepublic void validate() throws ValidationException
validate
in interface Builder
validate
in class AbstractLanguageSpecificBuilder<LinkBuilder>
ValidationException
Copyright © 2020 National Institute of Standards and Technology. All rights reserved.