日本語
Attachment ドラフト
添付ファイル
タスクまたはプロジェクトに添付されたファイルのメタデータ。ファイル本体はブローカーの外(元システムやオブジェクトストレージ)に置き、URL で参照する。
| 型 IRI | https://datamodels.jp/ns/task/Attachment |
| @context | https://datamodels.jp/context/task/v1.jsonld (エイリアス、互換性のある最新版)https://datamodels.jp/context/task/v1.0.0.jsonld (このバージョン、不変) |
| JSON Schema | /schema/task/Attachment/v1.json/schema/task/Attachment/v1.0.0.json |
| 例 | key-values · normalized |
| ソース | github.com/geolonia/datamodels |
属性
task
対象のタスク
- 値: Relationship → Task
- IRI:
https://datamodels.jp/ns/task/task
project
所属プロジェクト
- 値: Relationship → Project
- IRI:
https://datamodels.jp/ns/task/project
author
作成者(人・組織・チームのエンティティ)
- 値: Relationship → 人・組織・チーム
- IRI:
https://schema.org/author
contentUrl
必須ファイルの URL
- 値: Property, string (uri)
- IRI:
https://schema.org/contentUrl
filename
ファイル名
- 値: Property, string
- IRI:
https://datamodels.jp/ns/task/filename
encodingFormat
MIME タイプ
- 値: Property, string
- IRI:
https://schema.org/encodingFormat
contentSize
サイズ(バイト)
- 値: Property, integer, ≥ 0
- IRI:
https://schema.org/contentSize
digest
ハッシュ。アルゴリズム名:16進(例: sha256:…)
- 値: Property, string
- IRI:
https://datamodels.jp/ns/task/digest
description
説明
- 値: Property, string
- IRI:
https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld#description
location
撮影・取得位置(点)
- 値: GeoProperty (Geometry, Point)
- IRI:
https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld#location
source
元システムにおけるこのオブジェクトの URL
- 値: Property, string (uri)
- IRI:
https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/source
externalId
元システムにおける識別子
- 値: Property, string
- IRI:
https://datamodels.jp/ns/task/externalId
dateCreated
元システムでの作成日時(ブローカーの createdAt とは別)
- 値: Property, string (date-time)
- IRI:
https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/dateCreated
例(key-values)
json
{
"id": "urn:ngsi-ld:Attachment:takamatsu:77",
"type": "Attachment",
"task": "urn:ngsi-ld:Task:takamatsu:1234",
"author": "urn:ngsi-ld:Team:takamatsu:genchi-1",
"contentUrl": "https://tracker.example.jp/attachments/download/77/IMG_0012.jpg",
"filename": "IMG_0012.jpg",
"encodingFormat": "image/jpeg",
"contentSize": 2483011,
"digest": "sha256:9f2c1e5a7b3d4f60a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718",
"description": "西宝町1-1 交差点、南向き",
"location": {
"type": "Point",
"coordinates": [
134.0439,
34.3401
]
},
"source": "https://tracker.example.jp/attachments/77",
"externalId": "77",
"dateCreated": "2026-08-21T10:58:00+09:00"
}例(normalized)
json
{
"@context": [
"https://datamodels.jp/context/task/v1.0.0.jsonld",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld"
],
"id": "urn:ngsi-ld:Attachment:takamatsu:77",
"type": "Attachment",
"task": {
"type": "Relationship",
"object": "urn:ngsi-ld:Task:takamatsu:1234"
},
"author": {
"type": "Relationship",
"object": "urn:ngsi-ld:Team:takamatsu:genchi-1"
},
"contentUrl": {
"type": "Property",
"value": "https://tracker.example.jp/attachments/download/77/IMG_0012.jpg"
},
"filename": {
"type": "Property",
"value": "IMG_0012.jpg"
},
"encodingFormat": {
"type": "Property",
"value": "image/jpeg"
},
"contentSize": {
"type": "Property",
"value": 2483011
},
"digest": {
"type": "Property",
"value": "sha256:9f2c1e5a7b3d4f60a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718"
},
"description": {
"type": "Property",
"value": "西宝町1-1 交差点、南向き"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [
134.0439,
34.3401
]
}
},
"source": {
"type": "Property",
"value": "https://tracker.example.jp/attachments/77"
},
"externalId": {
"type": "Property",
"value": "77"
},
"dateCreated": {
"type": "Property",
"value": {
"@type": "DateTime",
"@value": "2026-08-21T10:58:00+09:00"
}
}
}Link ヘッダー
http
Link: <https://datamodels.jp/context/task/v1.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"データの検証とブローカーへの送り方は使い方を参照。
対応する標準: GitHub Issue の添付(本文中の埋め込み)
GitHub には添付の API が無く、本文の URL から抽出する
| このモデル | 対応先 | 備考 |
|---|---|---|
task | issue | |
contentUrl | URL in body | |
filename | URL basename | |
encodingFormat | 対応なし |
対応する標準: Redmine の添付ファイル
| このモデル | 対応先 | 備考 |
|---|---|---|
task | container_id | container_type が Issue のとき |
project | container_id | container_type が Project のとき(ファイルモジュール) |
author | author | |
contentUrl | content_url | |
filename | filename | |
encodingFormat | content_type | |
contentSize | filesize | |
digest | digest | Redmine は SHA-256(旧 MD5)の16進のみ。アルゴリズム名を前置する |
description | description | |
dateCreated | created_on | |
externalId | id |
注記
- Upstream considered (2026-09-18): Smart Data Models dataModel.IssueTracking (Open311 service_requests/services; IUDX IssueReporting), both citizen-complaint records shaped by one country's municipal process, not task models; dataModel.Transportation CityWork and dataModel.PredictiveMaintenance, domain-specific. RFC 8984 (JSCalendar Task) is the universal reference and supplies the value spaces used here. See issue #22.
- The core is deliberately small. System-specific data (time spent, milestones, watchers, custom fields, map rotation) belongs in extensions.
- Exactly one of task or project is required (schema oneOf). The file stays outside the broker.
このページのモデル内容は CC BY 4.0 で提供されています。 LICENSE-CONTENT