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.

  • Method Details

    • getId

      @NonNull public String getId()

      Gets the unique current identifier for a traffic incident.

      Returns:

      The unique current identifier for a traffic incident.

    • getOriginalId

      @NonNull public 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 using TrafficEngine.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 String getParentId()

      Gets the identifier of another incident to which this incident is linked.

      The value is null if 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 List<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.languageCode and TrafficIncidentLookupOptions.languageCode.

      Returns:

      The human readable summary of the incident.

    • getEntryTime

      @Nullable public Date getEntryTime()

      Gets the time the incident was entered into the system.

      The value is null if 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

      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.UNKNOWN if it hasn't been provided by the traffic incidents supplier.

      Specified by:
      getImpact in interface TrafficIncidentBase
      Returns:

      The impact of the incident.

    • getType

      @NonNull public TrafficIncidentType getType()

      Gets the category of the incident.

      The value is TrafficIncidentType.UNKNOWN if it hasn't been provided by the traffic incidents supplier.

      Specified by:
      getType in interface TrafficIncidentBase
      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 the TrafficEngine.

      Specified by:
      getDescription in interface TrafficIncidentBase
      Returns:

      The human readable description of the incident, possibly with location information.

    • getStartTime

      @Nullable public Date getStartTime()

      Gets the time from which the incident is valid, before this time the incident should not be considered.

      The value is null if it hasn't been provided by the traffic incidents supplier.

      Specified by:
      getStartTime in interface TrafficIncidentBase
      Returns:

      The time from which the incident is valid, before this time the incident should not be considered.

    • getEndTime

      @Nullable public Date getEndTime()

      Get the time until which the incident is valid, after this time the incident should not be considered.

      The value is null if it hasn't been provided by the traffic incidents supplier.

      Specified by:
      getEndTime in interface TrafficIncidentBase
      Returns:

      The time until which the incident is valid, after this time the incident should not be considered.