ResultList
Types
resultStatus
The result status of a competitor.
type resultStatus =
| @as("OK") Ok
| @as("Finished") Finished
| @as("MissingPunch") MissingPunch
| @as("Disqualified") Disqualified
| @as("DidNotFinish") DidNotFinish
| @as("Active") Active
| @as("Inactive") Inactive
| @as("OverTime") OverTime
| @as("SportingWithdrawal") SportingWithdrawal
| @as("NotCompeting") NotCompeting
| @as("Moved") Moved
| @as("MovedUp") MovedUp
| @as("DidNotStart") DidNotStart
| @as("DidNotEnter") DidNotEnter
| @as("Cancelled") CancelledConstructors:
OkFinishedMissingPunchDisqualifiedDidNotFinishActiveInactiveOverTimeSportingWithdrawalNotCompetingMovedMovedUpDidNotStartDidNotEnterCancelled
splitTimeStatus
The status of a split time.
type splitTimeStatus =
| @as("OK") SplitOk
| @as("Missing") Missing
| @as("Additional") AdditionalConstructors:
SplitOkMissingAdditional
resultListStatus
The completeness status of a result list.
type resultListStatus =
| @as("Complete") Complete
| @as("Delta") Delta
| @as("Snapshot") SnapshotConstructors:
CompleteDeltaSnapshot
splitTime
A split time at a single control during a race.
type splitTime = {
controlCode: string,
time: option<int>,
status: option<splitTimeStatus>,
}Fields:
controlCode:string— The control code at which the split time was registered.time:option<int>— The elapsed time in seconds from start to this control.status:option<splitTimeStatus>— The status of the split, e.g.Missingif the control was not punched.
personResultData
The core result data for a person in a single race.
See: PersonRaceResult in the IOF XML 3.0 XSD
type personResultData = {
startTime: option<string>,
finishTime: option<string>,
time: option<int>,
timeBehind: option<int>,
position: option<int>,
status: resultStatus,
splitTimes: array<splitTime>,
controlCard: option<string>,
raceNumber: option<int>,
bibNumber: option<string>,
}Fields:
startTime:option<string>— The start time of the person, as an ISO 8601 datetime.finishTime:option<string>— The finish time of the person, as an ISO 8601 datetime.time:option<int>— The total race time in seconds.timeBehind:option<int>— The time behind the winner in seconds.position:option<int>— The finishing position in the class.status:resultStatus— The result status of the person, e.g.Ok,MissingPunch,DidNotFinish,Disqualified,DidNotStart.splitTimes:array<splitTime>controlCard:option<string>— The control card number used, if included in the result.raceNumber:option<int>— The ordinal number of the race this result belongs to in a multi-race event.bibNumber:option<string>— The competitor's bib number.
personResult
Result information for a single person.
See: PersonResult in the IOF XML 3.0 XSD
type personResult = {
person: IofXml.IofPerson.t,
organisations: array<IofXml.IofOrganisation.t>,
controlCard: option<IofXml.IofControlCard.t>,
results: array<personResultData>,
entryId: option<string>,
}Fields:
person:IofXml.IofPerson.torganisations:array<IofXml.IofOrganisation.t>controlCard:option<IofXml.IofControlCard.t>results:array<personResultData>— All race results for this person (one per race in multi-race events).entryId:option<string>— Entry identifier, linking back to an entry list record.
teamMemberResult
Result data for a single team member in a relay race.
type teamMemberResult = {
person: IofXml.IofPerson.t,
organisations: array<IofXml.IofOrganisation.t>,
leg: option<int>,
legOrder: option<int>,
bibNumber: option<string>,
result: option<personResultData>,
}Fields:
person:IofXml.IofPerson.torganisations:array<IofXml.IofOrganisation.t>leg:option<int>— The leg number this team member ran.legOrder:option<int>— The leg order, for legs that can be run by multiple alternatives.bibNumber:option<string>— The bib number.result:option<personResultData>
teamResult
Result for a team in a relay class.
type teamResult = {
name: option<string>,
organisations: array<IofXml.IofOrganisation.t>,
bibNumber: option<string>,
result: option<personResultData>,
teamMemberResults: array<teamMemberResult>,
}Fields:
name:option<string>— The name of the team.organisations:array<IofXml.IofOrganisation.t>bibNumber:option<string>— The bib number for the team.result:option<personResultData>— The aggregate result for the team as a whole.teamMemberResults:array<teamMemberResult>— Results for individual team members.
classResult
The result list for a single class.
See: ClassResult in the IOF XML 3.0 XSD
type classResult = {
class_: IofXml.IofClass.t,
courses: array<IofXml.IofCourse.t>,
personResults: array<personResult>,
teamResults: array<teamResult>,
}Fields:
class_:IofXml.IofClass.tcourses:array<IofXml.IofCourse.t>— All courses for this class (one per race in multi-race events).personResults:array<personResult>teamResults:array<teamResult>
t
Result lists for all classes in an event.
See: ResultList in the IOF XML 3.0 XSD
type t = {
event: option<IofXml.IofEvent.t>,
classResults: array<classResult>,
status: option<resultListStatus>,
iofVersion: string,
createTime: option<string>,
creator: option<string>,
}Fields:
event:option<IofXml.IofEvent.t>classResults:array<classResult>status:option<resultListStatus>— The status of the result list:Complete(official final results),Snapshot(current standings mid-race), orDelta(changes since last list).iofVersion:string— The IOF XML version, should be"3.0"for version-3 documents.createTime:option<string>— The time the result list was created, as an ISO 8601 datetime.creator:option<string>— The name of the software that created the result list.
Values
parseResultStatus
let parseResultStatus: string => resultStatusparseSplitTimeStatus
let parseSplitTimeStatus: string => splitTimeStatusparseResultListStatus
let parseResultListStatus: string => resultListStatusresultStatusToString
let resultStatusToString: resultStatus => stringsplitTimeStatusToString
let splitTimeStatusToString: splitTimeStatus => stringresultListStatusToString
let resultListStatusToString: resultListStatus => stringparseSplitTime
let parseSplitTime: IofXml.XmlUtils.xmlElement => option<splitTime>parsePersonResultData
let parsePersonResultData: IofXml.XmlUtils.xmlElement => option<personResultData>parsePersonResult
let parsePersonResult: IofXml.XmlUtils.xmlElement => option<personResult>parseTeamMemberResult
let parseTeamMemberResult: IofXml.XmlUtils.xmlElement => option<teamMemberResult>parseTeamResult
let parseTeamResult: IofXml.XmlUtils.xmlElement => option<teamResult>parseClassResult
let parseClassResult: IofXml.XmlUtils.xmlElement => option<classResult>parse
Parse an IOF XML 3.0 ResultList document string into a typed structure.
let parse: string => result<t, string>serializeSplitTime
let serializeSplitTime: splitTime => stringserializePersonResultData
let serializePersonResultData: personResultData => stringserializePerson
let serializePerson: IofXml.IofPerson.t => stringserializeOrg
let serializeOrg: IofXml.IofOrganisation.t => stringserializePersonResult
let serializePersonResult: personResult => stringserializeCourse
let serializeCourse: IofXml.IofCourse.t => stringserializeTeamMemberResult
let serializeTeamMemberResult: teamMemberResult => stringserializeTeamResult
let serializeTeamResult: teamResult => stringserializeClassResult
let serializeClassResult: classResult => stringserializeEvent
let serializeEvent: IofXml.IofEvent.t => stringserialize
Serialize a ResultList structure to an IOF XML 3.0 document string.
let serialize: t => string