Class TrafficIncident
Class TrafficIncident
- java.lang.Object
-
- com.here.NativeBase
-
- com.here.sdk.traffic.TrafficIncident
-
- All Implemented Interfaces:
TrafficIncidentBase
public final class TrafficIncident extends NativeBase implements TrafficIncidentBase
TrafficIncident provides details about a traffic incident.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTrafficIncident.RestrictedVehicleCategoryThe vehicle categories that can be restricted.static classTrafficIncident.VehicleRestrictionThe vehicle restriction representing a vehicle category and relevant restriction rules.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Integer>getCodes()Gets the list of standardized codes as categorized in ISO 14819-2:2013 standard for this incident category.LocalizedTextgetDescription()Gets the human readable description of the incident, possibly with location information.java.util.DategetEndTime()Get the time until which the incident is valid, after this time the incident should not be considered.java.util.DategetEntryTime()Gets the time the incident was entered into the system.java.lang.StringgetId()Gets the unique current identifier for a traffic incident.TrafficIncidentImpactgetImpact()Gets the impact of the incident.JunctionsTraversabilitygetJunctionsTraversability()Gets the traversability of junctions along the affected road.TrafficLocationgetLocation()Gets the location of the incident.java.lang.StringgetOriginalId()Gets the unique identifier of the first traffic incident.java.lang.StringgetParentId()Gets the identifier of another incident to which this incident is linked.java.util.DategetStartTime()Gets the time from which the incident is valid, before this time the incident should not be considered.LocalizedTextgetSummary()Gets the human readable summary of the incident.TrafficIncidentTypegetType()Gets the category of the incident.java.util.Map<TrafficIncident.RestrictedVehicleCategory,TrafficIncident.VehicleRestriction>getVehicleRestrictions()Gets the map of restricted vehicle categories to restrictions.booleanisRoadClosed()Gets the flag indicating whether road is closed or not.
-
-
-
Method Detail
-
getId
@NonNull public java.lang.String getId()
Gets the unique current identifier for a traffic incident.
- Returns:
The unique current identifier for a traffic incident.
-
getOriginalId
@NonNull public java.lang.String 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
@Nullable public java.lang.String 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
@NonNull public JunctionsTraversability 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
@NonNull public java.util.List<java.lang.Integer> 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
@NonNull public LocalizedText 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
@Nullable public java.util.Date 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
@NonNull public TrafficLocation getLocation()
Gets the location of the incident.
- Returns:
The location of the incident.
-
getVehicleRestrictions
@NonNull public java.util.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
@NonNull public TrafficIncidentImpact 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
@NonNull public TrafficIncidentType 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
@NonNull public LocalizedText 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
@Nullable public java.util.Date 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
@Nullable public java.util.Date 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.
-
-