Package land.oras
Class Descriptor
java.lang.Object
land.oras.Descriptor
Main class for descriptor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the annotations@Nullable ArtifactType
Get the artifact type@Nullable String
Get the digestgetJson()
Return the original JSONfinal String
Get the media type@Nullable Long
getSize()
Get the sizestatic Descriptor
Create a new descriptorstatic Descriptor
Create a new descriptorstatic Descriptor
Create a new descriptorfinal String
toJson()
Return the JSON representation of this descriptorReturn this manifest descriptor as a subjectprotected Descriptor
Return same instance but with original JSON
-
Field Details
-
mediaType
The media type of the layer -
annotations
Annotations for the layer -
digest
-
size
-
artifactType
-
json
Original json
-
-
Constructor Details
-
Descriptor
-
-
Method Details
-
getJson
Return the original JSON- Returns:
- The original JSON
-
getAnnotations
Get the annotations- Returns:
- The annotations
-
getMediaType
Get the media type- Returns:
- The media type
-
getDigest
Get the digest- Returns:
- The digest
-
getSize
Get the size- Returns:
- The size
-
getArtifactType
Get the artifact type- Returns:
- The artifact type
-
toJson
Return the JSON representation of this descriptor- Returns:
- The JSON string
-
withJson
Return same instance but with original JSON- Parameters:
json
- The original JSON- Returns:
- The index
-
toSubject
Return this manifest descriptor as a subject- Returns:
- The subject
-
of
public static Descriptor of(String digest, Long size, String mediaType, Map<String, String> annotations, String artifactType) Create a new descriptor- Parameters:
digest
- The digestsize
- The sizemediaType
- The media typeannotations
- The annotationsartifactType
- The artifact type- Returns:
- The descriptor
-
of
Create a new descriptor- Parameters:
digest
- The digestsize
- The sizemediaType
- The media type- Returns:
- The descriptor
-
of
Create a new descriptor- Parameters:
digest
- The digestsize
- The size- Returns:
- The descriptor
-