Class OSMTemporalAccessParser

java.lang.Object
com.graphhopper.routing.util.parsers.OSMTemporalAccessParser
All Implemented Interfaces:
TagParser

public class OSMTemporalAccessParser extends Object implements TagParser
This parser fills the different XYTemporalAccess enums from the OSM conditional restrictions based on the specified dateRangeParserDate. 'Temporal' means that both, temporary and seasonal restrictions will be considered. Node tags will be ignored for now.
  • Constructor Details

  • Method Details

    • handleWayTags

      public void handleWayTags(int edgeId, EdgeIntAccess edgeIntAccess, ReaderWay way, IntsRef relationFlags)
      Specified by:
      handleWayTags in interface TagParser
    • getTemporaryAccess

      public Boolean getTemporaryAccess(Map<String,Object> tags)
    • hasPermissiveTemporalRestriction

      public static boolean hasPermissiveTemporalRestriction(ReaderWay way, int firstIndex, List<String> restrictionKeys, Collection<String> accepted)
      This method checks the conditional restrictions starting from firstIndex and returns true if the access value is in the "accepted" collection AND the conditional value describes a time (e.g. date, time or interval).