TrafficIncident (API Reference)
Class TrafficIncident
- All Implemented Interfaces:
TrafficIncidentBase
TrafficIncident provides details about a traffic incident.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe vehicle categories that can be restricted.static final classThe vehicle restriction representing a vehicle category and relevant restriction rules. -
Method Summary
Modifier and TypeMethodDescriptiongetCodes()Gets the list of standardized codes as categorized in ISO 14819-2:2013 standard for this incident category.Gets the human readable description of the incident, possibly with location information.Get the time until which the incident is valid, after this time the incident should not be considered.Gets the time the incident was entered into the system.getId()Gets the unique current identifier for a traffic incident.Gets the impact of the incident.Gets the traversability of junctions along the affected road.Gets the location of the incident.Gets the unique identifier of the first traffic incident.Gets the identifier of another incident to which this incident is linked.Gets the time from which the incident is valid, before this time the incident should not be considered.Gets the human readable summary of the incident.getType()Gets the category of the incident.Gets the map of restricted vehicle categories to restrictions.booleanGets the flag indicating whether road is closed or not.
-
Method Details
-
getId
Gets the unique current identifier for a traffic incident.
- Returns:
The unique current identifier for a traffic incident.
-
getOriginalId
Gets the unique identifier of the first traffic incident.
The original id remains the same whenever the traffic incident is updated and
getId()is changed. Once an incident chain has been created, this value will never change. The traffic incident an be looked up by original id usingTrafficEngine.lookupIncident(java.lang.String, com.here.sdk.traffic.TrafficIncidentLookupOptions, com.here.sdk.traffic.TrafficIncidentLookupCallback).- Returns:
The unique identifier of the first traffic incident.
-
getParentId
Gets the identifier of another incident to which this incident is linked.
The value is
nullif the incident doesn't have a parent.- Returns:
The identifier of another incident to which this incident is linked.
-
getJunctionsTraversability
Gets the traversability of junctions along the affected road.
- Returns:
The traversability of junctions along the affected road.
-
isRoadClosed
public boolean isRoadClosed()Gets the flag indicating whether road is closed or not.
- Returns:
The flag indicates whether road is closed or not.
-
getCodes
Gets the list of standardized codes as categorized in ISO 14819-2:2013 standard for this incident category.
Codes are given in order of importance, so the first item in the list is considered the primary cause of the incident.
- Returns:
The list of standardized codes as categorized in ISO 14819-2:2013 standard for this incident category.
-
getSummary
Gets the human readable summary of the incident.
The summary field provides a short version of the description containing no location information. The expected summary language can be managed via
TrafficIncidentsQueryOptions.languageCodeandTrafficIncidentLookupOptions.languageCode.- Returns:
The human readable summary of the incident.
-
getEntryTime
Gets the time the incident was entered into the system.
The value is
nullif it hasn't been provided by the traffic incidents supplier.- Returns:
The time the incident was entered into the system.
-
getLocation
Gets the location of the incident.
- Returns:
The location of the incident.
-
getVehicleRestrictions
@NonNull public Map<TrafficIncident.RestrictedVehicleCategory,TrafficIncident.VehicleRestriction> getVehicleRestrictions()Gets the map of restricted vehicle categories to restrictions.
A vehicle is restricted if at least one restriction field is applicable for it. If the map is empty, there're no restricted vehicles for the incident.
- Returns:
The map of restricted vehicle categories to restrictions.
-
getImpact
Gets the impact of the incident.
The value is
TrafficIncidentImpact.UNKNOWNif it hasn't been provided by the traffic incidents supplier.- Specified by:
getImpactin interfaceTrafficIncidentBase- Returns:
The impact of the incident.
-
getType
Gets the category of the incident.
The value is
TrafficIncidentType.UNKNOWNif it hasn't been provided by the traffic incidents supplier.- Specified by:
getTypein interfaceTrafficIncidentBase- Returns:
The category of the incident.
-
getDescription
Gets the human readable description of the incident, possibly with location information.
The description is currently not present in our map data. Therefore, when accessing the data from a picked carto POI via
TrafficIncidentResult, then always an empty string is returned. This does not apply when using theTrafficEngine.- Specified by:
getDescriptionin interfaceTrafficIncidentBase- Returns:
The human readable description of the incident, possibly with location information.
-
getStartTime
Gets the time from which the incident is valid, before this time the incident should not be considered.
The value is
nullif it hasn't been provided by the traffic incidents supplier.- Specified by:
getStartTimein interfaceTrafficIncidentBase- Returns:
The time from which the incident is valid, before this time the incident should not be considered.
-
getEndTime
Get the time until which the incident is valid, after this time the incident should not be considered.
The value is
nullif it hasn't been provided by the traffic incidents supplier.- Specified by:
getEndTimein interfaceTrafficIncidentBase- Returns:
The time until which the incident is valid, after this time the incident should not be considered.
-