{
  "name": "Facility",
  "description": "A facility that a municipality lists in its open data: what the facility datasets of the 自治体標準オープンデータセット share (name, address, location, publisher, operator, contact, opening hours), after GIF's core data model 施設. Subtypes add the columns of their own dataset. Type https://datamodels.jp/ns/facility/Facility; @context https://datamodels.jp/context/facility/v1.jsonld.",
  "strict": true,
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "type": [
          "string",
          "null"
        ],
        "description": "Name of the facility (名称)"
      },
      "nameKana": {
        "type": [
          "string",
          "null"
        ],
        "description": "Name in full-width katakana (名称_カナ)"
      },
      "nameEn": {
        "type": [
          "string",
          "null"
        ],
        "description": "Name in English (名称_英字 or 名称_英語)"
      },
      "externalFacilityId": {
        "type": [
          "string",
          "null"
        ],
        "description": "The facility's ID in the municipality's list (ID; unique within the municipality and the dataset). Together with localGovernmentCode it identifies the facility nationwide"
      },
      "localGovernmentCode": {
        "type": [
          "string",
          "null"
        ],
        "pattern": "^\\d{6}$",
        "description": "Local government code of the municipality that publishes the list (全国地方公共団体コード, 6 digits)"
      },
      "address": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "addressCountry": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "JP",
              null
            ],
            "description": "Country. Always JP"
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{3}-?\\d{4}$",
            "description": "Postal code, 7 digits with or without hyphen"
          },
          "addressRegion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Prefecture name"
          },
          "addressLocality": {
            "type": [
              "string",
              "null"
            ],
            "description": "Municipality name. For designated cities includes the ward (e.g. 横浜市中区)"
          },
          "machiaza": {
            "type": [
              "string",
              "null"
            ],
            "description": "Town or district name (町字: 町名, 大字, 字), without chome"
          },
          "chome": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d+$",
            "description": "Chome (丁目), digits only (\"一丁目\" → \"1\")"
          },
          "banchi": {
            "type": [
              "string",
              "null"
            ],
            "description": "Banchi (番地): in a residential-indication area the block number (街区符号); elsewhere the whole lot number (地番), branch number included, for example 4638-1"
          },
          "go": {
            "type": [
              "string",
              "null"
            ],
            "description": "Go (号): in a residential-indication area the residence number (住居番号). Empty for a lot number (地番): its branch number stays in banchi"
          },
          "buildingName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Building name, room number and anything below go"
          },
          "residentialIndication": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "true in a residential-indication area (banchi/go are block and residence numbers), false for lot numbers (地番)"
          },
          "jisPrefectureCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{2}$",
            "description": "Prefecture code (JIS X 0401, 2 digits)"
          },
          "jisMunicipalityCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{5}$",
            "description": "Municipality code (JIS X 0402, 5 digits including the prefecture code)"
          },
          "localGovernmentCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{6}$",
            "description": "Local government code (全国地方公共団体コード: JIS X 0402 plus a check digit, 6 digits)"
          },
          "abrMachiazaId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{7}$",
            "description": "Address Base Registry town id (町字ID, 7 digits). Unique together with localGovernmentCode"
          },
          "addressText": {
            "type": [
              "string",
              "null"
            ],
            "description": "Full address as one normalised line. Also the fallback when structured fields are unavailable"
          }
        },
        "required": [
          "addressCountry",
          "postalCode",
          "addressRegion",
          "addressLocality",
          "machiaza",
          "chome",
          "banchi",
          "go",
          "buildingName",
          "residentialIndication",
          "jisPrefectureCode",
          "jisMunicipalityCode",
          "localGovernmentCode",
          "abrMachiazaId",
          "addressText"
        ],
        "additionalProperties": false,
        "description": "Address of the facility, as a JapaneseAddress value (common subject). Its localGovernmentCode is the code of the municipality the facility lies in, which can differ from the publisher's"
      },
      "location": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Point"
            ]
          },
          "coordinates": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "[longitude, latitude] in WGS 84, optionally with the altitude as a third number"
          }
        },
        "required": [
          "type",
          "coordinates"
        ],
        "additionalProperties": false,
        "description": "Where the facility is, as a point (緯度, 経度) A GeoJSON geometry (Point)."
      },
      "operatorName": {
        "type": [
          "string",
          "null"
        ],
        "description": "Name of the organisation that runs the facility or, for equipment such as an AED, installed it (団体名, 法人の名称)"
      },
      "corporateNumber": {
        "type": [
          "string",
          "null"
        ],
        "pattern": "^\\d{13}$",
        "description": "Corporate number (法人番号, 13 digits, National Tax Agency) of the organisation that runs the facility or installed the equipment"
      },
      "contactPoint": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "telephone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Telephone number as written by the publisher, for example 03-3264-2111. Several numbers are separated by ' / ' (電話番号)"
          },
          "telephoneExtension": {
            "type": [
              "string",
              "null"
            ],
            "description": "Extension of the telephone number (内線番号)"
          },
          "faxNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fax number (FAX番号)"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "E-mail address (連絡先メールアドレス)"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Web page or web form for getting in touch (連絡先FormURL) (a URI)"
          },
          "otherChannels": {
            "type": [
              "string",
              "null"
            ],
            "description": "Other ways to get in touch, such as social media accounts, and remarks on the contact, as free text (連絡先備考（その他、SNSなど）)"
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{3}-?\\d{4}$",
            "description": "Postal code of the contact, 7 digits with or without hyphen. It can differ from the postal code of the facility's address (郵便番号)"
          }
        },
        "required": [
          "telephone",
          "telephoneExtension",
          "faxNumber",
          "email",
          "url",
          "otherChannels",
          "postalCode"
        ],
        "additionalProperties": false,
        "description": "How to get in touch, as a ContactPoint value (common subject): telephone, extension, fax, e-mail, web form, other channels, postal code"
      },
      "openingHoursSpecification": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "dayOfWeek": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "enum": [
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday",
                "Saturday",
                "Sunday",
                "PublicHolidays"
              ]
            },
            "minItems": 1,
            "description": "Days on which the hours apply, as schema.org DayOfWeek names. The datasets write them in GIF's weekday notation, 月火水木金 or 12345 (利用可能曜日): 月 or 1 → Monday … 日 or 7 → Sunday. PublicHolidays (schema.org) marks public holidays (no duplicates)"
          },
          "opens": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$",
            "description": "Opening time, local time in Japan, HH:MM or HH:MM:SS as in GIF's time notation (開始時間)"
          },
          "closes": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^(([01][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?|24:00(:00)?)$",
            "description": "Closing time, local time in Japan, HH:MM or HH:MM:SS as in GIF's time notation; 24:00 is the end of the day (終了時間)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Remarks and exceptions in words, such as holidays or the New Year break (利用可能日時特記事項)"
          }
        },
        "required": [
          "dayOfWeek",
          "opens",
          "closes",
          "description"
        ],
        "additionalProperties": false,
        "description": "When the facility can be used, as an OpeningHours value (common subject): weekdays, opening and closing time, remarks"
      },
      "url": {
        "type": [
          "string",
          "null"
        ],
        "description": "Web page about the facility (URL) (a URI)"
      },
      "remarks": {
        "type": [
          "string",
          "null"
        ],
        "description": "Remarks (備考)"
      }
    },
    "required": [
      "name",
      "nameKana",
      "nameEn",
      "externalFacilityId",
      "localGovernmentCode",
      "address",
      "location",
      "operatorName",
      "corporateNumber",
      "contactPoint",
      "openingHoursSpecification",
      "url",
      "remarks"
    ],
    "additionalProperties": false
  }
}
