Package land.oras
Class Manifest
java.lang.Object
land.oras.Descriptor
land.oras.Manifest
Class for manifest
-
Field Summary
Fields inherited from class land.oras.Descriptor
annotations, artifactType, digest, json, mediaType, size
-
Method Summary
Modifier and TypeMethodDescriptionstatic Manifest
empty()
Return a copy of an empty manifeststatic Manifest
Create a manifest from a JSON stringstatic Manifest
Create a manifest from a path@NonNull ArtifactType
Get the artifact typeGet the configGet the descriptorGet the digestGet the layersint
Get the schema versionGet the subjectwithAnnotations
(Map<String, String> annotations) Return a new manifest with the given annotationswithArtifactType
(ArtifactType artifactType) Return a new manifest with the given artifact typewithConfig
(Config config) Return a new manifest with the given configwithDescriptor
(ManifestDescriptor descriptor) Return a new manifest with the given descriptorprotected Manifest
Return same instance but with original JSONwithLayers
(List<Layer> layers) Return a new manifest with the given layerswithSubject
(Subject subject) Return a new manifest with the given configMethods inherited from class land.oras.Descriptor
getAnnotations, getJson, getMediaType, getSize, of, of, of, toJson, toSubject
-
Method Details
-
getSchemaVersion
public int getSchemaVersion()Get the schema version- Returns:
- The schema version
-
getArtifactType
Description copied from class:Descriptor
Get the artifact type- Overrides:
getArtifactType
in classDescriptor
- Returns:
- The artifact type
-
getDescriptor
Get the descriptor- Returns:
- The descriptor
-
getDigest
Description copied from class:Descriptor
Get the digest- Overrides:
getDigest
in classDescriptor
- Returns:
- The digest
-
getConfig
Get the config- Returns:
- The config
-
getSubject
Get the subject- Returns:
- The subject
-
getLayers
Get the layers- Returns:
- The layers
-
withArtifactType
Return a new manifest with the given artifact type- Parameters:
artifactType
- The artifact type- Returns:
- The manifest
-
withLayers
Return a new manifest with the given layers- Parameters:
layers
- The layers- Returns:
- The manifest
-
withConfig
Return a new manifest with the given config- Parameters:
config
- The config- Returns:
- The manifest
-
withSubject
Return a new manifest with the given config- Parameters:
subject
- The subject- Returns:
- The manifest
-
withAnnotations
Return a new manifest with the given annotations- Parameters:
annotations
- The annotations- Returns:
- The manifest
-
withDescriptor
Return a new manifest with the given descriptor- Parameters:
descriptor
- The descriptor- Returns:
- The manifest
-
withJson
Return same instance but with original JSON- Overrides:
withJson
in classDescriptor
- Parameters:
json
- The original JSON- Returns:
- The index
-
fromJson
Create a manifest from a JSON string- Parameters:
json
- The JSON string- Returns:
- The manifest
-
fromPath
Create a manifest from a path- Parameters:
path
- The path- Returns:
- The manifest
-
empty
Return a copy of an empty manifest- Returns:
- The empty manifest
-