ExternalIdentifier
實體可讓動態饋給建立者與特定物件建立關聯,任意組合的來源/值組合。ExternalIdentifier
是外部系統中的管轄區程式碼,用於將管轄區與候選人、辦公室或地緣政治單位等物件建立關聯。
ExternalIdentifier
實體的 Type
欄位會用來說明 ID 的來源,而非識別的物件。舉例來說,兩種內建類型為 fips
、「聯邦資訊處理標準」代碼的縮寫和 state
。雖然 FIPS 兩位數代碼可用於說明狀態,但在這種情況下,預期的 Type
值為 fips
,而不是 state
。這是因為 fips
描述了 ID 的來源。
外部 ID 會用於以下用途:
- 提供穩定版 ID。
- 提供外部資源的標準 ID,例如開放式公民資料 ID 或 FIPS 代碼。
- 請提供非 NIST CDF 結構定義的非原生屬性。
用於為物件提供額外資料或結構定義時,外部 ID 需要使用 other
的 Type
。當中包含 OtherType
和 Value
,兩者都取決於提供的資料類型。如需如何以這種方式提供資料的範例,請參閱 Office
。
屬性
下表說明 ExternalIdentifier
的屬性:
屬性 | 必填與否 | 類型 | 說明 |
---|---|---|---|
label |
選用 | string |
資訊型標籤。視需要使用。 |
元素
下表列出 ExternalIdentifier
的元素:
元素 | 多重性 | 類型 | 說明 |
---|---|---|---|
Type |
1 | IdentifierType |
提供 ID 類型。 |
OtherType |
0 或 1 | string |
IdentifierType 的值為 other 時使用。 |
Value |
1 | string |
管轄區使用的 ID。 |
範例
XML
<ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>stable-gu-0081</Value> </ExternalIdentifier> <ExternalIdentifier> <Type>ocd-id</Type> <Value>ocd-division/country:ke/county:narok</Value> </ExternalIdentifier> <ExternalIdentifier> <Type>national-level</Type> <Value>33</Value> </ExternalIdentifier> </ExternalIdentifiers>
JSON
"ExternalIdentifiers": { "ExternalIdentifier" : [ { "Type": "other", "OtherType": "stable", "Value": "stable-gu-0081" }, { "Type": "ocd-id", "Value": "ocd-division/country:ke/county:narok" }, { "Type": "national-level", "Value": "33" } ] }