Package land.oras
Class ManifestDescriptor
java.lang.Object
land.oras.ManifestDescriptor
Manifest descriptor
-
Method Summary
Modifier and TypeMethodDescriptionstatic ManifestDescriptor
Create a manifest descriptor from a JSON stringGet the annotations@Nullable String
Get the artifact typeGet the digestGet the media typeGet the platformlong
getSize()
Get the sizestatic ManifestDescriptor
Create a manifest descriptorstatic ManifestDescriptor
of
(Descriptor descriptor) Create a manifest descriptorReturn this manifest descriptor as a descriptortoJson()
Return the JSON representation of the manifestReturn this manifest descriptor as a subjectwithAnnotations
(@Nullable Map<String, String> annotations) Create a manifest descriptor with the given annotationswithArtifactType
(@Nullable String artifactType) Create a manifest descriptor with the given artifact type
-
Method Details
-
getArtifactType
Get the artifact type- Returns:
- The artifact type
-
getMediaType
Get the media type- Returns:
- The media type
-
getDigest
Get the digest- Returns:
- The digest
-
getSize
public long getSize()Get the size- Returns:
- The size
-
getPlatform
Get the platform- Returns:
- The platform
-
getAnnotations
Get the annotations- Returns:
- The annotations
-
toJson
Return the JSON representation of the manifest- Returns:
- The JSON string
-
fromJson
Create a manifest descriptor from a JSON string- Parameters:
json
- The JSON string- Returns:
- The manifest
-
toDescriptor
Return this manifest descriptor as a descriptor- Returns:
- The descriptor
-
toSubject
Return this manifest descriptor as a subject- Returns:
- The subject
-
withAnnotations
Create a manifest descriptor with the given annotations- Parameters:
annotations
- The annotations- Returns:
- The subject
-
withArtifactType
Create a manifest descriptor with the given artifact type- Parameters:
artifactType
- The artifact type- Returns:
- The subject
-
of
Create a manifest descriptor- Parameters:
mediaType
- The media typedigest
- The digestsize
- The size- Returns:
- The subject
-
of
Create a manifest descriptor- Parameters:
descriptor
- The descriptor- Returns:
- The subject
-