资源,物力,来源
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如需定义与 <info>
对象相关的补充信息,请使用 <resource>
实体。
resource
实体子元素
元素名称 |
可选性 |
类型 |
CAP 和 Google 备注和要求 |
<resourceDesc> |
必需 |
string |
<resourceDesc> 元素的值是用于描述资源文件类型和内容的文本。例如 map 和 photo 。
|
<mimeType> |
必需 |
string |
<mimeType> 元素的值是 MIME 媒体类型和子类型的标识符,如 RFC 2046 中所述。
|
<size> |
可选 |
float |
<size> 元素的值是一个整数,表示资源文件的大小(以字节为单位)。
|
<uri> |
可选 |
string |
<uri> 元素的值是资源文件的完整绝对 URI,或用于命名 <defeUri> 元素内容的相对 URI。
|
<defeUri> |
基于条件 |
string |
<defeUri> 元素的值是资源文件的 Base64 编码数据内容。如果您无法使用 URI 检索资源,则可以在消息(例如通过单向数据链接传输的广播)中将 <defeUri> 元素与 <uri> 元素搭配使用,也可以将 <defeUri> 元素替换为 <uri> 元素。
|
<digest> |
可选 |
string |
<digest> 元素的值是表示从资源文件计算出的数字摘要的代码。如需计算 <digest> 元素值,请使用 FIPS 180-2 中所述的安全哈希算法 (SHA-1)。
|
示例
<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>
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-29。"],[],["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"]]