-
Notifications
You must be signed in to change notification settings - Fork 30
Crew Assignment Data
Zsombor Welker edited this page Jun 2, 2013
·
1 revision
Crew assignment data is TCIP-XML. Its purpose it to match an operator to his or her run.
An example follows:
<!-- This is the root element of the data. All of the attributes can stay as is, except "created" which
should show the time at which the data extract was generated. -->
<!-- Only other attribute that may change is xmlns:n2 may change to xmlns:ns2="http://www.TCIP-Final-3-0-4"
(or 3-0-5, etc) if/when the standard evolves. -->
<ns2:schPushOperatorAssignments
noNameSpaceSchemaLocation="0"
sourceport="0"
sourceip="0.0.0.0"
sourceapp="UTS"
schVersion="0"
created="2011-06-01T10:49:00-04:00"
xmlns:ns2="http://www.TCIP-Final-3-0-3"
xmlns:ns4="http://www.lrms-final-09-07-for-atis"
xmlns:ns3="http://www.lrms-final-09-07"
xmlns:ns5="http://www.atis-partial-03-00-74">
<push-header>
<!-- 3, the TCIP standard value for crew assignments -->
<file-type>operator assignments file</file-type>
<!-- The "service date" for which this data is effective (should always have 00:00:00 for the time
portion). -->
<effective>2011-06-01T00:00:00-04:00</effective>
<!-- A made up value, because this field is required -->
<source>0</source>
<!-- Since we are doing whole snapshots for now -->
<updates-only>false</updates-only>
<!-- The time at which this data was generated, spec requires this field. -->
<updates-thru>2011-06-01T10:49:00-04:00</updates-thru>
<!-- The time at which this data was generated, spec requires this field. -->
<time-sent>2011-06-01T10:49:00-04:00</time-sent>
</push-header>
<!-- The actual list of operator assignments -->
<assignments>
<!-- A single operator/run assignment. There will be many of these. -->
<assignment>
<run>
<!-- Hardcode to 0; numeric run-id's are required but silly -->
<run-id>0</run-id>
<!-- The complete "run route" + run number, concatenated with a '-' between. Leading zeros are
removed from the run number -->
<designator>S74-2</designator>
</run>
<metadata>
<!-- The "service date" of the run (should always have 00:00:00 for the time portion). -->
<effective>2011-06-01T10:00:00-04:00</effective>
<!-- The timestamp on the when this assignment was last modified in the database -->
<updated>2011-06-01T08:49:05-04:00</updated>
</metadata>
<operator>
<!-- Numeric portion of the operator's pass number -->
<operator-id>859007</operator-id>
<!-- ID of agency employing operator. NYCT = 2008, MTABC = 2118 -->
<agency-id>2008</agency-id>
<!-- Pass number, numeric only -->
<designator>859007</designator>
</operator>
<operator-base>
<!-- Always zero (0), because this field is required in TCIP spec but we will use textual
identifiers instead. -->
<facility-id>0</facility-id>
<!-- The text ID for the depot (e.g. CSLT for Castleton, JGLT for Jackie Gleason, etc) -->
<facility-name>CSLT</facility-name>
</operator-base>
<!-- TCIP spec requires this element but we're not using it, so just minimal extra boilerplate -->
<trips>
<trip>
<trip-id>0</trip-id>
</trip>
</trips>
<!-- TCIP spec requires this element but we're not using it, so just minimal extra boilerplate.
Unless we have a meaningful value in one of the already-used tables... -->
<run-type>255</run-type>
<!-- TCIP spec requires this element but we're not using it, so just minimal extra boilerplate.
Unless we have a meaningful value in one of the already-used tables... -->
<day-types>
<day-type>255</day-type>
</day-types>
<!-- TCIP permits extensions, which we had to use to slot in the "run route" that makes up the
complete run identification. -->
<localSCHOperatorAssignment>
<run-route>S56</run-route>
</localschoperatorassignment>
</assignment>
<!-- ... More <assignment> elements, one for each relevant crew assignment -->
</assignments>
</ns2:schpushoperatorassignments>