Class OSMTemporalAccessParser
java.lang.Object
com.graphhopper.routing.util.parsers.OSMTemporalAccessParser
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionOSMTemporalAccessParser(Collection<String> conditionals, OSMTemporalAccessParser.Setter restrictionSetter, String dateRangeParserDate) -
Method Summary
Modifier and TypeMethodDescriptiongetTemporaryAccess(Map<String, Object> tags) voidhandleWayTags(int edgeId, EdgeIntAccess edgeIntAccess, ReaderWay way, IntsRef relationFlags) static booleanhasPermissiveTemporalRestriction(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.
-
Constructor Details
-
OSMTemporalAccessParser
public OSMTemporalAccessParser(Collection<String> conditionals, OSMTemporalAccessParser.Setter restrictionSetter, String dateRangeParserDate)
-
-
Method Details
-
handleWayTags
public void handleWayTags(int edgeId, EdgeIntAccess edgeIntAccess, ReaderWay way, IntsRef relationFlags) - Specified by:
handleWayTagsin interfaceTagParser
-
getTemporaryAccess
-
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).
-