new SolarNodeImageInfo(id, sha256, contentLength, uncompressedSha256, uncompressedContentLength)
Constructor.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | a unique identifier for this image |
sha256 |
string | hex-encoded SHA-256 digest of the image content |
contentLength |
number | the content length of the image content, in bytes |
uncompressedSha256 |
string | a hex-encoded SHA-256 digest of the image contents when uncompressed |
uncompressedContentLength |
number | the size of the image contents when uncompressed, in bytes |
Members
-
<readonly> contentLength :number
-
The content length of the image content, in bytes.
Type:
- number
-
<readonly> id :string
-
A unique identifier for this image.
Type:
- string
-
<readonly> sha256 :string
-
A hex-encoded SHA-256 digest of the image content.
Type:
- string
-
<readonly> uncompressedContentLength :number
-
The size of the image contents when uncompressed, in bytes.
Type:
- number
-
<readonly> uncompressedSha256 :string
-
A hex-encoded SHA-256 digest of the image contents when uncompressed.
Type:
- string
Methods
-
<static> compareById(l, r)
-
Compare two
SolarNodeImageInfoobjects based on their IDs.The
idvalues are compared in a case-insensitive manner, using a natural number ordering.Parameters:
Name Type Description lSolarNodeImageInfo the left-hand object to compare
rSolarNodeImageInfo the right-hand object to compare
Returns:
<
0iflsorts beforer, >0iflsorts afterr, or0iflandrsort equally- Type
- number
-
<static> fromJsonEncoding(json)
-
Parse a JSON string into a
module:domain~SolarNodeImageInfoinstance.The JSON must be encoded the same way
module:domain~SolarNodeImageInfo#toJsonEncodingdoes.Parameters:
Name Type Description jsonstring | Object the JSON to parse, or a parsed JSON object
Returns:
the session instance
-
<static> idComponentGroups(imageList)
-
Take an array of
SolarNodeImageInfoobjects and split them into a hierarchy based on the components of their IDs.The ID components are derived by splitting the
idvalues on a-(dash) character. They are then grouped going from left to right by component.Parameters:
Name Type Description imageListArray.<SolarNodeImageInfo> the image infos to get a hierarchy for
Returns:
the hierarchy as a list of groups
- Type
- Array.<module:domain~SolarNodeImageGroup>
-
displayNameForComponent()
-
Get a display name based on the most specific component of this image's
idvalue.The components of the
idare based on splitting it on a-character. This method returns the right-most component. If that component has a date-like structure, the date will be formatted slightly.Returns:
the display name
- Type
- string
-
hasId(id)
-
Compare an ID value with this object's ID value.
This method performs a case-insensitive compare similar to
module:domain~SolarNodeImageInfo#compareById.Parameters:
Name Type Description idstring an ID value to compare
Returns:
trueifidmatches this object'sid- Type
- boolean
-
toJsonEncoding()
-
Get this object as a standard JSON encoded string value.
Returns:
the JSON encoded string
- Type
- string