resource
Stay organized with collections
Save and categorize content based on your preferences.
To define supplemental information related to an <info>
object, use the
<resource>
entity.
resource
entity sub-elements
Element name |
Optionality |
Type |
CAP and Google notes and requirements |
<resourceDesc> |
REQUIRED |
string |
The value of the <resourceDesc> element is text that
describes the type and content of the resource file. Examples are
map and photo .
|
<mimeType> |
REQUIRED |
string |
The value of the <mimeType> element is an identifier
of the MIME media type and subtype as described in
RFC 2046.
|
<size> |
OPTIONAL |
float |
The value of the <size> element is an integer that
indicates the size of the resource file in bytes.
|
<uri> |
OPTIONAL |
string |
The value of the <uri> element is a full absolute
URI to the resource file or a relative URI that names the content of a
<defeUri> element.
|
<defeUri> |
CONDITIONAL |
string |
The value of the <defeUri> element is the Base64
encoded data content of the resource file. If you can't use a URI to
retrieve a resource, then you can use the <defeUri>
element with or instead of the <uri> element in
messages like broadcasts that are transmitted over one-way data
links.
|
<digest> |
OPTIONAL |
string |
The value of the <digest> element is code that
represents the digital digest computed from the resource file. To
calculate the <digest> element value, use the Secure
Hash Algorithm (SHA-1) described in
FIPS 180-2.
|
Example
<resource>
<resourceDesc>Image file (GIF)</resourceDesc>
<mimeType>image/gif</mimeType>
<uri>http://www.dhs.gov/dhspublic/getAdvisoryImage</uri>
</resource>
<resource>
<resourceDesc>Peta Intensitas Guncangan</resourceDesc>
<mimeType>image/jpeg</mimeType>
<uri>https://bmkg-content-inatews.storage.googleapis.com/20230410074420.mmi.jpg</uri>
</resource>
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-07 UTC."],[[["The `\u003cresource\u003e` entity is used to define supplemental information related to an `\u003cinfo\u003e` object."],["It includes elements like `\u003cresourceDesc\u003e`, `\u003cmimeType\u003e`, `\u003csize\u003e`, `\u003curi\u003e`, `\u003cdefeUri\u003e`, and `\u003cdigest\u003e` to describe the resource."],["The `\u003cresourceDesc\u003e` element describes the type and content, while `\u003cmimeType\u003e` specifies the MIME type."],["The `\u003curi\u003e` or `\u003cdefeUri\u003e` element provides access to the resource file, either through a URI or Base64 encoded data."],["Optional elements like `\u003csize\u003e` and `\u003cdigest\u003e` provide additional information about the resource's size and integrity."]]],["The `\u003cresource\u003e` entity defines supplemental information for an `\u003cinfo\u003e` object. It utilizes sub-elements: `\u003cresourceDesc\u003e` (required) describes the resource's content, `\u003cmimeType\u003e` (required) specifies the MIME type, `\u003csize\u003e` (optional) indicates file size in bytes, `\u003curi\u003e` (optional) provides a file location URI. `\u003cdefeUri\u003e` (conditional) offers Base64 encoded data and `\u003cdigest\u003e` (optional) is a SHA-1 hash. The example shows usage for image files with descriptions, types, and URI locations.\n"]]