{
  "name": "PublicToilet",
  "description": "One public toilet: one row of the list a municipality publishes as 自治体標準オープンデータセット dataset 13 (公衆トイレ一覧), with the numbers of toilets by kind. Type https://datamodels.jp/ns/facility/PublicToilet; @context https://datamodels.jp/context/facility/v1.jsonld.",
  "strict": true,
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "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",
        "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",
        "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)."
      },
      "installationLocation": {
        "type": [
          "string",
          "null"
        ],
        "description": "Where the toilet is, for example at which exit of a station (設置位置). The dataset identifies a toilet by name and installation location"
      },
      "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 (備考)"
      },
      "totalMaleToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of toilets in the men's toilet, urinals included (男性トイレ総数) (minimum 0)"
      },
      "maleUrinals": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of urinals in the men's toilet (男性トイレ数（小便器）) (minimum 0)"
      },
      "maleJapaneseStyleToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of Japanese-style (squat) toilets in the men's toilet (男性トイレ数（和式）) (minimum 0)"
      },
      "maleWesternStyleToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of Western-style (sitting) toilets in the men's toilet (男性トイレ数（洋式）) (minimum 0)"
      },
      "totalFemaleToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of toilets in the women's toilet (女性トイレ総数) (minimum 0)"
      },
      "femaleJapaneseStyleToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of Japanese-style (squat) toilets in the women's toilet (女性トイレ数（和式）) (minimum 0)"
      },
      "femaleWesternStyleToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of Western-style (sitting) toilets in the women's toilet (女性トイレ数（洋式）) (minimum 0)"
      },
      "totalUnisexToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of all-gender toilets (男女共用トイレ総数) (minimum 0)"
      },
      "unisexJapaneseStyleToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of all-gender Japanese-style (squat) toilets (男女共用トイレ数（和式）) (minimum 0)"
      },
      "unisexWesternStyleToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of all-gender Western-style (sitting) toilets (男女共用トイレ数（洋式）) (minimum 0)"
      },
      "barrierFreeToilets": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of barrier-free toilets: toilets that meet Art. 13(2) of the MLIT barrier-free standard for public transport, or that the municipality defines as multipurpose or barrier-free toilets (バリアフリートイレ数) (minimum 0)"
      },
      "wheelchairToilet": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "true when there is a toilet for wheelchair users (車椅子使用者用トイレ有無: 有 → true, 無 → false)"
      },
      "babyCareToilet": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "true when there is a toilet with equipment for babies, such as a baby changing table or seat (乳幼児用設備設置トイレ有無: 有 → true, 無 → false)"
      },
      "ostomateToilet": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "true when there is a toilet for ostomates (オストメイト設置トイレ有無: 有 → true, 無 → false)"
      }
    },
    "required": [
      "name",
      "nameKana",
      "nameEn",
      "externalFacilityId",
      "localGovernmentCode",
      "address",
      "location",
      "installationLocation",
      "operatorName",
      "corporateNumber",
      "contactPoint",
      "openingHoursSpecification",
      "url",
      "remarks",
      "totalMaleToilets",
      "maleUrinals",
      "maleJapaneseStyleToilets",
      "maleWesternStyleToilets",
      "totalFemaleToilets",
      "femaleJapaneseStyleToilets",
      "femaleWesternStyleToilets",
      "totalUnisexToilets",
      "unisexJapaneseStyleToilets",
      "unisexWesternStyleToilets",
      "barrierFreeToilets",
      "wheelchairToilet",
      "babyCareToilet",
      "ostomateToilet"
    ],
    "additionalProperties": false
  }
}
