プレリリース版です。正式公開までは、公開済みのファイルも含めて内容が変わることがあります。
Skip to content

出典: https://datamodels.jp/guide/builder · 文章は CC BY 4.0

拡張ビルダー ​

カタログのモデルに、あなたのシステムで要る属性を足すときに使います。モデルを選んで属性を入力すると、次の 2 つのファイルができます。

  • @context: カタログの @context を URL で読み込み、あなたの属性だけを定義します。カタログの属性は IRI が変わりません。拡張するのプロファイルと同じ書き方です。
  • JSON Schema: カタログの属性とあなたの属性で検証します。

名前空間には、あなたが管理するドメインの URL を使ってください。多くのシステムで役に立つ属性なら、カタログへの提案をお願いします(下のリンクから)。入力した内容はこのページの中だけで使われ、どこにも送られません。ただし、提案フォームへのリンクを開くと、入力した属性名と説明が GitHub に送られます(フォームに入力済みの状態で開くため)。

あなたの属性

あなたの @context

{
  "@context": [
    "https://datamodels.jp/context/transportation/v1.jsonld",
    {
      "acme": "https://example.com/ns/acme/",
      "patrolRoute": "acme:patrolRoute"
    }
  ]
}

JSON Schema(カタログの属性 + あなたの属性)

カタログのスキーマは閉じている(additionalProperties: false)ため、参照だけでは属性を足せません。これは https://datamodels.jp/schema/transportation/RoadRestriction/v1.0.0.json をもとに作ったもので、新しいバージョンに移るときは作り直してください。$id はあなたの URL に書き換えてください。

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schema/acme/RoadRestriction.json",
  "title": "RoadRestriction (acme)",
  "description": "One road restriction, including closures: road name, regulated section as a point, line or area, status and category.",
  "x-license-url": "https://datamodels.jp/LICENSE-CONTENT",
  "x-model-tags": "road, transportation, Japan",
  "x-derived-from": "https://github.com/geolonia/geonicdb-datamodels",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uri",
      "description": "Entity id (URN)"
    },
    "type": {
      "type": "string",
      "const": "RoadRestriction",
      "description": "Entity type"
    },
    "roadName": {
      "description": "Road name",
      "type": "string",
      "x-ngsi": {
        "type": "Property"
      },
      "x-iri": "https://smartdatamodels.org/dataModel.Transportation/roadName"
    },
    "address": {
      "$ref": "https://datamodels.jp/schema/common/JapaneseAddress/v1.0.0.json",
      "description": "Address of the location, as a JapaneseAddress value (common subject)",
      "x-ngsi": {
        "type": "Property",
        "model": "https://datamodels.jp/ns/common/JapaneseAddress"
      },
      "x-iri": "https://schema.org/address"
    },
    "location": {
      "$ref": "https://datamodels.jp/schema/common/Geometry/v1.0.0.json",
      "description": "The regulated section, as a GeoJSON geometry. A point for a single-spot restriction, a LineString for a section, a polygon for an area, matching the point/line/area regulation forms (点規制・線規制・面規制) of the NPA's traffic regulation data format (交通規制情報(拡張版標準フォーマット)説明書 Ver: k_2.1, JARTIC, 2025-01-20)",
      "x-ngsi": {
        "type": "GeoProperty",
        "model": "https://datamodels.jp/ns/common/Geometry"
      },
      "x-iri": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld#location"
    },
    "restrictionStatus": {
      "description": "Normalised restriction state, the value space of Smart Data Models RoadSegment.status: closed (no traffic), limited (traffic possible but not in full capacity), open (restriction lifted or not yet in place). The local wording goes in statusLabel; regulationCategory gives the finer public-sector category. When no value fits, leave it out and give the local wording in statusLabel",
      "type": "string",
      "enum": [
        "closed",
        "limited",
        "open"
      ],
      "x-ngsi": {
        "type": "Property"
      },
      "x-iri": "https://datamodels.jp/ns/transportation/restrictionStatus"
    },
    "regulationCategory": {
      "description": "Regulation category, from the legend of MLIT's Road Information Provision System (道路情報提供システム 通行規制情報, road-info-prvs.mlit.go.jp, accessed 2026-09-24): the categories a road administrator uses for a driver-facing closure or restriction. Optional and independent of restrictionStatus",
      "type": "string",
      "enum": [
        "closedWeather",
        "closedConstruction",
        "closedHeavyVehicle",
        "closedWinter",
        "laneRestriction",
        "alternatingOneWay",
        "mobileRestriction",
        "chainRestriction",
        "chainGuidance",
        "other"
      ],
      "x-ngsi": {
        "type": "Property"
      },
      "x-iri": "https://datamodels.jp/ns/transportation/regulationCategory"
    },
    "statusLabel": {
      "type": "string",
      "minLength": 1,
      "description": "The restriction status in the local or source system's wording (依頼中, 通行止め中, 解除済み). Required when restrictionStatus is left out",
      "x-ngsi": {
        "type": "Property"
      },
      "x-iri": "https://datamodels.jp/ns/task/statusLabel"
    },
    "validFrom": {
      "description": "When the restriction takes effect",
      "type": "string",
      "format": "date-time",
      "x-ngsi": {
        "type": "Property"
      },
      "x-iri": "https://smartdatamodels.org/validFrom"
    },
    "validTo": {
      "description": "When the restriction is lifted",
      "type": "string",
      "format": "date-time",
      "x-ngsi": {
        "type": "Property"
      },
      "x-iri": "https://smartdatamodels.org/dataModel.Alert/validTo"
    },
    "description": {
      "type": "string",
      "description": "Free-text memo",
      "x-ngsi": {
        "type": "Property"
      },
      "x-iri": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld#description"
    },
    "patrolRoute": {
      "type": "string",
      "x-ngsi": {
        "type": "Property"
      },
      "x-iri": "https://example.com/ns/acme/patrolRoute"
    }
  },
  "required": [
    "id",
    "type",
    "location"
  ],
  "anyOf": [
    {
      "required": [
        "restrictionStatus"
      ]
    },
    {
      "required": [
        "statusLabel"
      ]
    }
  ],
  "additionalProperties": false,
  "x-extends": "https://datamodels.jp/schema/transportation/RoadRestriction/v1.0.0.json"
}

この属性がカタログにあるべきなら、提案フォームで知らせてください(内容は入力済み)。