OfficeScope

הישויות OfficeScope משמשות כדי לציין לאילו משרדים שייכת הישות ElectionEvent ו-OfficeholderSubFeed.

Elements

שם תיוג סוג הערות ריבוי
שם ניפוי הבאגים DebugName String השם התיאורי של המשרד. 0 או 1
משרד OfficeLevel OfficeLevel כאן מציינים את רמת המשרדים בהיקף הזה: Country ברמה הארצית, Administrative Area 1 במדינה או במחוז וכו'. 1
מזהה OCD של סמכות שיפוט JurisdictionOcdId Ocd Id אופציונלי אם הערך של OfficeLevel הוא Country, חובה אחרת. השתמשו בשדה הזה כדי לציין את המיקום הגיאוגרפי הפוליטי. לדוגמה, אם המדינה היא וירג'יניה נגד פנסילבניה, או מניטובה לעומת אונטריו. 0 או 1
תפקידים במשרד OfficeRoles OfficeRole רשימת התפקידים שנכללים במערך הנתונים, שמוגבלים ספציפית לאלו שנבחרו לתפקיד זה, למזהה OCD בסמכות השיפוט הזו וכו'. 1 או יותר
ElectoralDistrictCollection ElectoralDistrictCollection Ocd Id רשימת מזהי OCD של מחוזות הבחירות שמצביעים על התפקיד במשרד. רשימה ריקה מרמזת שההיקף כולל את כל המחוזות האפשריים עבור מיקום הבחירות או בעל התפקיד שצוין. 0 או 1

דוגמאות

הדוגמה הבאה היא Feed שמכיל ElectionEvent עם OfficeScope. הוא מציין שFeed מכיל (או צפוי להכיל) נתונים על מערכת בחירות אחת או יותר לבחירת הנשיא ברמה הארצית, חבר אחד או יותר בבית התחתון, ומושב אחד או יותר בבית העליון:

XML

<OfficeScope>
  <DebugName>Scope of US general election</DebugName>
  <OfficeLevel>Country</OfficeLevel>
  <JurisdictionOcdId>ocd-division/country:us</JurisdictionOcdId>
  <OfficeRoles>president</OfficeRoles>
  <OfficeRoles>lower house</OfficeRoles>
  <OfficeRoles>upper house</OfficeRoles>
</OfficeScope>

JSON

{
 "OfficeScope": {
   "DebugName": "Scope of US general election",
   "OfficeLevel": "Country",
   "JurisdictionOcdId": "ocd-division/country:us",
   "OfficeRoles": [
     "president",
     "lower house",
     "upper house"
   ]
 }
}
    

אותו ElectionEvent יכול להכיל ישויות נוספות של OfficeScope, שמציינות מספר בחירות ברמת המדינה בווירג'יניה ובפנסילבניה לתפקידים שונים ברמת המדינה:

XML

<OfficeScope>
  <DebugName>Virginia election scope</DebugName>
  <OfficeLevel>Administrative Area 1</OfficeLevel>
  <JurisdictionOcdId>ocd-division/country:us/state:va</JurisdictionOcdId>
  <OfficeRoles>attorney general</OfficeRoles>
  <OfficeRoles>state executive</OfficeRoles>
</OfficeScope>
<OfficeScope>
  <DebugName>Pennsylvania election scope</DebugName>
  <OfficeLevel>Administrative Area 1</OfficeLevel>
  <JurisdictionOcdId>ocd-division/country:us/state:pa</JurisdictionOcdId>
  <OfficeRoles>state lower house</OfficeRoles>
  <OfficeRoles>state upper house</OfficeRoles>
  <OfficeRoles>state executive</OfficeRoles>
</OfficeScope>

JSON

{
 "OfficeScope": {
 "DebugName": "Virginia election scope",
 "OfficeLevel": "Administrative Area 1",
 "JurisdictionOcdId": "ocd-division/country:us/state:va",
 "OfficeRoles": [
   "attorney general",
   "state executive"
 ]
 }
}
{
 "OfficeScope": {
 "DebugName": "Pennsylvania election scope",
 "OfficeLevel": "Administrative Area 1",
 "JurisdictionOcdId": "ocd-division/country:us/state:pa",
 "OfficeRoles": [
   "state lower house",
   "state upper house",
   "state executive"
 ]
 }
}
    

במקרה הצורך, השדה ElectionEvent יכול להכיל ישויות OfficeScope שמציינות את מחוזות הבחירות שמצביעים על התפקיד הבא ברשימה:

XML

<OfficeScope>
  <DebugName>US general election scope</DebugName>
  <OfficeLevel>National</OfficeLevel>
  <JurisdictionOcdId>ocd-division/country:us</JurisdictionOcdId>
  <OfficeRoles>upper house</OfficeRoles>
  <ElectoralDistrictCollection>
    <OcdId>ocd-division/country:us/state:ar</OcdId>
    <OcdId>ocd-division/country:us/state:ca</OcdId>
    <OcdId>ocd-division/country:us/state:ct</OcdId>
    <OcdId>ocd-division/country:us/state:de</OcdId>
    <OcdId>ocd-division/country:us/state:fl</OcdId>
  </ElectoralDistrictCollection>
</OfficeScope>

JSON

{
 "OfficeScope": {
   "DebugName" : "US general election scope",
   "OfficeLevel": "National",
   "JurisdictionOcdId": "ocd-division/country:us",
   "OfficeRoles": "upper house",
   "ElectoralDistrictCollection": {
     "OcdId" : [
     "ocd-division/country:us/state:ar",
     "ocd-division/country:us/state:ca",
     "ocd-division/country:us/state:ct",
     "ocd-division/country:us/state:de",
     "ocd-division/country:us/state:fl"
     ]
   }
 }
}