Package dev.metaschema.oscal.lib.model
Class BackMatter.Resource.Rlink
java.lang.Object
dev.metaschema.oscal.lib.model.BackMatter.Resource.Rlink
- All Implemented Interfaces:
dev.metaschema.core.model.IBoundObject
- Enclosing class:
- BackMatter.Resource
@MetaschemaAssembly(formalName="Resource link",
description="A URL-based pointer to an external resource with an optional hash for verification and change detection.",
name="rlink",
moduleClass=OscalMetadataModule.class,
remarks="Multiple `rlink` objects can be included for a resource. In such a case, all provided `rlink` items are intended to be equivalent in content, but may differ in structure or format.\n\nA `media-type` is used to identify the format of a given rlink, and can be used to differentiate items in a collection of rlinks. The `media-type` provides a hint to the OSCAL document consumer about the structure of the resource referenced by the `rlink`.")
public static class BackMatter.Resource.Rlink
extends Object
implements dev.metaschema.core.model.IBoundObject
A URL-based pointer to an external resource with an optional hash for verification and change detection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a newHashitem to the underlying collection.Get the "Hash".getHref()Get the "Hypertext Reference".Get the "Media Type".dev.metaschema.core.model.IMetaschemaDatabooleanremoveHash(Hash item) Remove the first matchingHashitem from the underlying collection.voidSet the "Hash".voidSet the "Hypertext Reference".voidsetMediaType(String value) Set the "Media Type".toString()
-
Constructor Details
-
Rlink
public Rlink()Constructs a newdev.metaschema.oscal.lib.model.BackMatter.Resource.Rlinkinstance with no metadata. -
Rlink
Constructs a newdev.metaschema.oscal.lib.model.BackMatter.Resource.Rlinkinstance with the specified metadata.- Parameters:
data- the metaschema data, ornullif none
-
-
Method Details
-
getMetaschemaData
- Specified by:
getMetaschemaDatain interfacedev.metaschema.core.model.IBoundObject
-
getHref
Get the "Hypertext Reference".A resolvable URL pointing to the referenced resource.
- Returns:
- the href value
-
setHref
Set the "Hypertext Reference".A resolvable URL pointing to the referenced resource.
- Parameters:
value- the href value to set
-
getMediaType
Get the "Media Type".A label that indicates the nature of a resource, as a data serialization or format.
- Returns:
- the media-type value, or
nullif not set
-
setMediaType
Set the "Media Type".A label that indicates the nature of a resource, as a data serialization or format.
- Parameters:
value- the media-type value to set, ornullto clear
-
getHashes
Get the "Hash".A hash of the resource identified by
href, which can be used to verify the resource was not changed since it was hashed.- Returns:
- the hash value
-
setHashes
Set the "Hash".A hash of the resource identified by
href, which can be used to verify the resource was not changed since it was hashed.- Parameters:
value- the hash value to set
-
addHash
Add a newHashitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeHash
Remove the first matchingHashitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
toString
-