Package land.oras
Class Manifest
java.lang.Object
land.oras.Descriptor
land.oras.Manifest
- All Implemented Interfaces:
Describable
Class for manifest
-
Field Summary
Fields inherited from class land.oras.Descriptor
annotations, artifactType, digest, json, mediaType, size -
Method Summary
Modifier and TypeMethodDescriptionstatic Manifestempty()Return a copy of an empty manifestbooleanstatic ManifestCreate a manifest from a JSON stringstatic ManifestCreate a manifest from a path@NonNull ArtifactTypeGet the artifact typeGet the artifact type as string for JSON serializationGet the configGet the manifest descriptor for this describableGet the digestGet the layersintGet the schema versionGet the subjectGet the top-level digest (for JSON serialization)inthashCode()toString()withAnnotations(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 ManifestReturn 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, getAnnotationsForJson, 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:DescriptorGet the artifact type- Overrides:
getArtifactTypein classDescriptor- Returns:
- The artifact type
-
getArtifactTypeAsString
Get the artifact type as string for JSON serialization- Returns:
- The artifact type as string
-
getDescriptor
Description copied from interface:DescribableGet the manifest descriptor for this describable- Specified by:
getDescriptorin interfaceDescribable- Returns:
- The manifest descriptor
-
getDigest
Description copied from class:DescriptorGet the digest- Overrides:
getDigestin classDescriptor- Returns:
- The digest
-
getTopLevelDigest
Get the top-level digest (for JSON serialization)- Returns:
- The top-level digest
-
getConfig
Get the config- Returns:
- The config
-
getSubject
Description copied from interface:DescribableGet the subject- Specified by:
getSubjectin interfaceDescribable- 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:
withJsonin 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
-
equals
- Overrides:
equalsin classDescriptor
-
hashCode
public int hashCode()- Overrides:
hashCodein classDescriptor
-
toString
- Overrides:
toStringin classDescriptor
-