response;
if (request.isDynamicSearch()) {
- response = new RangeRaptorDynamicSearch<>(config, transitData, request).route();
+ response =
+ new RangeRaptorDynamicSearch<>(config, transitData, extraMcSearch, request).route();
} else {
response = routeUsingStdWorker(transitData, request);
}
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/debug/DebugEvent.java b/application/src/main/java/org/opentripplanner/raptor/api/debug/DebugEvent.java
index 7162a4a6641..a69e977efe3 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/debug/DebugEvent.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/debug/DebugEvent.java
@@ -1,6 +1,6 @@
package org.opentripplanner.raptor.api.debug;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Debug events hold information about an internal event in the Raptor Algorithm. The element may be
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/model/GeneralizedCostRelaxFunction.java b/application/src/main/java/org/opentripplanner/raptor/api/model/GeneralizedCostRelaxFunction.java
index 0335e962d98..0038a8e2681 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/model/GeneralizedCostRelaxFunction.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/model/GeneralizedCostRelaxFunction.java
@@ -3,8 +3,8 @@
import java.time.Duration;
import java.util.Locale;
import java.util.Objects;
-import org.opentripplanner.framework.lang.IntUtils;
-import org.opentripplanner.framework.lang.OtpNumberFormat;
+import org.opentripplanner.utils.lang.IntUtils;
+import org.opentripplanner.utils.lang.OtpNumberFormat;
/**
* This relax-function is used to relax increasing values by:
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/model/RaptorAccessEgress.java b/application/src/main/java/org/opentripplanner/raptor/api/model/RaptorAccessEgress.java
index 3a7f48cf743..f970254dcc8 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/model/RaptorAccessEgress.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/model/RaptorAccessEgress.java
@@ -4,8 +4,8 @@
import java.time.temporal.ChronoUnit;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* Encapsulate information about an access or egress path. We do not distinguish between
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/model/RaptorTransfer.java b/application/src/main/java/org/opentripplanner/raptor/api/model/RaptorTransfer.java
index 856d6828b30..477c785eaa4 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/model/RaptorTransfer.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/model/RaptorTransfer.java
@@ -1,6 +1,6 @@
package org.opentripplanner.raptor.api.model;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* Encapsulate information about a transfer path.
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/path/PathLeg.java b/application/src/main/java/org/opentripplanner/raptor/api/path/PathLeg.java
index 35a351a4d77..20ffdbae34a 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/path/PathLeg.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/path/PathLeg.java
@@ -4,9 +4,9 @@
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* A leg in a Raptor path. The legs are linked together from the first leg {@link AccessPathLeg}, to
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/path/PathStringBuilder.java b/application/src/main/java/org/opentripplanner/raptor/api/path/PathStringBuilder.java
index da56474ae02..cefba73f41f 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/path/PathStringBuilder.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/path/PathStringBuilder.java
@@ -3,13 +3,13 @@
import java.time.ZonedDateTime;
import java.util.function.Consumer;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorStopNameResolver;
import org.opentripplanner.raptor.api.model.RaptorValueFormatter;
import org.opentripplanner.raptor.spi.RaptorCostCalculator;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* Create a path like: {@code Walk 5m - 101 - Transit 10:07 10:35 - 2111 - Walk 4m }
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/request/DebugRequest.java b/application/src/main/java/org/opentripplanner/raptor/api/request/DebugRequest.java
index 876175bae6e..91144d86917 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/request/DebugRequest.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/request/DebugRequest.java
@@ -3,12 +3,12 @@
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.debug.DebugEvent;
import org.opentripplanner.raptor.api.debug.DebugLogger;
import org.opentripplanner.raptor.api.path.RaptorPath;
import org.opentripplanner.raptor.api.view.ArrivalView;
import org.opentripplanner.raptor.api.view.PatternRideView;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This class configure the amount of debugging you want for your request. Debugging is supported by
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/request/DynamicSearchWindowCoefficients.java b/application/src/main/java/org/opentripplanner/raptor/api/request/DynamicSearchWindowCoefficients.java
index 27ebb62c870..4cc74c34c66 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/request/DynamicSearchWindowCoefficients.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/request/DynamicSearchWindowCoefficients.java
@@ -60,11 +60,10 @@ default Duration minWindow() {
/**
* Set an upper limit to the calculation of the dynamic search window to prevent exceptionable
- * cases to cause very long search windows. Long search windows consumes a lot of resources and
+ * cases to cause very long search windows. Long search windows consume a lot of resources and
* may take a long time. Use this parameter to tune the desired maximum search time.
*
- * This is the parameter that affect the response time most, the downside is that a search is only
- * guaranteed to be pareto-optimal within a search-window.
+ * This is the parameter that affects the response time the most.
*
* The default is 3 hours. The unit is minutes.
*/
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/request/MultiCriteriaRequest.java b/application/src/main/java/org/opentripplanner/raptor/api/request/MultiCriteriaRequest.java
index 683c9807af5..7f0da11b558 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/request/MultiCriteriaRequest.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/request/MultiCriteriaRequest.java
@@ -4,9 +4,9 @@
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.model.RelaxFunction;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Parameters to configure the multi-criteria search.
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/request/PassThroughPoint.java b/application/src/main/java/org/opentripplanner/raptor/api/request/PassThroughPoint.java
index 187436907fe..7c529343b32 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/request/PassThroughPoint.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/request/PassThroughPoint.java
@@ -6,7 +6,7 @@
import java.util.function.IntFunction;
import java.util.stream.IntStream;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.lang.StringUtils;
+import org.opentripplanner.utils.lang.StringUtils;
/**
* A collection of stop indexes used to define a pass through-point.
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorRequest.java b/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorRequest.java
index 010bff4bc08..3c27f5478c8 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorRequest.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorRequest.java
@@ -4,10 +4,10 @@
import java.util.Collections;
import java.util.Objects;
import java.util.Set;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.debug.RaptorTimers;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.model.SearchDirection;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorViaConnection.java b/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorViaConnection.java
index 45dc5394188..a8359e6c5fa 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorViaConnection.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorViaConnection.java
@@ -2,10 +2,10 @@
import java.util.Objects;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorStopNameResolver;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* A via-connection is used to define one of the physical locations in a via location Raptor must
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorViaLocation.java b/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorViaLocation.java
index ae7ea19d20d..fbaae6dabdc 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorViaLocation.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/request/RaptorViaLocation.java
@@ -5,11 +5,11 @@
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.lang.IntUtils;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorStopNameResolver;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
+import org.opentripplanner.utils.lang.IntUtils;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* Defines a via location which Raptor will force the path through. The concrete location is
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/request/SearchParams.java b/application/src/main/java/org/opentripplanner/raptor/api/request/SearchParams.java
index 6ba51319a29..d43d0f11ab6 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/request/SearchParams.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/request/SearchParams.java
@@ -5,10 +5,10 @@
import java.util.Collection;
import java.util.List;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The responsibility of this class is to encapsulate a Range Raptor travel request search
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/request/SearchParamsBuilder.java b/application/src/main/java/org/opentripplanner/raptor/api/request/SearchParamsBuilder.java
index 7db4ce5d0f7..cdb7146e814 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/request/SearchParamsBuilder.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/request/SearchParamsBuilder.java
@@ -5,10 +5,10 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Mutable version of {@link SearchParams}.
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/response/RaptorResponse.java b/application/src/main/java/org/opentripplanner/raptor/api/response/RaptorResponse.java
index 82c0c06d0cd..5b0f1885a85 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/response/RaptorResponse.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/response/RaptorResponse.java
@@ -1,11 +1,11 @@
package org.opentripplanner.raptor.api.response;
import java.util.Collection;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.RaptorService;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.path.RaptorPath;
import org.opentripplanner.raptor.api.request.RaptorRequest;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This is the result of a raptor search including the result paths, the original request
diff --git a/application/src/main/java/org/opentripplanner/raptor/api/view/ArrivalView.java b/application/src/main/java/org/opentripplanner/raptor/api/view/ArrivalView.java
index 2dffbbe5733..83e46f2d78f 100644
--- a/application/src/main/java/org/opentripplanner/raptor/api/view/ArrivalView.java
+++ b/application/src/main/java/org/opentripplanner/raptor/api/view/ArrivalView.java
@@ -2,7 +2,6 @@
import java.util.function.IntFunction;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.PathLegType;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
@@ -10,6 +9,7 @@
import org.opentripplanner.raptor.api.model.RaptorValueFormatter;
import org.opentripplanner.raptor.api.model.TransitArrival;
import org.opentripplanner.raptor.spi.RaptorCostCalculator;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* The purpose of the stop-arrival-view is to provide a common interface for stop-arrivals for
diff --git a/application/src/main/java/org/opentripplanner/raptor/configure/RaptorConfig.java b/application/src/main/java/org/opentripplanner/raptor/configure/RaptorConfig.java
index 380f9fe3ba5..ed10d0d715c 100644
--- a/application/src/main/java/org/opentripplanner/raptor/configure/RaptorConfig.java
+++ b/application/src/main/java/org/opentripplanner/raptor/configure/RaptorConfig.java
@@ -1,10 +1,12 @@
package org.opentripplanner.raptor.configure;
import java.util.concurrent.ExecutorService;
+import javax.annotation.Nullable;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.request.RaptorEnvironment;
import org.opentripplanner.raptor.api.request.RaptorRequest;
import org.opentripplanner.raptor.api.request.RaptorTuningParameters;
+import org.opentripplanner.raptor.rangeraptor.ConcurrentCompositeRaptorRouter;
import org.opentripplanner.raptor.rangeraptor.DefaultRangeRaptorWorker;
import org.opentripplanner.raptor.rangeraptor.RangeRaptor;
import org.opentripplanner.raptor.rangeraptor.RangeRaptorWorkerComposite;
@@ -13,6 +15,7 @@
import org.opentripplanner.raptor.rangeraptor.internalapi.Heuristics;
import org.opentripplanner.raptor.rangeraptor.internalapi.PassThroughPointsService;
import org.opentripplanner.raptor.rangeraptor.internalapi.RangeRaptorWorker;
+import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouter;
import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult;
import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerState;
import org.opentripplanner.raptor.rangeraptor.internalapi.RoutingStrategy;
@@ -20,6 +23,7 @@
import org.opentripplanner.raptor.rangeraptor.multicriteria.configure.McRangeRaptorConfig;
import org.opentripplanner.raptor.rangeraptor.standard.configure.StdRangeRaptorConfig;
import org.opentripplanner.raptor.rangeraptor.transit.RaptorSearchWindowCalculator;
+import org.opentripplanner.raptor.spi.ExtraMcRouterSearch;
import org.opentripplanner.raptor.spi.RaptorTransitDataProvider;
/**
@@ -56,19 +60,41 @@ public SearchContext context(RaptorTransitDataProvider transit, RaptorRequ
return SearchContext.of(request, tuningParameters, transit, acceptC2AtDestination).build();
}
- public RangeRaptor createRangeRaptorWithStdWorker(
+ public RaptorRouter createRangeRaptorWithStdWorker(
RaptorTransitDataProvider transitData,
RaptorRequest request
) {
var context = context(transitData, request);
var stdConfig = new StdRangeRaptorConfig<>(context);
- return createRangeRaptor(
- context,
- createWorker(context.legs().getFirst(), stdConfig.state(), stdConfig.strategy())
+ var worker = createWorker(context.legs().getFirst(), stdConfig.state(), stdConfig.strategy());
+ return createRangeRaptor(context, worker);
+ }
+
+ public RaptorRouter createRangeRaptorWithMcWorker(
+ RaptorTransitDataProvider transitData,
+ RaptorRequest request,
+ Heuristics heuristics,
+ @Nullable ExtraMcRouterSearch extraMcSearch
+ ) {
+ var mainSearch = createRangeRaptorWithMcWorker(transitData, request, heuristics);
+
+ if (extraMcSearch == null) {
+ return mainSearch;
+ }
+ var alternativeSearch = createRangeRaptorWithMcWorker(
+ extraMcSearch.createTransitDataAlternativeSearch(transitData),
+ request,
+ heuristics
+ );
+ return new ConcurrentCompositeRaptorRouter<>(
+ mainSearch,
+ alternativeSearch,
+ extraMcSearch.merger(),
+ threadPool()
);
}
- public RangeRaptor createRangeRaptorWithMcWorker(
+ private RaptorRouter createRangeRaptorWithMcWorker(
RaptorTransitDataProvider transitData,
RaptorRequest request,
Heuristics heuristics
@@ -91,11 +117,10 @@ public RangeRaptor createRangeRaptorWithMcWorker(
var c = new McRangeRaptorConfig<>(leg, passThroughPointsService).withHeuristics(heuristics);
worker = createWorker(leg, c.state(), c.strategy());
}
-
return createRangeRaptor(context, worker);
}
- public RangeRaptor createRangeRaptorWithHeuristicSearch(
+ public RaptorRouter createRangeRaptorWithHeuristicSearch(
RaptorTransitDataProvider transitData,
RaptorRequest request
) {
@@ -115,6 +140,7 @@ public boolean isMultiThreaded() {
return threadPool() != null;
}
+ @Nullable
public ExecutorService threadPool() {
return environment.threadPool();
}
@@ -148,7 +174,7 @@ private RangeRaptorWorker createWorker(
return new DefaultRangeRaptorWorker<>(
workerState,
routingStrategy,
- ctx.transit(),
+ ctx.transitData(),
ctx.slackProvider(),
ctxLeg.accessPaths(),
ctx.calculator(),
@@ -158,10 +184,10 @@ private RangeRaptorWorker createWorker(
);
}
- private RangeRaptor createRangeRaptor(SearchContext ctx, RangeRaptorWorker worker) {
+ private RaptorRouter createRangeRaptor(SearchContext ctx, RangeRaptorWorker worker) {
return new RangeRaptor<>(
worker,
- ctx.transit(),
+ ctx.transitData(),
ctx.legs().getFirst().accessPaths(),
ctx.roundTracker(),
ctx.calculator(),
diff --git a/application/src/main/java/org/opentripplanner/raptor/path/PathBuilderLeg.java b/application/src/main/java/org/opentripplanner/raptor/path/PathBuilderLeg.java
index 335d38203b1..eb80b36316b 100644
--- a/application/src/main/java/org/opentripplanner/raptor/path/PathBuilderLeg.java
+++ b/application/src/main/java/org/opentripplanner/raptor/path/PathBuilderLeg.java
@@ -2,7 +2,6 @@
import java.util.function.Predicate;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorConstrainedTransfer;
@@ -22,6 +21,7 @@
import org.opentripplanner.raptor.spi.BoardAndAlightTime;
import org.opentripplanner.raptor.spi.RaptorCostCalculator;
import org.opentripplanner.raptor.spi.RaptorSlackProvider;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This is the leg implementation for the {@link PathBuilder}. It helps to cache and calculate
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/CompositeResult.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/CompositeResult.java
new file mode 100644
index 00000000000..e72c4731cc5
--- /dev/null
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/CompositeResult.java
@@ -0,0 +1,62 @@
+package org.opentripplanner.raptor.rangeraptor;
+
+import java.util.Collection;
+import java.util.function.BiFunction;
+import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.raptor.api.path.RaptorPath;
+import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult;
+import org.opentripplanner.raptor.rangeraptor.internalapi.SingleCriteriaStopArrivals;
+
+/**
+ * Join two results together.
+ *
+ * - Everything from the first result is added
+ * - The result is merged with the injected merge strategy.
+ * - Some of the methods ONLY return the result of the main search!
+ *
+ */
+class CompositeResult implements RaptorRouterResult {
+
+ private static final String UNSUPPORTED_OPERATION =
+ "Merging all stop arrivals will be a complicated and memory intensive process, unless we need this this should not be done.";
+ private final Collection> result;
+
+ CompositeResult(
+ RaptorRouterResult mainResult,
+ RaptorRouterResult alternativeResult,
+ BiFunction>, Collection>, Collection>> merger
+ ) {
+ this.result = merger.apply(mainResult.extractPaths(), alternativeResult.extractPaths());
+ }
+
+ /**
+ * Return the merged result.
+ */
+ @Override
+ public Collection> extractPaths() {
+ return result;
+ }
+
+ @Override
+ public SingleCriteriaStopArrivals extractBestOverallArrivals() {
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION);
+ }
+
+ @Override
+ public SingleCriteriaStopArrivals extractBestTransitArrivals() {
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION);
+ }
+
+ @Override
+ public SingleCriteriaStopArrivals extractBestNumberOfTransfers() {
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION);
+ }
+
+ /**
+ * Return true if either the main or the alternative search has reached the destination.
+ */
+ @Override
+ public boolean isDestinationReached() {
+ return !result.isEmpty();
+ }
+}
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/ConcurrentCompositeRaptorRouter.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/ConcurrentCompositeRaptorRouter.java
new file mode 100644
index 00000000000..a4ddf36347f
--- /dev/null
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/ConcurrentCompositeRaptorRouter.java
@@ -0,0 +1,67 @@
+package org.opentripplanner.raptor.rangeraptor;
+
+import java.util.Collection;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.function.BiFunction;
+import javax.annotation.Nullable;
+import org.opentripplanner.framework.application.OTPRequestTimeoutException;
+import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.raptor.api.path.RaptorPath;
+import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouter;
+import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult;
+
+/**
+ * Run two Raptor routers and join the result. The two searches are run concurrently if an
+ * {@link ExecutorService} is provided.
+ * @see CompositeResult for joining results.
+ */
+public class ConcurrentCompositeRaptorRouter
+ implements RaptorRouter {
+
+ private final RaptorRouter mainWorker;
+ private final RaptorRouter alternativeWorker;
+ private final BiFunction>, Collection>, Collection>> merger;
+
+ @Nullable
+ private final ExecutorService executorService;
+
+ public ConcurrentCompositeRaptorRouter(
+ RaptorRouter mainWorker,
+ RaptorRouter alternativeWorker,
+ BiFunction>, Collection>, Collection>> merger,
+ @Nullable ExecutorService executorService
+ ) {
+ this.mainWorker = mainWorker;
+ this.alternativeWorker = alternativeWorker;
+ this.merger = merger;
+ this.executorService = executorService;
+ }
+
+ @Override
+ public RaptorRouterResult route() {
+ if (executorService == null) {
+ var mainResult = mainWorker.route();
+ var alternativeResult = alternativeWorker.route();
+ return new CompositeResult<>(mainResult, alternativeResult, merger);
+ }
+
+ var mainResultFuture = executorService.submit(mainWorker::route);
+ var alternativeResultFuture = executorService.submit(alternativeWorker::route);
+
+ try {
+ var mainResult = mainResultFuture.get();
+ var alternativeResult = alternativeResultFuture.get();
+ return new CompositeResult<>(mainResult, alternativeResult, merger);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ // propagate interruption to the running task.
+
+ mainResultFuture.cancel(true);
+ alternativeResultFuture.cancel(true);
+ throw new OTPRequestTimeoutException();
+ } catch (ExecutionException e) {
+ throw (e.getCause() instanceof RuntimeException re) ? re : new RuntimeException(e);
+ }
+ }
+}
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/SystemErrDebugLogger.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/SystemErrDebugLogger.java
index 951721f81a7..c80d226afc7 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/SystemErrDebugLogger.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/SystemErrDebugLogger.java
@@ -1,22 +1,17 @@
package org.opentripplanner.raptor.rangeraptor;
-import static org.opentripplanner.framework.text.Table.Align.Center;
-import static org.opentripplanner.framework.text.Table.Align.Left;
-import static org.opentripplanner.framework.text.Table.Align.Right;
-import static org.opentripplanner.framework.time.TimeUtils.timeToStrCompact;
-import static org.opentripplanner.framework.time.TimeUtils.timeToStrLong;
import static org.opentripplanner.raptor.api.model.PathLegType.ACCESS;
import static org.opentripplanner.raptor.api.model.PathLegType.TRANSIT;
+import static org.opentripplanner.utils.text.Table.Align.Center;
+import static org.opentripplanner.utils.text.Table.Align.Left;
+import static org.opentripplanner.utils.text.Table.Align.Right;
+import static org.opentripplanner.utils.time.TimeUtils.timeToStrCompact;
+import static org.opentripplanner.utils.time.TimeUtils.timeToStrLong;
import java.text.NumberFormat;
import java.util.Locale;
import java.util.function.Consumer;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.lang.IntUtils;
-import org.opentripplanner.framework.lang.OtpNumberFormat;
-import org.opentripplanner.framework.lang.StringUtils;
-import org.opentripplanner.framework.text.Table;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor.api.debug.DebugEvent;
import org.opentripplanner.raptor.api.debug.DebugLogger;
import org.opentripplanner.raptor.api.debug.DebugTopic;
@@ -26,6 +21,11 @@
import org.opentripplanner.raptor.api.view.ArrivalView;
import org.opentripplanner.raptor.api.view.PatternRideView;
import org.opentripplanner.raptor.rangeraptor.transit.TripTimesSearch;
+import org.opentripplanner.utils.lang.IntUtils;
+import org.opentripplanner.utils.lang.OtpNumberFormat;
+import org.opentripplanner.utils.lang.StringUtils;
+import org.opentripplanner.utils.text.Table;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* A debug logger which can be plugged into Raptor to do debug logging to standard error. This is
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/context/SearchContext.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/context/SearchContext.java
index e322881d786..e197bad8461 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/context/SearchContext.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/context/SearchContext.java
@@ -59,7 +59,7 @@ public class SearchContext {
/**
* the transit data role needed for routing
*/
- protected final RaptorTransitDataProvider transit;
+ protected final RaptorTransitDataProvider transitData;
private final RaptorTransitCalculator calculator;
private final RaptorTuningParameters tuningParameters;
@@ -75,10 +75,10 @@ public class SearchContext {
/** Lazy initialized */
private RaptorCostCalculator costCalculator = null;
- public SearchContext(
+ SearchContext(
RaptorRequest request,
RaptorTuningParameters tuningParameters,
- RaptorTransitDataProvider transit,
+ RaptorTransitDataProvider transitData,
AccessPaths accessPaths,
List viaConnections,
EgressPaths egressPaths,
@@ -86,7 +86,7 @@ public SearchContext(
) {
this.request = request;
this.tuningParameters = tuningParameters;
- this.transit = transit;
+ this.transitData = transitData;
this.calculator = createCalculator(request, tuningParameters);
this.roundTracker =
@@ -133,8 +133,8 @@ public MultiCriteriaRequest multiCriteria() {
return request.multiCriteria();
}
- public RaptorTransitDataProvider transit() {
- return transit;
+ public RaptorTransitDataProvider transitData() {
+ return transitData;
}
public RaptorTransitCalculator calculator() {
@@ -150,7 +150,7 @@ public SlackProvider slackProvider() {
}
public RaptorSlackProvider raptorSlackProvider() {
- return transit.slackProvider();
+ return transitData.slackProvider();
}
/**
@@ -167,7 +167,7 @@ public ToIntFunction boardSlackProvider() {
@Nullable
public RaptorCostCalculator costCalculator() {
if (costCalculator == null) {
- this.costCalculator = transit.multiCriteriaCostCalculator();
+ this.costCalculator = transitData.multiCriteriaCostCalculator();
}
return costCalculator;
}
@@ -187,7 +187,7 @@ public IntPredicate acceptC2AtDestination() {
/** Number of stops in transit graph. */
public int nStops() {
- return transit.numberOfStops();
+ return transitData.numberOfStops();
}
/** Calculate the maximum number of rounds to perform. */
@@ -224,7 +224,7 @@ public boolean useConstrainedTransfers() {
/* private methods */
public RaptorStopNameResolver stopNameResolver() {
- return transit.stopNameResolver();
+ return transitData.stopNameResolver();
}
public TimeBasedBoardingSupport createTimeBasedBoardingSupport() {
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/HeuristicAtStop.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/HeuristicAtStop.java
index b58d773969c..da07c643fb6 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/HeuristicAtStop.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/HeuristicAtStop.java
@@ -1,8 +1,8 @@
package org.opentripplanner.raptor.rangeraptor.internalapi;
-import org.opentripplanner.framework.lang.OtpNumberFormat;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor.api.model.RaptorConstants;
+import org.opentripplanner.utils.lang.OtpNumberFormat;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* Heuristic data for a given stop.
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c1/PatternRideC1.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c1/PatternRideC1.java
index cbb3fbfadf3..fd669e40ffc 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c1/PatternRideC1.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c1/PatternRideC1.java
@@ -1,12 +1,12 @@
package org.opentripplanner.raptor.rangeraptor.multicriteria.ride.c1;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.rangeraptor.multicriteria.arrivals.McStopArrival;
import org.opentripplanner.raptor.rangeraptor.multicriteria.ride.PatternRide;
import org.opentripplanner.raptor.rangeraptor.multicriteria.ride.PatternRideFactory;
import org.opentripplanner.raptor.spi.RaptorCostCalculator;
import org.opentripplanner.raptor.util.paretoset.ParetoComparator;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* A {@link PatternRide} with support for c1 {@code generalized-cost}.
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c2/PassThroughRideFactory.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c2/PassThroughRideFactory.java
index 6120ae9d698..734766666c5 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c2/PassThroughRideFactory.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c2/PassThroughRideFactory.java
@@ -1,10 +1,10 @@
package org.opentripplanner.raptor.rangeraptor.multicriteria.ride.c2;
-import org.opentripplanner.framework.lang.IntBox;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.rangeraptor.internalapi.PassThroughPointsService;
import org.opentripplanner.raptor.rangeraptor.multicriteria.arrivals.McStopArrival;
import org.opentripplanner.raptor.rangeraptor.multicriteria.ride.PatternRideFactory;
+import org.opentripplanner.utils.lang.IntBox;
public class PassThroughRideFactory
implements PatternRideFactory> {
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c2/PatternRideC2.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c2/PatternRideC2.java
index d02bef207c2..a23999f1813 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c2/PatternRideC2.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/ride/c2/PatternRideC2.java
@@ -1,11 +1,11 @@
package org.opentripplanner.raptor.rangeraptor.multicriteria.ride.c2;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.DominanceFunction;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.rangeraptor.multicriteria.arrivals.McStopArrival;
import org.opentripplanner.raptor.rangeraptor.multicriteria.ride.PatternRide;
import org.opentripplanner.raptor.util.paretoset.ParetoComparator;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* A {@link PatternRide} with support for c1 {@code generalized-cost} and c2 (custom-use-case-cost).
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/path/DestinationArrivalPaths.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/path/DestinationArrivalPaths.java
index 78dc7da4967..2f257e52645 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/path/DestinationArrivalPaths.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/path/DestinationArrivalPaths.java
@@ -5,8 +5,6 @@
import java.util.Optional;
import java.util.function.IntPredicate;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.lang.OtpNumberFormat;
-import org.opentripplanner.framework.logging.Throttle;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorStopNameResolver;
@@ -22,6 +20,8 @@
import org.opentripplanner.raptor.spi.RaptorCostCalculator;
import org.opentripplanner.raptor.util.paretoset.ParetoComparator;
import org.opentripplanner.raptor.util.paretoset.ParetoSet;
+import org.opentripplanner.utils.lang.OtpNumberFormat;
+import org.opentripplanner.utils.logging.Throttle;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/path/configure/PathConfig.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/path/configure/PathConfig.java
index 43d504ced7d..24c4d8a3bed 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/path/configure/PathConfig.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/path/configure/PathConfig.java
@@ -102,7 +102,7 @@ private PathMapper createPathMapper(boolean includeCost) {
ctx.raptorSlackProvider(),
includeCost ? ctx.costCalculator() : null,
ctx.stopNameResolver(),
- ctx.transit().transferConstraintsSearch(),
+ ctx.transitData().transferConstraintsSearch(),
ctx.lifeCycle()
);
}
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/MinTravelDurationRoutingStrategy.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/MinTravelDurationRoutingStrategy.java
index 0e18729b97e..f68299a0a13 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/MinTravelDurationRoutingStrategy.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/MinTravelDurationRoutingStrategy.java
@@ -2,7 +2,6 @@
import static org.opentripplanner.raptor.spi.RaptorTripScheduleSearch.UNBOUNDED_TRIP_INDEX;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.rangeraptor.internalapi.RoutingStrategy;
@@ -12,6 +11,7 @@
import org.opentripplanner.raptor.spi.RaptorBoardOrAlightEvent;
import org.opentripplanner.raptor.spi.RaptorConstrainedBoardingSearch;
import org.opentripplanner.raptor.spi.RaptorRoute;
+import org.opentripplanner.utils.time.TimeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/besttimes/BestTimes.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/besttimes/BestTimes.java
index 3807b26b6c6..296325e9022 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/besttimes/BestTimes.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/besttimes/BestTimes.java
@@ -1,14 +1,14 @@
package org.opentripplanner.raptor.rangeraptor.standard.besttimes;
-import static org.opentripplanner.framework.lang.IntUtils.intArray;
+import static org.opentripplanner.utils.lang.IntUtils.intArray;
import java.util.BitSet;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.rangeraptor.internalapi.SingleCriteriaStopArrivals;
import org.opentripplanner.raptor.rangeraptor.internalapi.WorkerLifeCycle;
import org.opentripplanner.raptor.rangeraptor.support.IntArraySingleCriteriaArrivals;
import org.opentripplanner.raptor.rangeraptor.transit.TransitCalculator;
import org.opentripplanner.raptor.util.BitSetIterator;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This class is responsible for keeping track of the overall best times and the best "on-board"
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/besttimes/SimpleBestNumberOfTransfers.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/besttimes/SimpleBestNumberOfTransfers.java
index 22b0f44a579..f529ce31e20 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/besttimes/SimpleBestNumberOfTransfers.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/besttimes/SimpleBestNumberOfTransfers.java
@@ -1,10 +1,10 @@
package org.opentripplanner.raptor.rangeraptor.standard.besttimes;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.raptor.rangeraptor.internalapi.SingleCriteriaStopArrivals;
import org.opentripplanner.raptor.rangeraptor.internalapi.WorkerLifeCycle;
import org.opentripplanner.raptor.rangeraptor.standard.internalapi.BestNumberOfTransfers;
import org.opentripplanner.raptor.rangeraptor.support.IntArraySingleCriteriaArrivals;
+import org.opentripplanner.utils.lang.IntUtils;
/**
* The responsibility for this class is to keep track of the best (minimun) number of transfers for
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/heuristics/HeuristicsAdapter.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/heuristics/HeuristicsAdapter.java
index 3dbff516347..00cce39622d 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/heuristics/HeuristicsAdapter.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/heuristics/HeuristicsAdapter.java
@@ -4,9 +4,6 @@
import java.util.Arrays;
import java.util.List;
import java.util.function.IntUnaryOperator;
-import org.opentripplanner.framework.lang.IntUtils;
-import org.opentripplanner.framework.time.TimeUtils;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.rangeraptor.internalapi.HeuristicAtStop;
import org.opentripplanner.raptor.rangeraptor.internalapi.Heuristics;
@@ -15,6 +12,9 @@
import org.opentripplanner.raptor.rangeraptor.transit.RaptorTransitCalculator;
import org.opentripplanner.raptor.rangeraptor.transit.TransitCalculator;
import org.opentripplanner.raptor.spi.RaptorCostCalculator;
+import org.opentripplanner.utils.lang.IntUtils;
+import org.opentripplanner.utils.time.TimeUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The responsibility of this class is to play the {@link Heuristics} role. It wrap the internal
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/AccessStopArrivalState.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/AccessStopArrivalState.java
index 867707be215..62f708d1899 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/AccessStopArrivalState.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/AccessStopArrivalState.java
@@ -1,9 +1,9 @@
package org.opentripplanner.raptor.rangeraptor.standard.stoparrivals;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This class is responsible for adding access functionality, which the {@link
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/DefaultStopArrivalState.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/DefaultStopArrivalState.java
index 6df63b37d16..b76b0560791 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/DefaultStopArrivalState.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/DefaultStopArrivalState.java
@@ -1,9 +1,9 @@
package org.opentripplanner.raptor.rangeraptor.standard.stoparrivals;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The main purpose of this class is to hold data for a given arrival at a stop and raptor round. It
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/EgressStopArrivalState.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/EgressStopArrivalState.java
index f546e358ad8..c002f57dcba 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/EgressStopArrivalState.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/EgressStopArrivalState.java
@@ -2,11 +2,11 @@
import java.util.Collection;
import java.util.List;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.rangeraptor.standard.internalapi.DestinationArrivalListener;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The egress stop arrival state is responsible for sending arrival notifications. This is used to
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/path/EgressArrivalToPathAdapter.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/path/EgressArrivalToPathAdapter.java
index b52e0d854da..a5d39d2eca9 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/path/EgressArrivalToPathAdapter.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/stoparrivals/path/EgressArrivalToPathAdapter.java
@@ -4,8 +4,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.opentripplanner.framework.time.TimeUtils;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.view.ArrivalView;
@@ -16,6 +14,8 @@
import org.opentripplanner.raptor.rangeraptor.standard.internalapi.DestinationArrivalListener;
import org.opentripplanner.raptor.rangeraptor.standard.stoparrivals.view.StopsCursor;
import org.opentripplanner.raptor.rangeraptor.transit.TransitCalculator;
+import org.opentripplanner.utils.time.TimeUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The responsibility of this class is to listen for egress stop arrivals and forward these as
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardRaptorTransitCalculator.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardRaptorTransitCalculator.java
index 5c50aa030f5..20dda7a3b37 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardRaptorTransitCalculator.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardRaptorTransitCalculator.java
@@ -1,7 +1,6 @@
package org.opentripplanner.raptor.rangeraptor.transit;
import java.util.Iterator;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
@@ -14,6 +13,7 @@
import org.opentripplanner.raptor.spi.RaptorTransitDataProvider;
import org.opentripplanner.raptor.spi.RaptorTripScheduleSearch;
import org.opentripplanner.raptor.util.IntIterators;
+import org.opentripplanner.utils.time.TimeUtils;
public final class ForwardRaptorTransitCalculator
extends ForwardTransitCalculator
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RaptorTransitCalculator.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RaptorTransitCalculator.java
index af9cff110d0..141c71ee86c 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RaptorTransitCalculator.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RaptorTransitCalculator.java
@@ -1,7 +1,7 @@
package org.opentripplanner.raptor.rangeraptor.transit;
-import static org.opentripplanner.framework.time.TimeUtils.hm2time;
import static org.opentripplanner.raptor.api.model.RaptorConstants.TIME_NOT_SET;
+import static org.opentripplanner.utils.time.TimeUtils.hm2time;
import java.util.Iterator;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/ReverseRaptorTransitCalculator.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/ReverseRaptorTransitCalculator.java
index 09ded9fb4b7..1229c8d85ff 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/ReverseRaptorTransitCalculator.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/ReverseRaptorTransitCalculator.java
@@ -1,7 +1,6 @@
package org.opentripplanner.raptor.rangeraptor.transit;
import java.util.Iterator;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
@@ -14,6 +13,7 @@
import org.opentripplanner.raptor.spi.RaptorTransitDataProvider;
import org.opentripplanner.raptor.spi.RaptorTripScheduleSearch;
import org.opentripplanner.raptor.util.IntIterators;
+import org.opentripplanner.utils.time.TimeUtils;
public final class ReverseRaptorTransitCalculator
extends ReverseTransitCalculator
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/TripScheduleExactMatchSearch.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/TripScheduleExactMatchSearch.java
index 666cf95f31e..1db6b2de055 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/TripScheduleExactMatchSearch.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/TripScheduleExactMatchSearch.java
@@ -1,9 +1,9 @@
package org.opentripplanner.raptor.rangeraptor.transit;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.spi.RaptorBoardOrAlightEvent;
import org.opentripplanner.raptor.spi.RaptorTripScheduleSearch;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This trip search will only match trips that is within the given slack of the timeLimit.
diff --git a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/TripTimesSearch.java b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/TripTimesSearch.java
index 83bfbe16481..94dfa83ad80 100644
--- a/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/TripTimesSearch.java
+++ b/application/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/TripTimesSearch.java
@@ -1,10 +1,10 @@
package org.opentripplanner.raptor.rangeraptor.transit;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorTripPattern;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.view.ArrivalView;
import org.opentripplanner.raptor.spi.BoardAndAlightTime;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This class is used to find the board and alight time for a known trip, where you now the
diff --git a/application/src/main/java/org/opentripplanner/raptor/service/DebugHeuristics.java b/application/src/main/java/org/opentripplanner/raptor/service/DebugHeuristics.java
index bb4241bb2ae..f4c2c141f04 100644
--- a/application/src/main/java/org/opentripplanner/raptor/service/DebugHeuristics.java
+++ b/application/src/main/java/org/opentripplanner/raptor/service/DebugHeuristics.java
@@ -5,13 +5,13 @@
import static org.opentripplanner.raptor.api.model.RaptorConstants.N_TRANSFERS_UNREACHED;
import static org.opentripplanner.raptor.api.model.RaptorConstants.UNREACHED_HIGH;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.raptor.api.debug.DebugLogger;
import org.opentripplanner.raptor.api.model.SearchDirection;
import org.opentripplanner.raptor.api.request.DebugRequest;
import org.opentripplanner.raptor.api.request.RaptorRequest;
import org.opentripplanner.raptor.rangeraptor.internalapi.Heuristics;
import org.opentripplanner.raptor.util.CompareIntArrays;
+import org.opentripplanner.utils.lang.IntUtils;
/**
* Utility class to log computed heuristic data.
diff --git a/application/src/main/java/org/opentripplanner/raptor/service/HeuristicSearchTask.java b/application/src/main/java/org/opentripplanner/raptor/service/HeuristicSearchTask.java
index 7c0158d2192..8d4f1218aaf 100644
--- a/application/src/main/java/org/opentripplanner/raptor/service/HeuristicSearchTask.java
+++ b/application/src/main/java/org/opentripplanner/raptor/service/HeuristicSearchTask.java
@@ -3,15 +3,16 @@
import static org.opentripplanner.raptor.api.request.RaptorProfile.MIN_TRAVEL_DURATION;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.model.SearchDirection;
import org.opentripplanner.raptor.api.request.RaptorRequest;
import org.opentripplanner.raptor.configure.RaptorConfig;
import org.opentripplanner.raptor.rangeraptor.RangeRaptor;
import org.opentripplanner.raptor.rangeraptor.internalapi.Heuristics;
+import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouter;
import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult;
import org.opentripplanner.raptor.spi.RaptorTransitDataProvider;
+import org.opentripplanner.utils.time.DurationUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -33,7 +34,7 @@ public class HeuristicSearchTask {
private final RaptorTransitDataProvider transitData;
private boolean run = false;
- private RangeRaptor search = null;
+ private RaptorRouter search = null;
private RaptorRequest originalRequest;
private RaptorRequest heuristicRequest;
private RaptorRouterResult result = null;
diff --git a/application/src/main/java/org/opentripplanner/raptor/service/RangeRaptorDynamicSearch.java b/application/src/main/java/org/opentripplanner/raptor/service/RangeRaptorDynamicSearch.java
index c2a174d646a..50b485ab4cf 100644
--- a/application/src/main/java/org/opentripplanner/raptor/service/RangeRaptorDynamicSearch.java
+++ b/application/src/main/java/org/opentripplanner/raptor/service/RangeRaptorDynamicSearch.java
@@ -18,9 +18,10 @@
import org.opentripplanner.raptor.api.request.SearchParamsBuilder;
import org.opentripplanner.raptor.api.response.RaptorResponse;
import org.opentripplanner.raptor.configure.RaptorConfig;
-import org.opentripplanner.raptor.rangeraptor.RangeRaptor;
import org.opentripplanner.raptor.rangeraptor.internalapi.Heuristics;
+import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouter;
import org.opentripplanner.raptor.rangeraptor.transit.RaptorSearchWindowCalculator;
+import org.opentripplanner.raptor.spi.ExtraMcRouterSearch;
import org.opentripplanner.raptor.spi.RaptorTransitDataProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,12 +45,16 @@ public class RangeRaptorDynamicSearch {
private final RaptorRequest originalRequest;
private final RaptorSearchWindowCalculator dynamicSearchWindowCalculator;
+ @Nullable
+ private final ExtraMcRouterSearch extraMcSearch;
+
private final HeuristicSearchTask fwdHeuristics;
private final HeuristicSearchTask revHeuristics;
public RangeRaptorDynamicSearch(
RaptorConfig config,
RaptorTransitDataProvider transitData,
+ @Nullable ExtraMcRouterSearch extraMcSearch,
RaptorRequest originalRequest
) {
this.config = config;
@@ -57,6 +62,7 @@ public RangeRaptorDynamicSearch(
this.originalRequest = originalRequest;
this.dynamicSearchWindowCalculator =
config.searchWindowCalculator().withSearchParams(originalRequest.searchParams());
+ this.extraMcSearch = extraMcSearch;
this.fwdHeuristics = new HeuristicSearchTask<>(FORWARD, "Forward", config, transitData);
this.revHeuristics = new HeuristicSearchTask<>(REVERSE, "Reverse", config, transitData);
@@ -128,18 +134,23 @@ private void runHeuristics() {
private RaptorResponse createAndRunDynamicRRWorker(RaptorRequest request) {
LOG.debug("Main request: {}", request);
- RangeRaptor rangeRaptorRouter;
+ RaptorRouter raptorRouter;
// Create worker
if (request.profile().is(MULTI_CRITERIA)) {
- rangeRaptorRouter =
- config.createRangeRaptorWithMcWorker(transitData, request, getDestinationHeuristics());
+ raptorRouter =
+ config.createRangeRaptorWithMcWorker(
+ transitData,
+ request,
+ getDestinationHeuristics(),
+ extraMcSearch
+ );
} else {
- rangeRaptorRouter = config.createRangeRaptorWithStdWorker(transitData, request);
+ raptorRouter = config.createRangeRaptorWithStdWorker(transitData, request);
}
// Route
- var result = rangeRaptorRouter.route();
+ var result = raptorRouter.route();
// create and return response
return new RaptorResponse<>(
diff --git a/application/src/main/java/org/opentripplanner/raptor/service/ViaRangeRaptorDynamicSearch.java b/application/src/main/java/org/opentripplanner/raptor/service/ViaRangeRaptorDynamicSearch.java
deleted file mode 100644
index cfd12f65b3a..00000000000
--- a/application/src/main/java/org/opentripplanner/raptor/service/ViaRangeRaptorDynamicSearch.java
+++ /dev/null
@@ -1,297 +0,0 @@
-package org.opentripplanner.raptor.service;
-
-import static org.opentripplanner.raptor.api.model.SearchDirection.FORWARD;
-import static org.opentripplanner.raptor.api.model.SearchDirection.REVERSE;
-import static org.opentripplanner.raptor.api.request.RaptorProfile.MULTI_CRITERIA;
-import static org.opentripplanner.raptor.service.HeuristicToRunResolver.resolveHeuristicToRunBasedOnOptimizationsAndSearchParameters;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.stream.Collectors;
-import javax.annotation.Nullable;
-import org.opentripplanner.raptor.RaptorService;
-import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
-import org.opentripplanner.raptor.api.request.RaptorRequest;
-import org.opentripplanner.raptor.api.request.SearchParams;
-import org.opentripplanner.raptor.api.request.SearchParamsBuilder;
-import org.opentripplanner.raptor.api.response.RaptorResponse;
-import org.opentripplanner.raptor.configure.RaptorConfig;
-import org.opentripplanner.raptor.rangeraptor.RangeRaptor;
-import org.opentripplanner.raptor.rangeraptor.internalapi.Heuristics;
-import org.opentripplanner.raptor.rangeraptor.transit.RaptorSearchWindowCalculator;
-import org.opentripplanner.raptor.spi.RaptorTransitDataProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This search helps the {@link RaptorService} to configure
- * heuristics and set dynamic search parameters like EDT, LAT and raptor-search-window.
- *
- * If possible the forward and reverse heuristics will be run in parallel.
- *
- * Depending on which optimization is enabled and which search parameters are set a forward and/or a
- * reverse "single-iteration" raptor search is performed and heuristics are collected. This is used
- * to configure the "main" multi-iteration RangeRaptor search.
- */
-public class ViaRangeRaptorDynamicSearch {
-
- private static final Logger LOG = LoggerFactory.getLogger(ViaRangeRaptorDynamicSearch.class);
-
- private final RaptorConfig config;
- private final RaptorTransitDataProvider transitData;
- private final RaptorRequest originalRequest;
- private final RaptorSearchWindowCalculator dynamicSearchWindowCalculator;
-
- private final HeuristicSearchTask fwdHeuristics;
- private final HeuristicSearchTask revHeuristics;
-
- public ViaRangeRaptorDynamicSearch(
- RaptorConfig config,
- RaptorTransitDataProvider transitData,
- RaptorRequest originalRequest
- ) {
- this.config = config;
- this.transitData = transitData;
- this.originalRequest = originalRequest;
- this.dynamicSearchWindowCalculator =
- config.searchWindowCalculator().withSearchParams(originalRequest.searchParams());
-
- this.fwdHeuristics = new HeuristicSearchTask<>(FORWARD, "Forward", config, transitData);
- this.revHeuristics = new HeuristicSearchTask<>(REVERSE, "Reverse", config, transitData);
- }
-
- public RaptorResponse route() {
- try {
- enableHeuristicSearchBasedOnOptimizationsAndSearchParameters();
-
- // Run heuristics, if no destination is reached
- runHeuristics();
-
- // Set search-window and other dynamic calculated parameters
- var dynamicRequest = requestWithDynamicSearchParams(originalRequest);
-
- return createAndRunDynamicRRWorker(dynamicRequest);
- } catch (DestinationNotReachedException e) {
- return new RaptorResponse<>(
- Collections.emptyList(),
- null,
- // If a trip exists(forward heuristics succeed), but is outside the calculated
- // search-window, then set the search-window params as if the request was
- // performed. This enables the client to page to the next window
- requestWithDynamicSearchParams(originalRequest),
- false
- );
- }
- }
-
- /**
- * Only exposed for testing purposes
- */
- @Nullable
- public Heuristics getDestinationHeuristics() {
- if (!originalRequest.useDestinationPruning()) {
- return null;
- }
- LOG.debug("RangeRaptor - Destination pruning enabled.");
- return revHeuristics.result();
- }
-
- /**
- * Create and prepare heuristic search (both FORWARD and REVERSE) based on optimizations and input
- * search parameters. This is done for Standard and Multi-criteria profiles only.
- */
- private void enableHeuristicSearchBasedOnOptimizationsAndSearchParameters() {
- // We delegate this to a static method to be able to write unit test on this logic
- resolveHeuristicToRunBasedOnOptimizationsAndSearchParameters(
- originalRequest,
- fwdHeuristics::enable,
- revHeuristics::enable
- );
- }
-
- /**
- * Run standard "singe-iteration" raptor search to calculate heuristics - this should be really
- * fast to run compared with a (multi-criteria) range-raptor search.
- *
- * @throws DestinationNotReachedException if destination is not reached.
- */
- private void runHeuristics() {
- if (isItPossibleToRunHeuristicsInParallel()) {
- runHeuristicsInParallel();
- } else {
- runHeuristicsSequentially();
- }
- fwdHeuristics.debugCompareResult(revHeuristics);
- }
-
- private RaptorResponse createAndRunDynamicRRWorker(RaptorRequest request) {
- LOG.debug("Main request: {}", request);
- RangeRaptor rangeRaptorRouter;
-
- // Create worker
- if (request.profile().is(MULTI_CRITERIA)) {
- rangeRaptorRouter =
- config.createRangeRaptorWithMcWorker(transitData, request, getDestinationHeuristics());
- } else {
- rangeRaptorRouter = config.createRangeRaptorWithStdWorker(transitData, request);
- }
-
- // Route
- var result = rangeRaptorRouter.route();
-
- // create and return response
- return new RaptorResponse<>(
- result.extractPaths(),
- new DefaultStopArrivals(result),
- request,
- // This method is not run unless the heuristic reached the destination
- true
- );
- }
-
- private boolean isItPossibleToRunHeuristicsInParallel() {
- SearchParams s = originalRequest.searchParams();
- return (
- config.isMultiThreaded() &&
- originalRequest.runInParallel() &&
- s.isEarliestDepartureTimeSet() &&
- s.isLatestArrivalTimeSet() &&
- fwdHeuristics.isEnabled() &&
- revHeuristics.isEnabled()
- );
- }
-
- /**
- * @throws DestinationNotReachedException if destination is not reached
- */
- private void runHeuristicsInParallel() {
- fwdHeuristics.withRequest(originalRequest);
- revHeuristics.withRequest(originalRequest);
- Future> asyncResult = null;
- try {
- asyncResult = config.threadPool().submit(fwdHeuristics::run);
- revHeuristics.run();
- asyncResult.get();
- LOG.debug(
- "Route using RangeRaptor - " + "REVERSE and FORWARD heuristic search performed in parallel."
- );
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- // propagate interruption to the running task.
- asyncResult.cancel(true);
- throw config.mapInterruptedException(e);
- } catch (ExecutionException e) {
- if (e.getCause() instanceof DestinationNotReachedException) {
- throw new DestinationNotReachedException();
- }
- LOG.error(e.getMessage() + ". Request: " + originalRequest, e);
- throw new IllegalStateException(
- "Failed to run FORWARD/REVERSE heuristic search in parallel. Details: " + e.getMessage()
- );
- }
- }
-
- /**
- * @throws DestinationNotReachedException if destination is not reached
- */
- private void runHeuristicsSequentially() {
- List> tasks = listTasksInOrder();
-
- if (tasks.isEmpty()) {
- return;
- }
-
- // Run the first heuristic search
- Heuristics result = runHeuristicSearchTask(tasks.get(0));
- calculateDynamicSearchParametersFromHeuristics(result);
-
- if (tasks.size() == 1) {
- return;
- }
-
- // Run the second heuristic search
- runHeuristicSearchTask(tasks.get(1));
- }
-
- private Heuristics runHeuristicSearchTask(HeuristicSearchTask task) {
- RaptorRequest request = task.getDirection().isForward()
- ? requestForForwardHeurSearchWithDynamicSearchParams()
- : requestForReverseHeurSearchWithDynamicSearchParams();
-
- task.withRequest(request).run();
-
- return task.result();
- }
-
- /**
- * If the earliest-departure-time(EDT) is set, the task order should be:
- *
- * - {@code FORWARD}
- * - {@code REVERSE}
- *
- * If no EDT is set, the latest-arrival-time is set, and the order should be the opposite,
- * with {@code REVERSE} first
- */
- private List> listTasksInOrder() {
- boolean performForwardFirst = originalRequest.searchParams().isEarliestDepartureTimeSet();
-
- List> list = performForwardFirst
- ? List.of(fwdHeuristics, revHeuristics)
- : List.of(revHeuristics, fwdHeuristics);
-
- return list.stream().filter(HeuristicSearchTask::isEnabled).collect(Collectors.toList());
- }
-
- private RaptorRequest requestForForwardHeurSearchWithDynamicSearchParams() {
- if (originalRequest.searchParams().isEarliestDepartureTimeSet()) {
- return originalRequest;
- }
- return originalRequest
- .mutate()
- .searchParams()
- .earliestDepartureTime(transitData.getValidTransitDataStartTime())
- .build();
- }
-
- private RaptorRequest requestForReverseHeurSearchWithDynamicSearchParams() {
- if (originalRequest.searchParams().isLatestArrivalTimeSet()) {
- return originalRequest;
- }
- return originalRequest
- .mutate()
- .searchParams()
- .latestArrivalTime(
- transitData.getValidTransitDataEndTime() +
- originalRequest.searchParams().accessEgressMaxDurationSeconds()
- )
- .build();
- }
-
- private RaptorRequest requestWithDynamicSearchParams(RaptorRequest request) {
- SearchParamsBuilder builder = request.mutate().searchParams();
-
- if (!request.searchParams().isEarliestDepartureTimeSet()) {
- builder.earliestDepartureTime(dynamicSearchWindowCalculator.getEarliestDepartureTime());
- }
- if (!request.searchParams().isSearchWindowSet()) {
- builder.searchWindowInSeconds(dynamicSearchWindowCalculator.getSearchWindowSeconds());
- }
- // We do not set the latest-arrival-time, because we do not want to limit the forward
- // multi-criteria search, it does not have much effect on the performance - we only risk
- // losing optimal results.
- return builder.build();
- }
-
- private void calculateDynamicSearchParametersFromHeuristics(@Nullable Heuristics heuristics) {
- if (heuristics != null) {
- dynamicSearchWindowCalculator
- .withHeuristics(
- heuristics.bestOverallJourneyTravelDuration(),
- heuristics.minWaitTimeForJourneysReachingDestination()
- )
- .calculate();
- }
- }
-}
diff --git a/application/src/main/java/org/opentripplanner/raptor/spi/BoardAndAlightTime.java b/application/src/main/java/org/opentripplanner/raptor/spi/BoardAndAlightTime.java
index 9c0f8264511..c90e67934a8 100644
--- a/application/src/main/java/org/opentripplanner/raptor/spi/BoardAndAlightTime.java
+++ b/application/src/main/java/org/opentripplanner/raptor/spi/BoardAndAlightTime.java
@@ -1,9 +1,9 @@
package org.opentripplanner.raptor.spi;
import java.util.Objects;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* Board and alight time tuple value object.
diff --git a/application/src/main/java/org/opentripplanner/raptor/spi/ExtraMcRouterSearch.java b/application/src/main/java/org/opentripplanner/raptor/spi/ExtraMcRouterSearch.java
new file mode 100644
index 00000000000..e6fdc4fd0d0
--- /dev/null
+++ b/application/src/main/java/org/opentripplanner/raptor/spi/ExtraMcRouterSearch.java
@@ -0,0 +1,39 @@
+package org.opentripplanner.raptor.spi;
+
+import java.util.Collection;
+import java.util.function.BiFunction;
+import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.raptor.api.path.RaptorPath;
+
+/**
+ * This interface is used to run two multi-criteria searches and merging the result. Raptor will
+ * run the heuristics as normal. Then create two multi-criteria searches, the main search and the
+ * alternative search. The caller must provide a {@code merger} and
+ * {@link RaptorTransitDataProvider}. The transit data is used for the alternative search. This
+ * allows the caller to filter the transit data or change the cost-calculator.
+ *
+ * When changing the transit data, you may also invalidate the heuristics created by Raptor. If this
+ * is the case, you need to turn off the {@link org.opentripplanner.raptor.api.request.Optimization#PARETO_CHECK_AGAINST_DESTINATION}.
+ * For the heuristics to work, you may add extra cost or filter away data. But you cannot decrease
+ * the cost, add transfer or add new trips.
+ *
+ * This will alter the multi-criteria search, if only a standard search is requested any extra
+ * multi-criteria search is ignored.
+ *
+ * @param The TripSchedule type defined by the user of the raptor API.
+ */
+public interface ExtraMcRouterSearch {
+ /**
+ * The returned transit-data is used in the ALTERNATIVE search. The given transit data is used in
+ * the main search. It is the same data passed into Raptor.
+ */
+ RaptorTransitDataProvider createTransitDataAlternativeSearch(
+ RaptorTransitDataProvider transitDataMainSearch
+ );
+
+ /**
+ * You must provide a merge strategy to merge the main result (first argument) with the
+ * alternative result(second argument). Make sure the end result does not have any duplicates.
+ */
+ BiFunction>, Collection>, Collection>> merger();
+}
diff --git a/application/src/main/java/org/opentripplanner/raptor/util/CompareIntArrays.java b/application/src/main/java/org/opentripplanner/raptor/util/CompareIntArrays.java
index 9bff831a670..1f446fe036c 100644
--- a/application/src/main/java/org/opentripplanner/raptor/util/CompareIntArrays.java
+++ b/application/src/main/java/org/opentripplanner/raptor/util/CompareIntArrays.java
@@ -2,7 +2,7 @@
import java.util.Comparator;
import java.util.function.IntFunction;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* The responsibility of this class is to compare two int arrays and list all elements that differ.
diff --git a/application/src/main/java/org/opentripplanner/routing/TripTimeOnDateHelper.java b/application/src/main/java/org/opentripplanner/routing/TripTimeOnDateHelper.java
index 72665edf657..f2806d0a1f2 100644
--- a/application/src/main/java/org/opentripplanner/routing/TripTimeOnDateHelper.java
+++ b/application/src/main/java/org/opentripplanner/routing/TripTimeOnDateHelper.java
@@ -4,13 +4,13 @@
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.model.Timetable;
import org.opentripplanner.model.TripTimeOnDate;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.timetable.Trip;
import org.opentripplanner.transit.model.timetable.TripTimes;
import org.opentripplanner.transit.service.TransitService;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java b/application/src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java
index 1e2dd3f2d4e..e0b06eab561 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java
@@ -14,7 +14,6 @@
import javax.annotation.Nullable;
import org.opentripplanner.framework.application.OTPFeature;
import org.opentripplanner.framework.application.OTPRequestTimeoutException;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.grouppriority.TransitGroupPriorityItineraryDecorator;
import org.opentripplanner.model.plan.paging.cursor.PageCursorInput;
@@ -38,6 +37,7 @@
import org.opentripplanner.service.paging.PagingService;
import org.opentripplanner.standalone.api.OtpServerRequestContext;
import org.opentripplanner.transit.model.network.grouppriority.TransitGroupPriorityService;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainBuilder.java b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainBuilder.java
index 3ff85db467a..65776948cbb 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainBuilder.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainBuilder.java
@@ -13,8 +13,6 @@
import javax.annotation.Nullable;
import org.opentripplanner.ext.accessibilityscore.DecorateWithAccessibilityScore;
import org.opentripplanner.framework.application.OTPFeature;
-import org.opentripplanner.framework.collection.ListSection;
-import org.opentripplanner.framework.lang.Sandbox;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.ItinerarySortKey;
import org.opentripplanner.model.plan.SortOrder;
@@ -58,6 +56,8 @@
import org.opentripplanner.street.search.TraverseMode;
import org.opentripplanner.transit.model.site.MultiModalStation;
import org.opentripplanner.transit.model.site.Station;
+import org.opentripplanner.utils.collection.ListSection;
+import org.opentripplanner.utils.lang.Sandbox;
/**
* Create a filter chain based on the given config.
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/GroupBySimilarity.java b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/GroupBySimilarity.java
index 0f671524a06..5cec3046710 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/GroupBySimilarity.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/GroupBySimilarity.java
@@ -1,7 +1,7 @@
package org.opentripplanner.routing.algorithm.filterchain.api;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.algorithm.filterchain.ItineraryListFilterChainBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Group itineraries by similarity and reduce the number of itineraries down to an given maximum
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/TransitGeneralizedCostFilterParams.java b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/TransitGeneralizedCostFilterParams.java
index a173f6b454b..da33b6f92a0 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/TransitGeneralizedCostFilterParams.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/TransitGeneralizedCostFilterParams.java
@@ -1,7 +1,7 @@
package org.opentripplanner.routing.algorithm.filterchain.api;
-import org.opentripplanner.framework.lang.DoubleUtils;
import org.opentripplanner.routing.api.request.framework.CostLinearFunction;
+import org.opentripplanner.utils.lang.DoubleUtils;
/**
* Input parameters for
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilter.java b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilter.java
index aed5eeb4f95..77c297fcfa5 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilter.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilter.java
@@ -2,10 +2,10 @@
import java.util.List;
import java.util.function.Consumer;
-import org.opentripplanner.framework.collection.ListSection;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.paging.cursor.PageCursorInput;
import org.opentripplanner.routing.algorithm.filterchain.framework.spi.RemoveItineraryFlagger;
+import org.opentripplanner.utils.collection.ListSection;
/**
* Flag all itineraries after the provided limit. This flags the itineraries at the end of the list
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilterResults.java b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilterResults.java
index 8b11be099f7..401dc95026d 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilterResults.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilterResults.java
@@ -2,12 +2,12 @@
import java.time.Instant;
import java.util.List;
-import org.opentripplanner.framework.collection.ListSection;
-import org.opentripplanner.framework.collection.ListUtils;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.ItinerarySortKey;
import org.opentripplanner.model.plan.paging.cursor.PageCursorInput;
+import org.opentripplanner.utils.collection.ListSection;
+import org.opentripplanner.utils.collection.ListUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The NumItinerariesFilter removes itineraries from a list of itineraries based on the number to
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/PagingFilter.java b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/PagingFilter.java
index 1ef109525f6..417ffca9d83 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/PagingFilter.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/PagingFilter.java
@@ -3,12 +3,12 @@
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.collection.ListSection;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.ItinerarySortKey;
import org.opentripplanner.model.plan.SortOrder;
import org.opentripplanner.routing.algorithm.filterchain.framework.sort.SortOrderComparator;
import org.opentripplanner.routing.algorithm.filterchain.framework.spi.RemoveItineraryFlagger;
+import org.opentripplanner.utils.collection.ListSection;
/**
* This class is used to enforce the cut/limit between two pages. It removes potential duplicates
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/transit/TransitGeneralizedCostFilter.java b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/transit/TransitGeneralizedCostFilter.java
index 430f00372d0..4af0acd00cb 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/transit/TransitGeneralizedCostFilter.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/transit/TransitGeneralizedCostFilter.java
@@ -4,11 +4,11 @@
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.routing.algorithm.filterchain.framework.spi.RemoveItineraryFlagger;
import org.opentripplanner.routing.api.request.framework.CostLinearFunction;
+import org.opentripplanner.utils.lang.IntUtils;
/**
* This filter removes all transit results which have a generalized-cost higher than the max-limit
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/groupids/GroupByDistance.java b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/groupids/GroupByDistance.java
index ee67e4f76d0..eb25cf9275c 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/groupids/GroupByDistance.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/groupids/GroupByDistance.java
@@ -2,12 +2,12 @@
import java.util.Comparator;
import java.util.List;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.Leg;
import org.opentripplanner.model.plan.StreetLeg;
import org.opentripplanner.model.plan.TransitLeg;
import org.opentripplanner.routing.algorithm.filterchain.framework.spi.GroupId;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This class creates a group identifier for an itinerary based on the longest legs which together
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/sort/SortOrderComparator.java b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/sort/SortOrderComparator.java
index f11caf5ceaa..a904a6990ca 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/sort/SortOrderComparator.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/sort/SortOrderComparator.java
@@ -4,9 +4,9 @@
import static java.util.Comparator.comparingInt;
import java.util.Comparator;
-import org.opentripplanner.framework.collection.CompositeComparator;
import org.opentripplanner.model.plan.ItinerarySortKey;
import org.opentripplanner.model.plan.SortOrder;
+import org.opentripplanner.utils.collection.CompositeComparator;
/**
* This comparator implements the itinerary sort order defined by the {@link SortOrder}.
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/PagingServiceFactory.java b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/PagingServiceFactory.java
index ec58d444914..97dbda4bb68 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/PagingServiceFactory.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/PagingServiceFactory.java
@@ -24,8 +24,10 @@ public static PagingService createPagingService(
) {
return new PagingService(
transitTuningParameters.pagingSearchWindowAdjustments(),
+ // The dynamic search-window is not the same as requested search-window, but in lack
+ // of a something else we use the raptor dynamic min here.
raptorTuningParameters.dynamicSearchWindowCoefficients().minWindow(),
- raptorTuningParameters.dynamicSearchWindowCoefficients().maxWindow(),
+ transitTuningParameters.maxSearchWindow(),
searchWindowOf(raptorSearchParamsUsed),
edt(searchStartTime, raptorSearchParamsUsed),
lat(searchStartTime, raptorSearchParamsUsed),
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/path/PathDiff.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/path/PathDiff.java
index 18f1fa4f64a..d595c8abcff 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/path/PathDiff.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/path/PathDiff.java
@@ -1,8 +1,8 @@
package org.opentripplanner.routing.algorithm.raptoradapter.path;
-import static org.opentripplanner.framework.text.Table.Align.Center;
-import static org.opentripplanner.framework.text.Table.Align.Left;
-import static org.opentripplanner.framework.text.Table.Align.Right;
+import static org.opentripplanner.utils.text.Table.Align.Center;
+import static org.opentripplanner.utils.text.Table.Align.Left;
+import static org.opentripplanner.utils.text.Table.Align.Right;
import java.util.ArrayList;
import java.util.Collection;
@@ -10,16 +10,16 @@
import java.util.List;
import java.util.function.Consumer;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.collection.CompositeComparator;
-import org.opentripplanner.framework.text.Table;
-import org.opentripplanner.framework.text.TableBuilder;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.path.PathLeg;
import org.opentripplanner.raptor.api.path.RaptorPath;
import org.opentripplanner.routing.util.DiffEntry;
import org.opentripplanner.routing.util.DiffTool;
+import org.opentripplanner.utils.collection.CompositeComparator;
+import org.opentripplanner.utils.text.Table;
+import org.opentripplanner.utils.text.TableBuilder;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This class is used to diff two set of paths. You may ask for the diff result or pass in a logger
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java
index 8040c16d800..2b9c0136e07 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java
@@ -12,12 +12,14 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.stream.IntStream;
+import javax.annotation.Nullable;
import org.opentripplanner.ext.ridehailing.RideHailingAccessShifter;
import org.opentripplanner.framework.application.OTPFeature;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.raptor.RaptorService;
import org.opentripplanner.raptor.api.path.RaptorPath;
import org.opentripplanner.raptor.api.response.RaptorResponse;
+import org.opentripplanner.raptor.spi.ExtraMcRouterSearch;
import org.opentripplanner.routing.algorithm.mapping.RaptorPathToItineraryMapper;
import org.opentripplanner.routing.algorithm.raptoradapter.router.street.AccessEgressPenaltyDecorator;
import org.opentripplanner.routing.algorithm.raptoradapter.router.street.AccessEgressRouter;
@@ -142,7 +144,10 @@ private TransitRouterResult route() {
);
// Route transit
- var raptorService = new RaptorService<>(serverContext.raptorConfig());
+ var raptorService = new RaptorService<>(
+ serverContext.raptorConfig(),
+ createExtraMcRouterSearch(accessEgresses, transitLayer)
+ );
var transitResponse = raptorService.route(raptorRequest, requestTransitDataProvider);
checkIfTransitConnectionExists(transitResponse);
@@ -386,4 +391,21 @@ private IntStream listStopIndexes(FeedScopedId stopLocationId) {
}
return stops.stream().mapToInt(StopLocation::getIndex);
}
+
+ /**
+ * An optional factory for creating a decorator around the multi-criteria RangeRaptor instance.
+ */
+ @Nullable
+ private ExtraMcRouterSearch createExtraMcRouterSearch(
+ AccessEgresses accessEgresses,
+ TransitLayer transitLayer
+ ) {
+ if (OTPFeature.Sorlandsbanen.isOff()) {
+ return null;
+ }
+ var service = serverContext.sorlandsbanenService();
+ return service == null
+ ? null
+ : service.createExtraMcRouterSearch(request, accessEgresses, transitLayer);
+ }
}
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/street/AccessEgressRouter.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/street/AccessEgressRouter.java
index 9b592fad3aa..0ae2df4e105 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/street/AccessEgressRouter.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/street/AccessEgressRouter.java
@@ -7,12 +7,12 @@
import javax.annotation.Nullable;
import org.opentripplanner.ext.dataoverlay.routing.DataOverlayContext;
import org.opentripplanner.framework.application.OTPRequestTimeoutException;
-import org.opentripplanner.framework.collection.ListUtils;
import org.opentripplanner.graph_builder.module.nearbystops.StreetNearbyStopFinder;
import org.opentripplanner.routing.api.request.RouteRequest;
import org.opentripplanner.routing.api.request.request.StreetRequest;
import org.opentripplanner.routing.graphfinder.NearbyStop;
import org.opentripplanner.street.search.TemporaryVerticesContainer;
+import org.opentripplanner.utils.collection.ListUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/Transfer.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/Transfer.java
index c6086100f5d..175c782ab22 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/Transfer.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/Transfer.java
@@ -5,8 +5,6 @@
import java.util.List;
import java.util.Optional;
import org.locationtech.jts.geom.Coordinate;
-import org.opentripplanner.framework.logging.Throttle;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.cost.RaptorCostConverter;
import org.opentripplanner.routing.api.request.preference.WalkPreferences;
@@ -14,6 +12,8 @@
import org.opentripplanner.street.search.request.StreetSearchRequest;
import org.opentripplanner.street.search.state.EdgeTraverser;
import org.opentripplanner.street.search.state.StateEditor;
+import org.opentripplanner.utils.logging.Throttle;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TransitTuningParameters.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TransitTuningParameters.java
index b62459db679..c2e518a9ec1 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TransitTuningParameters.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TransitTuningParameters.java
@@ -2,9 +2,9 @@
import java.time.Duration;
import java.util.List;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.routing.api.request.RouteRequest;
import org.opentripplanner.transit.model.site.StopTransferPriority;
+import org.opentripplanner.utils.time.DurationUtils;
public interface TransitTuningParameters {
List PAGING_SEARCH_WINDOW_ADJUSTMENTS = DurationUtils.durations("4h 2h 1h 30m 20m 10m");
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TripPatternForDate.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TripPatternForDate.java
index 1411424dfc6..eeaf1312677 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TripPatternForDate.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TripPatternForDate.java
@@ -8,10 +8,10 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.transit.model.network.RoutingTripPattern;
import org.opentripplanner.transit.model.timetable.FrequencyEntry;
import org.opentripplanner.transit.model.timetable.TripTimes;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/constrainedtransfer/ConstrainedTransfersForPatterns.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/constrainedtransfer/ConstrainedTransfersForPatterns.java
index f3b8eac0dd2..670c223e87d 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/constrainedtransfer/ConstrainedTransfersForPatterns.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/constrainedtransfer/ConstrainedTransfersForPatterns.java
@@ -2,7 +2,7 @@
import java.util.List;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This is a container for returning transfers from and to stop-positions indexed by
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/cost/GeneralizedCostParameters.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/cost/GeneralizedCostParameters.java
index e1271aca199..eee0fbf36c0 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/cost/GeneralizedCostParameters.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/cost/GeneralizedCostParameters.java
@@ -3,9 +3,9 @@
import java.util.BitSet;
import java.util.Objects;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.RouteRequest;
import org.opentripplanner.routing.api.request.preference.AccessibilityPreferences;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This class define how to calculate the cost when cost is part of the multi-criteria pareto
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/frequency/TripFrequencyAlightSearch.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/frequency/TripFrequencyAlightSearch.java
index 2f020e22cf5..ff97fd9bdaa 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/frequency/TripFrequencyAlightSearch.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/frequency/TripFrequencyAlightSearch.java
@@ -60,6 +60,6 @@ public RaptorBoardOrAlightEvent search(
}
}
}
- return null;
+ return RaptorBoardOrAlightEvent.empty(earliestBoardTime);
}
}
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRequestTransferCache.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRequestTransferCache.java
index 5e274c4120f..d778f491142 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRequestTransferCache.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRequestTransferCache.java
@@ -6,7 +6,6 @@
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ExecutionException;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.RaptorTransferIndex;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.Transfer;
import org.opentripplanner.routing.api.request.RouteRequest;
@@ -17,6 +16,7 @@
import org.opentripplanner.routing.api.request.preference.WheelchairPreferences;
import org.opentripplanner.street.search.request.StreetSearchRequest;
import org.opentripplanner.street.search.request.StreetSearchRequestMapper;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitData.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitData.java
index 0182598ca35..d7846645d98 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitData.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitData.java
@@ -6,7 +6,6 @@
import java.util.List;
import javax.annotation.Nullable;
import org.opentripplanner.framework.application.OTPFeature;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.model.transfer.TransferService;
import org.opentripplanner.raptor.api.model.RaptorConstrainedTransfer;
import org.opentripplanner.raptor.api.model.RaptorStopNameResolver;
@@ -30,6 +29,7 @@
import org.opentripplanner.routing.api.request.RouteRequest;
import org.opentripplanner.transit.model.network.RoutingTripPattern;
import org.opentripplanner.transit.model.network.grouppriority.TransitGroupPriorityService;
+import org.opentripplanner.utils.time.ServiceDateUtils;
/**
* This is the data provider for the Range Raptor search engine. It uses data from the TransitLayer,
@@ -128,6 +128,23 @@ public RaptorRoutingRequestTransitData(
);
}
+ public RaptorRoutingRequestTransitData(
+ RaptorRoutingRequestTransitData original,
+ RaptorCostCalculator newCostCalculator
+ ) {
+ this.transitLayer = original.transitLayer;
+ this.transitSearchTimeZero = original.transitSearchTimeZero;
+ this.activeTripPatternsPerStop = original.activeTripPatternsPerStop;
+ this.patternIndex = original.patternIndex;
+ this.transferIndex = original.transferIndex;
+ this.transferService = original.transferService;
+ this.constrainedTransfers = original.constrainedTransfers;
+ this.validTransitDataStartTime = original.validTransitDataStartTime;
+ this.validTransitDataEndTime = original.validTransitDataEndTime;
+ this.generalizedCostCalculator = newCostCalculator;
+ this.slackProvider = original.slackProvider();
+ }
+
@Override
public Iterator getTransfersFromStop(int stopIndex) {
return transferIndex.getForwardTransfers(stopIndex).iterator();
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitDataCreator.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitDataCreator.java
index 815bf839e31..bde424f8269 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitDataCreator.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitDataCreator.java
@@ -1,6 +1,6 @@
package org.opentripplanner.routing.algorithm.raptoradapter.transit.request;
-import static org.opentripplanner.framework.time.ServiceDateUtils.secondsSinceStartOfTime;
+import static org.opentripplanner.utils.time.ServiceDateUtils.secondsSinceStartOfTime;
import gnu.trove.list.array.TIntArrayList;
import gnu.trove.map.TObjectIntMap;
@@ -14,13 +14,13 @@
import java.util.List;
import java.util.Map;
import java.util.function.Predicate;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.TransitLayer;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripPatternForDate;
import org.opentripplanner.transit.model.network.RoutingTripPattern;
import org.opentripplanner.transit.model.network.grouppriority.TransitGroupPriorityService;
import org.opentripplanner.transit.model.timetable.TripTimes;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RouteRequestTransitDataProviderFilter.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RouteRequestTransitDataProviderFilter.java
index 44d9f3cdb3d..514a5b56f9a 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RouteRequestTransitDataProviderFilter.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RouteRequestTransitDataProviderFilter.java
@@ -12,6 +12,7 @@
import org.opentripplanner.transit.model.basic.Accessibility;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.network.BikeAccess;
+import org.opentripplanner.transit.model.network.CarAccess;
import org.opentripplanner.transit.model.network.RoutingTripPattern;
import org.opentripplanner.transit.model.timetable.Trip;
import org.opentripplanner.transit.model.timetable.TripTimes;
@@ -20,6 +21,8 @@ public class RouteRequestTransitDataProviderFilter implements TransitDataProvide
private final boolean requireBikesAllowed;
+ private final boolean requireCarsAllowed;
+
private final boolean wheelchairEnabled;
private final WheelchairPreferences wheelchairPreferences;
@@ -41,6 +44,7 @@ public class RouteRequestTransitDataProviderFilter implements TransitDataProvide
public RouteRequestTransitDataProviderFilter(RouteRequest request) {
this(
request.journey().transfer().mode() == StreetMode.BIKE,
+ request.journey().transfer().mode() == StreetMode.CAR,
request.wheelchair(),
request.preferences().wheelchair(),
request.preferences().transit().includePlannedCancellations(),
@@ -53,6 +57,7 @@ public RouteRequestTransitDataProviderFilter(RouteRequest request) {
// This constructor is used only for testing
public RouteRequestTransitDataProviderFilter(
boolean requireBikesAllowed,
+ boolean requireCarsAllowed,
boolean wheelchairEnabled,
WheelchairPreferences wheelchairPreferences,
boolean includePlannedCancellations,
@@ -61,6 +66,7 @@ public RouteRequestTransitDataProviderFilter(
List filters
) {
this.requireBikesAllowed = requireBikesAllowed;
+ this.requireCarsAllowed = requireCarsAllowed;
this.wheelchairEnabled = wheelchairEnabled;
this.wheelchairPreferences = wheelchairPreferences;
this.includePlannedCancellations = includePlannedCancellations;
@@ -97,10 +103,12 @@ public boolean tripPatternPredicate(TripPatternForDate tripPatternForDate) {
public boolean tripTimesPredicate(TripTimes tripTimes, boolean withFilters) {
final Trip trip = tripTimes.getTrip();
- if (requireBikesAllowed) {
- if (bikeAccessForTrip(trip) != BikeAccess.ALLOWED) {
- return false;
- }
+ if (requireBikesAllowed && bikeAccessForTrip(trip) != BikeAccess.ALLOWED) {
+ return false;
+ }
+
+ if (requireCarsAllowed && trip.getCarsAllowed() != CarAccess.ALLOWED) {
+ return false;
}
if (wheelchairEnabled) {
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripPatternForDates.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripPatternForDates.java
index 0fb39b227ea..a94aa0850ba 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripPatternForDates.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripPatternForDates.java
@@ -2,7 +2,6 @@
import java.util.BitSet;
import java.util.function.IntUnaryOperator;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripPattern;
import org.opentripplanner.raptor.api.model.SearchDirection;
import org.opentripplanner.raptor.spi.IntIterator;
@@ -18,6 +17,7 @@
import org.opentripplanner.transit.model.basic.Accessibility;
import org.opentripplanner.transit.model.network.Route;
import org.opentripplanner.transit.model.network.RoutingTripPattern;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* A collection of all the TripSchedules active on a range of consecutive days. The outer list of
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleAlightSearch.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleAlightSearch.java
index 5ece76aedb5..628a16511ce 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleAlightSearch.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleAlightSearch.java
@@ -2,13 +2,13 @@
import java.util.function.IntUnaryOperator;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorTransferConstraint;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.model.SearchDirection;
import org.opentripplanner.raptor.spi.RaptorBoardOrAlightEvent;
import org.opentripplanner.raptor.spi.RaptorTripScheduleSearch;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The purpose of this class is to optimize the search for a trip schedule for a given pattern and
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleBoardSearch.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleBoardSearch.java
index 4ec306f84b3..7bd5062d8dc 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleBoardSearch.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleBoardSearch.java
@@ -1,13 +1,13 @@
package org.opentripplanner.routing.algorithm.raptoradapter.transit.request;
import java.util.function.IntUnaryOperator;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorTransferConstraint;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.model.SearchDirection;
import org.opentripplanner.raptor.spi.RaptorBoardOrAlightEvent;
import org.opentripplanner.raptor.spi.RaptorTripScheduleSearch;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The purpose of this class is to optimize the search for a trip schedule for a given pattern and
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleWithOffset.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleWithOffset.java
index aca998b24ca..d692f0079f6 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleWithOffset.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripScheduleWithOffset.java
@@ -2,7 +2,6 @@
import java.time.LocalDate;
import java.util.function.IntUnaryOperator;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripPattern;
import org.opentripplanner.raptor.spi.IntIterator;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripPatternForDate;
@@ -10,6 +9,7 @@
import org.opentripplanner.transit.model.basic.Accessibility;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.timetable.TripTimes;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This represents a single trip within a TripPattern, but with a time offset in seconds. This is
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/OptimizeTransferService.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/OptimizeTransferService.java
index 8a4f25d8910..4d8a79b3f4f 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/OptimizeTransferService.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/OptimizeTransferService.java
@@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.opentripplanner.framework.logging.Throttle;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.path.RaptorPath;
import org.opentripplanner.routing.algorithm.raptoradapter.path.PathDiff;
@@ -11,6 +10,7 @@
import org.opentripplanner.routing.algorithm.transferoptimization.model.MinSafeTransferTimeCalculator;
import org.opentripplanner.routing.algorithm.transferoptimization.model.TransferWaitTimeCostCalculator;
import org.opentripplanner.routing.algorithm.transferoptimization.services.OptimizePathDomainService;
+import org.opentripplanner.utils.logging.Throttle;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/BasicStopTime.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/BasicStopTime.java
index 9d073b2ae64..5fd9e73e398 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/BasicStopTime.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/BasicStopTime.java
@@ -1,7 +1,7 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ValueObjectToStringBuilder;
+import org.opentripplanner.utils.tostring.ValueObjectToStringBuilder;
/** Basic stop and time value object. */
final class BasicStopTime implements StopTime {
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/MinSafeTransferTimeCalculator.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/MinSafeTransferTimeCalculator.java
index 49b3c29559e..fde6b3d4a64 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/MinSafeTransferTimeCalculator.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/MinSafeTransferTimeCalculator.java
@@ -1,14 +1,14 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model;
-import static org.opentripplanner.framework.time.DurationUtils.durationInSeconds;
+import static org.opentripplanner.utils.time.DurationUtils.durationInSeconds;
import java.util.Collection;
import java.util.function.ToIntFunction;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.path.RaptorPath;
import org.opentripplanner.raptor.api.path.TransitPathLeg;
import org.opentripplanner.raptor.spi.RaptorSlackProvider;
+import org.opentripplanner.utils.lang.IntUtils;
/**
* This is a calculator to calculate a min-safe-transfer-time. The min-safe-transfer-time is used to
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/OptimizedPathTail.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/OptimizedPathTail.java
index b36a7d6ebfd..efe53d8e090 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/OptimizedPathTail.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/OptimizedPathTail.java
@@ -1,7 +1,6 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ValueObjectToStringBuilder;
import org.opentripplanner.model.transfer.TransferConstraint;
import org.opentripplanner.raptor.api.model.RaptorConstants;
import org.opentripplanner.raptor.api.model.RaptorStopNameResolver;
@@ -16,6 +15,7 @@
import org.opentripplanner.raptor.spi.RaptorSlackProvider;
import org.opentripplanner.routing.algorithm.transferoptimization.api.OptimizedPath;
import org.opentripplanner.routing.algorithm.transferoptimization.api.TransferOptimized;
+import org.opentripplanner.utils.tostring.ValueObjectToStringBuilder;
/**
* This class is used to decorate a {@link TransitPathLeg} with information about transfers
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/StopPriorityCostCalculator.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/StopPriorityCostCalculator.java
index 48a4b733b58..6ea660e654f 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/StopPriorityCostCalculator.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/StopPriorityCostCalculator.java
@@ -1,7 +1,7 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.TransitLayer;
+import org.opentripplanner.utils.lang.IntUtils;
/**
* This class calculates an extra stop priority cost by using the stop-board-alight-transfer-cost
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripStopTime.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripStopTime.java
index 75fd589a45b..27299e407f4 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripStopTime.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripStopTime.java
@@ -1,8 +1,8 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ValueObjectToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.utils.tostring.ValueObjectToStringBuilder;
/**
* @param The TripSchedule type defined by the user of the raptor API.
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripToTripTransfer.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripToTripTransfer.java
index 0dce8933e3f..2aa13d0cd16 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripToTripTransfer.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripToTripTransfer.java
@@ -1,10 +1,10 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.transfer.ConstrainedTransfer;
import org.opentripplanner.raptor.api.model.RaptorTransfer;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* @param The TripSchedule type defined by the user of the raptor API.
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/costfilter/MinCostPathTailFilter.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/costfilter/MinCostPathTailFilter.java
index 8de4c8fa847..6b8dbef7f4e 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/costfilter/MinCostPathTailFilter.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/costfilter/MinCostPathTailFilter.java
@@ -4,10 +4,10 @@
import java.util.List;
import java.util.Set;
import java.util.function.ToIntFunction;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.routing.algorithm.transferoptimization.model.OptimizedPathTail;
import org.opentripplanner.routing.algorithm.transferoptimization.model.PathTailFilter;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This class takes a list of "cost functions" and creates a filter chain for them. The precedence
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughPathTailFilter.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughPathTailFilter.java
index 46b1a9020b0..bff656bb940 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughPathTailFilter.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughPathTailFilter.java
@@ -7,11 +7,11 @@
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.request.PassThroughPoint;
import org.opentripplanner.routing.algorithm.transferoptimization.model.OptimizedPathTail;
import org.opentripplanner.routing.algorithm.transferoptimization.model.PathTailFilter;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Create a filter chain function and find the best combination of transfers for the journey
diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransitPathLegSelector.java b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransitPathLegSelector.java
index 9e0a4257f57..646939a9ac5 100644
--- a/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransitPathLegSelector.java
+++ b/application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransitPathLegSelector.java
@@ -2,10 +2,10 @@
import java.util.HashSet;
import java.util.Set;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.routing.algorithm.transferoptimization.model.OptimizedPathTail;
import org.opentripplanner.routing.algorithm.transferoptimization.model.PathTailFilter;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This class takes a list of transit legs and returns the best leg based on the {@link
diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java
index 465ed230884..14dc7ade982 100644
--- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java
+++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java
@@ -16,7 +16,6 @@
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.model.Timetable;
import org.opentripplanner.model.TripTimeOnDate;
import org.opentripplanner.model.plan.Leg;
@@ -29,6 +28,7 @@
import org.opentripplanner.transit.model.timetable.TripOnServiceDate;
import org.opentripplanner.transit.model.timetable.TripTimes;
import org.opentripplanner.transit.service.TransitService;
+import org.opentripplanner.utils.time.ServiceDateUtils;
/**
* A helper class to fetch previous/next alternative legs for a scheduled transit leg.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/DebugRaptor.java b/application/src/main/java/org/opentripplanner/routing/api/request/DebugRaptor.java
index 0b9ff4f0c30..a0d7bd6de2e 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/DebugRaptor.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/DebugRaptor.java
@@ -9,7 +9,7 @@
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/RequestModes.java b/application/src/main/java/org/opentripplanner/routing/api/request/RequestModes.java
index 8afb3082e1b..f10686216a8 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/RequestModes.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/RequestModes.java
@@ -3,7 +3,7 @@
import static org.opentripplanner.routing.api.request.StreetMode.NOT_SET;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class RequestModes {
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java b/application/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java
index 56ba39d8431..8e649b3be49 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java
@@ -1,6 +1,6 @@
package org.opentripplanner.routing.api.request;
-import static org.opentripplanner.framework.time.DurationUtils.durationInSeconds;
+import static org.opentripplanner.utils.time.DurationUtils.durationInSeconds;
import java.io.Serializable;
import java.time.Duration;
@@ -11,11 +11,9 @@
import java.util.Collections;
import java.util.List;
import java.util.Locale;
+import java.util.Objects;
import java.util.function.Consumer;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.collection.ListSection;
-import org.opentripplanner.framework.time.DateUtils;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.GenericLocation;
import org.opentripplanner.model.plan.SortOrder;
import org.opentripplanner.model.plan.paging.cursor.PageCursor;
@@ -26,6 +24,11 @@
import org.opentripplanner.routing.api.response.RoutingError;
import org.opentripplanner.routing.api.response.RoutingErrorCode;
import org.opentripplanner.routing.error.RoutingValidationException;
+import org.opentripplanner.standalone.config.routerconfig.TransitRoutingConfig;
+import org.opentripplanner.utils.collection.ListSection;
+import org.opentripplanner.utils.lang.ObjectUtils;
+import org.opentripplanner.utils.time.DateUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -332,12 +335,25 @@ private boolean hasMaxSearchWindow() {
return maxSearchWindow != null;
}
+ /**
+ * For testing only. Use {@link TransitRoutingConfig#maxSearchWindow()} instead.
+ * @see #initMaxSearchWindow(Duration)
+ */
public Duration maxSearchWindow() {
return maxSearchWindow;
}
- public void setMaxSearchWindow(@Nullable Duration maxSearchWindow) {
- this.maxSearchWindow = maxSearchWindow;
+ /**
+ * Initialize the maxSearchWindow from the transit config. This is necessary because the
+ * default route request is configured before the {@link TransitRoutingConfig}.
+ */
+ public void initMaxSearchWindow(Duration maxSearchWindow) {
+ this.maxSearchWindow =
+ ObjectUtils.requireNotInitialized(
+ "maxSearchWindow",
+ this.maxSearchWindow,
+ Objects.requireNonNull(maxSearchWindow)
+ );
}
public Locale locale() {
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/StreetMode.java b/application/src/main/java/org/opentripplanner/routing/api/request/StreetMode.java
index 56e716d9d62..cbc2764f030 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/StreetMode.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/StreetMode.java
@@ -36,10 +36,8 @@ public enum StreetMode implements DocumentedEnum {
SCOOTER_RENTAL(Feature.ACCESS, Feature.EGRESS, Feature.WALKING, Feature.SCOOTER, Feature.RENTING),
/**
* Car only
- *
- * Direct mode only.
*/
- CAR(Feature.ACCESS, Feature.DRIVING),
+ CAR(Feature.ACCESS, Feature.TRANSFER, Feature.EGRESS, Feature.DRIVING),
/**
* Start in the car, drive to a parking area, and walk the rest of the way.
*
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/framework/DurationForEnum.java b/application/src/main/java/org/opentripplanner/routing/api/request/framework/DurationForEnum.java
index e6dacaac19d..c6586aa8b0f 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/framework/DurationForEnum.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/framework/DurationForEnum.java
@@ -7,7 +7,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
-import org.opentripplanner.framework.tostring.ValueObjectToStringBuilder;
+import org.opentripplanner.utils.tostring.ValueObjectToStringBuilder;
/**
* This class is used to store a {@link Duration} value for each of the enum type values.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/framework/LinearFunctionSerialization.java b/application/src/main/java/org/opentripplanner/routing/api/request/framework/LinearFunctionSerialization.java
index cb9dfb5c4cc..a6c846ccb35 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/framework/LinearFunctionSerialization.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/framework/LinearFunctionSerialization.java
@@ -7,10 +7,10 @@
import java.util.function.BiFunction;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.opentripplanner.framework.lang.IntUtils;
-import org.opentripplanner.framework.lang.StringUtils;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.lang.IntUtils;
+import org.opentripplanner.utils.lang.StringUtils;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* This class can serialize and parse a linear function of time/duration/cost on the form
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/framework/TimeAndCostPenaltyForEnum.java b/application/src/main/java/org/opentripplanner/routing/api/request/framework/TimeAndCostPenaltyForEnum.java
index 2f439801cb5..ace9b813937 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/framework/TimeAndCostPenaltyForEnum.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/framework/TimeAndCostPenaltyForEnum.java
@@ -7,7 +7,7 @@
import java.util.Objects;
import java.util.function.Consumer;
import org.opentripplanner.framework.model.TimeAndCost;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* A map of {@link TimeAndCost} indexed by enum type {@code T}.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/framework/TimePenalty.java b/application/src/main/java/org/opentripplanner/routing/api/request/framework/TimePenalty.java
index 3ee07034135..99643b69d02 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/framework/TimePenalty.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/framework/TimePenalty.java
@@ -1,8 +1,8 @@
package org.opentripplanner.routing.api.request.framework;
import java.time.Duration;
-import org.opentripplanner.framework.lang.StringUtils;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.lang.StringUtils;
+import org.opentripplanner.utils.time.DurationUtils;
public final class TimePenalty extends AbstractLinearFunction {
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/AccessEgressPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/AccessEgressPreferences.java
index 9998f0a3b1c..42925339fd1 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/AccessEgressPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/AccessEgressPreferences.java
@@ -7,12 +7,12 @@
import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.StreetMode;
import org.opentripplanner.routing.api.request.framework.DurationForEnum;
import org.opentripplanner.routing.api.request.framework.TimeAndCostPenalty;
import org.opentripplanner.routing.api.request.framework.TimeAndCostPenaltyForEnum;
import org.opentripplanner.routing.api.request.framework.TimePenalty;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Preferences for access/egress routing on street network
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/AccessibilityPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/AccessibilityPreferences.java
index 303bda51858..d4d232ab3f6 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/AccessibilityPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/AccessibilityPreferences.java
@@ -3,7 +3,7 @@
import java.util.Objects;
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Cost;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Preferences for how to treat trips or stops with accessibility restrictions, like wheelchair
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/BikePreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/BikePreferences.java
index 5767b74eaa8..038d6c140da 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/BikePreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/BikePreferences.java
@@ -1,17 +1,17 @@
package org.opentripplanner.routing.api.request.preference;
-import static org.opentripplanner.framework.lang.DoubleUtils.doubleEquals;
-import static org.opentripplanner.framework.lang.ObjectUtils.ifNotNull;
import static org.opentripplanner.routing.core.VehicleRoutingOptimizeType.SAFE_STREETS;
import static org.opentripplanner.routing.core.VehicleRoutingOptimizeType.TRIANGLE;
+import static org.opentripplanner.utils.lang.DoubleUtils.doubleEquals;
+import static org.opentripplanner.utils.lang.ObjectUtils.ifNotNull;
import java.io.Serializable;
import java.util.Objects;
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.core.VehicleRoutingOptimizeType;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The bike preferences contain all speed, reluctance, cost and factor preferences for biking
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/CarPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/CarPreferences.java
index cc9b7ba62d8..3ea3634c623 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/CarPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/CarPreferences.java
@@ -1,15 +1,15 @@
package org.opentripplanner.routing.api.request.preference;
-import static org.opentripplanner.framework.lang.ObjectUtils.ifNotNull;
+import static org.opentripplanner.utils.lang.ObjectUtils.ifNotNull;
import java.io.Serializable;
import java.time.Duration;
import java.util.Objects;
import java.util.function.Consumer;
-import org.opentripplanner.framework.lang.DoubleUtils;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.lang.DoubleUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The car preferences contain all speed, reluctance, cost and factor preferences for driving
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/ElevatorPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/ElevatorPreferences.java
index 7ee6409d7b7..7e5e55d6263 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/ElevatorPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/ElevatorPreferences.java
@@ -5,7 +5,7 @@
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* TODO: how long does it /really/ take to an elevator?
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/ItineraryFilterPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/ItineraryFilterPreferences.java
index 31fa7edd139..f18cf5ce9c1 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/ItineraryFilterPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/ItineraryFilterPreferences.java
@@ -4,9 +4,9 @@
import java.util.Objects;
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.algorithm.filterchain.api.TransitGeneralizedCostFilterParams;
import org.opentripplanner.routing.api.request.framework.CostLinearFunction;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Group by Similarity filter parameters. See the configuration for documentation of each field.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/RaptorPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/RaptorPreferences.java
index 03ed9482ff8..e9318bc8dc3 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/RaptorPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/RaptorPreferences.java
@@ -11,10 +11,10 @@
import java.util.function.Consumer;
import javax.annotation.Nullable;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.SearchDirection;
import org.opentripplanner.raptor.api.request.Optimization;
import org.opentripplanner.raptor.api.request.RaptorProfile;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Set of optimizations to use with Raptor. These are available here for testing purposes.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/Relax.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/Relax.java
index 8f10ffd1525..a5e61325483 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/Relax.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/Relax.java
@@ -1,8 +1,8 @@
package org.opentripplanner.routing.api.request.preference;
import java.util.Locale;
-import org.opentripplanner.framework.lang.DoubleUtils;
-import org.opentripplanner.framework.lang.IntUtils;
+import org.opentripplanner.utils.lang.DoubleUtils;
+import org.opentripplanner.utils.lang.IntUtils;
/**
* Relax a value by the given ratio and slack. The relaxed value
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/RoutingPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/RoutingPreferences.java
index 5e5475d12ac..5eccc970101 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/RoutingPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/RoutingPreferences.java
@@ -1,7 +1,7 @@
package org.opentripplanner.routing.api.request.preference;
import static java.util.Objects.requireNonNull;
-import static org.opentripplanner.framework.lang.ObjectUtils.ifNotNull;
+import static org.opentripplanner.utils.lang.ObjectUtils.ifNotNull;
import java.io.Serializable;
import java.util.Objects;
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/ScooterPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/ScooterPreferences.java
index 1d5cf83a54b..6a20cbcd293 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/ScooterPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/ScooterPreferences.java
@@ -1,16 +1,16 @@
package org.opentripplanner.routing.api.request.preference;
-import static org.opentripplanner.framework.lang.DoubleUtils.doubleEquals;
-import static org.opentripplanner.framework.lang.ObjectUtils.ifNotNull;
import static org.opentripplanner.routing.core.VehicleRoutingOptimizeType.SAFE_STREETS;
import static org.opentripplanner.routing.core.VehicleRoutingOptimizeType.TRIANGLE;
+import static org.opentripplanner.utils.lang.DoubleUtils.doubleEquals;
+import static org.opentripplanner.utils.lang.ObjectUtils.ifNotNull;
import java.io.Serializable;
import java.util.Objects;
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.core.VehicleRoutingOptimizeType;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The scooter preferences contain all speed, reluctance, cost and factor preferences for scooter
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/StreetPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/StreetPreferences.java
index 166c950a0e7..bb526ceaa31 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/StreetPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/StreetPreferences.java
@@ -1,7 +1,6 @@
package org.opentripplanner.routing.api.request.preference;
import static java.time.Duration.ofHours;
-import static java.time.Duration.ofMinutes;
import static java.util.Objects.requireNonNull;
import java.io.Serializable;
@@ -9,14 +8,13 @@
import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
-import org.opentripplanner.framework.lang.DoubleUtils;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.StreetMode;
import org.opentripplanner.routing.api.request.framework.DurationForEnum;
-import org.opentripplanner.routing.api.request.framework.TimeAndCostPenalty;
import org.opentripplanner.street.search.intersection_model.DrivingDirection;
import org.opentripplanner.street.search.intersection_model.IntersectionTraversalModel;
+import org.opentripplanner.utils.lang.DoubleUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This class holds preferences for street routing in general, not mode specific.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/SystemPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/SystemPreferences.java
index 442ab33434a..f35a65c2f03 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/SystemPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/SystemPreferences.java
@@ -9,8 +9,8 @@
import java.util.Set;
import java.util.function.Consumer;
import org.opentripplanner.ext.dataoverlay.api.DataOverlayParameters;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.RoutingTag;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Configure system related features - a system feature is a non-functional feature. It
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TimeSlopeSafetyTriangle.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TimeSlopeSafetyTriangle.java
index ae4f1039f32..cca9105f112 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TimeSlopeSafetyTriangle.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TimeSlopeSafetyTriangle.java
@@ -1,7 +1,7 @@
package org.opentripplanner.routing.api.request.preference;
-import static org.opentripplanner.framework.lang.DoubleUtils.doubleEquals;
-import static org.opentripplanner.framework.lang.DoubleUtils.roundTo2Decimals;
+import static org.opentripplanner.utils.lang.DoubleUtils.doubleEquals;
+import static org.opentripplanner.utils.lang.DoubleUtils.roundTo2Decimals;
/**
* Sets the (bicycle or scooter) triangle routing parameters -- the relative importance of safety,
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransferOptimizationPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransferOptimizationPreferences.java
index 41a1954603b..7ba6e609ce9 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransferOptimizationPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransferOptimizationPreferences.java
@@ -1,13 +1,13 @@
package org.opentripplanner.routing.api.request.preference;
-import static org.opentripplanner.framework.lang.DoubleUtils.doubleEquals;
+import static org.opentripplanner.utils.lang.DoubleUtils.doubleEquals;
import java.io.Serializable;
import java.util.Objects;
import org.opentripplanner.framework.application.OTPFeature;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.algorithm.transferoptimization.api.TransferOptimizationParameters;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* See {@link TransferOptimizationParameters} for documentation on this class.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransferPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransferPreferences.java
index 464b9872bdd..f996dd5e6f4 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransferPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransferPreferences.java
@@ -1,7 +1,7 @@
package org.opentripplanner.routing.api.request.preference;
import static java.util.Objects.requireNonNull;
-import static org.opentripplanner.framework.lang.DoubleUtils.doubleEquals;
+import static org.opentripplanner.utils.lang.DoubleUtils.doubleEquals;
import java.io.Serializable;
import java.time.Duration;
@@ -9,9 +9,9 @@
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.algorithm.transferoptimization.api.TransferOptimizationParameters;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Parameters for doing transfers between transit legs.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransitPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransitPreferences.java
index 78f30277e72..f15b47216e5 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransitPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransitPreferences.java
@@ -7,10 +7,10 @@
import java.util.Objects;
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Cost;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.framework.CostLinearFunction;
import org.opentripplanner.routing.api.request.framework.DurationForEnum;
import org.opentripplanner.transit.model.basic.TransitMode;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Preferences for transit routing.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleParkingPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleParkingPreferences.java
index f7183812c3a..732171c7b80 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleParkingPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleParkingPreferences.java
@@ -7,9 +7,9 @@
import java.util.Set;
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Cost;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.preference.filter.VehicleParkingFilter;
import org.opentripplanner.routing.api.request.preference.filter.VehicleParkingSelect;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The parking preferences contain preferences for car and bicycle parking. These preferences
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleRentalPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleRentalPreferences.java
index 6c9bbfea875..4c00014f30d 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleRentalPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleRentalPreferences.java
@@ -7,7 +7,7 @@
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Preferences for renting a Bike, Car or other type of vehicle.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleWalkingPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleWalkingPreferences.java
index b7adc04df1c..50b3735a85d 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleWalkingPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/VehicleWalkingPreferences.java
@@ -6,7 +6,7 @@
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Preferences for walking a vehicle.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/WalkPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/WalkPreferences.java
index 8e5061d752b..4a5969049ba 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/WalkPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/WalkPreferences.java
@@ -1,13 +1,13 @@
package org.opentripplanner.routing.api.request.preference;
-import static org.opentripplanner.framework.lang.DoubleUtils.doubleEquals;
+import static org.opentripplanner.utils.lang.DoubleUtils.doubleEquals;
import java.io.Serializable;
import java.util.Objects;
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The walk preferences contain all speed, reluctance, cost and factor preferences for walking
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/WheelchairPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/WheelchairPreferences.java
index 737c5057943..d8a53d8e098 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/WheelchairPreferences.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/WheelchairPreferences.java
@@ -6,7 +6,7 @@
import java.util.Objects;
import java.util.function.Consumer;
import org.opentripplanner.framework.model.Units;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* See the configuration for documentation of each field.
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingFilter.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingFilter.java
index 3fb6d6b0a62..5f34dc4e1a7 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingFilter.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingFilter.java
@@ -4,8 +4,8 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.vehicle_parking.VehicleParking;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* A filter class that checks if parking faclities match certain conditions for
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/SelectRequest.java b/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/SelectRequest.java
index a1610ed8947..8ae98b8dfc9 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/SelectRequest.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/SelectRequest.java
@@ -4,12 +4,12 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.modes.AllowTransitModeFilter;
import org.opentripplanner.transit.model.basic.MainAndSubMode;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.timetable.TripTimes;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class SelectRequest implements Serializable {
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/TransitFilterRequest.java b/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/TransitFilterRequest.java
index 38f79b82baa..6380ace7c83 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/TransitFilterRequest.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/TransitFilterRequest.java
@@ -5,9 +5,9 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.timetable.TripTimes;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class TransitFilterRequest implements Serializable, TransitFilter {
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/TransitGroupSelect.java b/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/TransitGroupSelect.java
index dfa5daa0e31..caa8c9e0d65 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/TransitGroupSelect.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/request/filter/TransitGroupSelect.java
@@ -5,9 +5,9 @@
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.transit.model.basic.TransitMode;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Select a given set of transit routes base on the list of
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/via/PassThroughViaLocation.java b/application/src/main/java/org/opentripplanner/routing/api/request/via/PassThroughViaLocation.java
index aa75a634004..9da6ae5cd23 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/via/PassThroughViaLocation.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/via/PassThroughViaLocation.java
@@ -2,8 +2,8 @@
import java.util.Collection;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* One of the listed stop locations or one of its children must be visited. An on-board
diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/via/VisitViaLocation.java b/application/src/main/java/org/opentripplanner/routing/api/request/via/VisitViaLocation.java
index 096fbfabc0b..550b1646aeb 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/request/via/VisitViaLocation.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/request/via/VisitViaLocation.java
@@ -5,9 +5,9 @@
import java.util.Objects;
import javax.annotation.Nullable;
import org.opentripplanner.framework.geometry.WgsCoordinate;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* A visit-via-location is a physical visit to one of the stops or coordinates listed. An on-board
diff --git a/application/src/main/java/org/opentripplanner/routing/api/response/RoutingError.java b/application/src/main/java/org/opentripplanner/routing/api/response/RoutingError.java
index 2c948e1777c..d5c8173f09e 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/response/RoutingError.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/response/RoutingError.java
@@ -1,7 +1,7 @@
package org.opentripplanner.routing.api.response;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class RoutingError {
diff --git a/application/src/main/java/org/opentripplanner/routing/api/response/RoutingResponse.java b/application/src/main/java/org/opentripplanner/routing/api/response/RoutingResponse.java
index f7bcaca72e2..fe9f6457cf4 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/response/RoutingResponse.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/response/RoutingResponse.java
@@ -1,10 +1,10 @@
package org.opentripplanner.routing.api.response;
import java.util.List;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.plan.TripPlan;
import org.opentripplanner.model.plan.paging.cursor.PageCursor;
import org.opentripplanner.routing.framework.DebugTimingAggregator;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class RoutingResponse {
diff --git a/application/src/main/java/org/opentripplanner/routing/api/response/TripSearchMetadata.java b/application/src/main/java/org/opentripplanner/routing/api/response/TripSearchMetadata.java
index a5eb5842f23..704a1cb8e18 100644
--- a/application/src/main/java/org/opentripplanner/routing/api/response/TripSearchMetadata.java
+++ b/application/src/main/java/org/opentripplanner/routing/api/response/TripSearchMetadata.java
@@ -4,7 +4,7 @@
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Meta-data about the trip search performed.
diff --git a/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java b/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java
index e7e0c3248e8..0843124131b 100644
--- a/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java
+++ b/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java
@@ -21,8 +21,6 @@
import org.opentripplanner.ext.stopconsolidation.StopConsolidationRepository;
import org.opentripplanner.framework.application.OtpAppException;
import org.opentripplanner.framework.geometry.CompactElevationProfile;
-import org.opentripplanner.framework.lang.OtpNumberFormat;
-import org.opentripplanner.framework.logging.ProgressTracker;
import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary;
import org.opentripplanner.model.projectinfo.GraphFileHeader;
import org.opentripplanner.model.projectinfo.OtpProjectInfo;
@@ -36,6 +34,8 @@
import org.opentripplanner.transit.model.basic.SubMode;
import org.opentripplanner.transit.model.network.RoutingTripPattern;
import org.opentripplanner.transit.service.TimetableRepository;
+import org.opentripplanner.utils.lang.OtpNumberFormat;
+import org.opentripplanner.utils.logging.ProgressTracker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/graph/index/StreetIndex.java b/application/src/main/java/org/opentripplanner/routing/graph/index/StreetIndex.java
index 90294d554cc..b632cd5c3e9 100644
--- a/application/src/main/java/org/opentripplanner/routing/graph/index/StreetIndex.java
+++ b/application/src/main/java/org/opentripplanner/routing/graph/index/StreetIndex.java
@@ -19,7 +19,6 @@
import org.opentripplanner.framework.i18n.I18NString;
import org.opentripplanner.framework.i18n.LocalizedString;
import org.opentripplanner.framework.i18n.NonLocalizedString;
-import org.opentripplanner.framework.logging.ProgressTracker;
import org.opentripplanner.model.GenericLocation;
import org.opentripplanner.routing.api.request.StreetMode;
import org.opentripplanner.routing.graph.Graph;
@@ -42,6 +41,7 @@
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.site.RegularStop;
import org.opentripplanner.transit.service.SiteRepository;
+import org.opentripplanner.utils.logging.ProgressTracker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/graphfinder/PatternAtStop.java b/application/src/main/java/org/opentripplanner/routing/graphfinder/PatternAtStop.java
index a8602a77737..c06e8bbcf91 100644
--- a/application/src/main/java/org/opentripplanner/routing/graphfinder/PatternAtStop.java
+++ b/application/src/main/java/org/opentripplanner/routing/graphfinder/PatternAtStop.java
@@ -6,13 +6,13 @@
import java.util.Base64;
import java.util.List;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.TripTimeOnDate;
import org.opentripplanner.routing.stoptimes.ArrivalDeparture;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.site.StopLocation;
import org.opentripplanner.transit.service.TransitService;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* A reference to a pattern at a specific stop.
diff --git a/application/src/main/java/org/opentripplanner/routing/graphfinder/StopFinderTraverseVisitor.java b/application/src/main/java/org/opentripplanner/routing/graphfinder/StopFinderTraverseVisitor.java
index 5c75e8c9322..854e33831ae 100644
--- a/application/src/main/java/org/opentripplanner/routing/graphfinder/StopFinderTraverseVisitor.java
+++ b/application/src/main/java/org/opentripplanner/routing/graphfinder/StopFinderTraverseVisitor.java
@@ -4,11 +4,11 @@
import java.util.List;
import org.opentripplanner.astar.spi.SkipEdgeStrategy;
import org.opentripplanner.astar.spi.TraverseVisitor;
-import org.opentripplanner.framework.collection.ListUtils;
import org.opentripplanner.street.model.edge.Edge;
import org.opentripplanner.street.model.vertex.TransitStopVertex;
import org.opentripplanner.street.model.vertex.Vertex;
import org.opentripplanner.street.search.state.State;
+import org.opentripplanner.utils.collection.ListUtils;
/**
* A TraverseVisitor used in finding stops while walking the street graph.
diff --git a/application/src/main/java/org/opentripplanner/routing/service/DefaultRoutingService.java b/application/src/main/java/org/opentripplanner/routing/service/DefaultRoutingService.java
index 01736aac80e..5f654d39deb 100644
--- a/application/src/main/java/org/opentripplanner/routing/service/DefaultRoutingService.java
+++ b/application/src/main/java/org/opentripplanner/routing/service/DefaultRoutingService.java
@@ -3,7 +3,6 @@
import java.time.ZoneId;
import org.opentripplanner.framework.application.OTPRequestTimeoutException;
import org.opentripplanner.framework.time.ZoneIdFallback;
-import org.opentripplanner.framework.tostring.MultiLineToStringBuilder;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.routing.algorithm.RoutingWorker;
import org.opentripplanner.routing.algorithm.via.ViaRoutingWorker;
@@ -13,6 +12,7 @@
import org.opentripplanner.routing.api.response.RoutingResponse;
import org.opentripplanner.routing.api.response.ViaRoutingResponse;
import org.opentripplanner.standalone.api.OtpServerRequestContext;
+import org.opentripplanner.utils.tostring.MultiLineToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/routing/stoptimes/StopTimesHelper.java b/application/src/main/java/org/opentripplanner/routing/stoptimes/StopTimesHelper.java
index f11d92465a7..863e2fc6569 100644
--- a/application/src/main/java/org/opentripplanner/routing/stoptimes/StopTimesHelper.java
+++ b/application/src/main/java/org/opentripplanner/routing/stoptimes/StopTimesHelper.java
@@ -14,7 +14,6 @@
import java.util.Comparator;
import java.util.List;
import java.util.Queue;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.model.PickDrop;
import org.opentripplanner.model.StopTimesInPattern;
import org.opentripplanner.model.Timetable;
@@ -24,6 +23,7 @@
import org.opentripplanner.transit.model.timetable.Trip;
import org.opentripplanner.transit.model.timetable.TripTimes;
import org.opentripplanner.transit.service.TransitService;
+import org.opentripplanner.utils.time.ServiceDateUtils;
public class StopTimesHelper {
diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParking.java b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParking.java
index 098af909296..4e71ecd1c68 100644
--- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParking.java
+++ b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParking.java
@@ -9,10 +9,10 @@
import javax.annotation.Nullable;
import org.opentripplanner.framework.geometry.WgsCoordinate;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.calendar.openinghours.OHCalendar;
import org.opentripplanner.street.search.TraverseMode;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Vehicle parking locations, which may allow bicycle and/or car parking.
diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingEntrance.java b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingEntrance.java
index b91776b0265..f6bc584fb18 100644
--- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingEntrance.java
+++ b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingEntrance.java
@@ -5,9 +5,9 @@
import javax.annotation.Nullable;
import org.opentripplanner.framework.geometry.WgsCoordinate;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.street.model.vertex.StreetVertex;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class VehicleParkingEntrance implements Serializable {
diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroup.java b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroup.java
index 535f201a0de..74ffedc0dcb 100644
--- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroup.java
+++ b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroup.java
@@ -4,8 +4,8 @@
import javax.annotation.Nullable;
import org.opentripplanner.framework.geometry.WgsCoordinate;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Group of vehicle parking locations.
diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingSpaces.java b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingSpaces.java
index 8b21cc21f2c..eb50440651b 100644
--- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingSpaces.java
+++ b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingSpaces.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* The number of spaces by type. {@code null} if unknown.
diff --git a/application/src/main/java/org/opentripplanner/service/paging/PagingService.java b/application/src/main/java/org/opentripplanner/service/paging/PagingService.java
index 3aa8033105a..b9a11ab5ffa 100644
--- a/application/src/main/java/org/opentripplanner/service/paging/PagingService.java
+++ b/application/src/main/java/org/opentripplanner/service/paging/PagingService.java
@@ -5,7 +5,6 @@
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.SortOrder;
import org.opentripplanner.model.plan.paging.PagingSearchWindowAdjuster;
@@ -14,6 +13,7 @@
import org.opentripplanner.model.plan.paging.cursor.PageCursorInput;
import org.opentripplanner.model.plan.paging.cursor.PageType;
import org.opentripplanner.routing.api.response.TripSearchMetadata;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class PagingService {
diff --git a/application/src/main/java/org/opentripplanner/service/vehiclerental/model/VehicleRentalStation.java b/application/src/main/java/org/opentripplanner/service/vehiclerental/model/VehicleRentalStation.java
index d6e72023a31..ff17ee00593 100644
--- a/application/src/main/java/org/opentripplanner/service/vehiclerental/model/VehicleRentalStation.java
+++ b/application/src/main/java/org/opentripplanner/service/vehiclerental/model/VehicleRentalStation.java
@@ -9,10 +9,10 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.locationtech.jts.geom.Geometry;
-import org.opentripplanner.framework.collection.SetUtils;
import org.opentripplanner.framework.i18n.I18NString;
import org.opentripplanner.street.model.RentalFormFactor;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.collection.SetUtils;
/**
* Implements the {@link VehicleRentalPlace} class which contains Javadoc.
diff --git a/application/src/main/java/org/opentripplanner/service/worldenvelope/model/WorldEnvelope.java b/application/src/main/java/org/opentripplanner/service/worldenvelope/model/WorldEnvelope.java
index 27a1fb4d30f..55024b63982 100644
--- a/application/src/main/java/org/opentripplanner/service/worldenvelope/model/WorldEnvelope.java
+++ b/application/src/main/java/org/opentripplanner/service/worldenvelope/model/WorldEnvelope.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Optional;
import org.opentripplanner.framework.geometry.WgsCoordinate;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This class calculates borders of envelopes that can be also on 180th meridian.
diff --git a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java
index 7ec71e589c7..49b43856011 100644
--- a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java
+++ b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java
@@ -10,6 +10,7 @@
import org.opentripplanner.ext.flex.FlexParameters;
import org.opentripplanner.ext.geocoder.LuceneIndex;
import org.opentripplanner.ext.ridehailing.RideHailingService;
+import org.opentripplanner.ext.sorlandsbanen.SorlandsbanenNorwayService;
import org.opentripplanner.ext.stopconsolidation.StopConsolidationService;
import org.opentripplanner.framework.application.OTPFeature;
import org.opentripplanner.inspector.raster.TileRendererManager;
@@ -101,16 +102,10 @@ public interface OtpServerRequestContext {
List rideHailingServices();
- @Nullable
- StopConsolidationService stopConsolidationService();
-
StreetLimitationParametersService streetLimitationParametersService();
MeterRegistry meterRegistry();
- @Nullable
- EmissionsService emissionsService();
-
/** Inspector/debug services */
TileRendererManager tileRendererManager();
@@ -129,6 +124,8 @@ default GraphFinder graphFinder() {
VectorTileConfig vectorTileConfig();
+ /* Sandbox modules */
+
@Nullable
default DataOverlayContext dataOverlayContext(RouteRequest request) {
return OTPFeature.DataOverlay.isOnElseNull(() ->
@@ -139,6 +136,15 @@ default DataOverlayContext dataOverlayContext(RouteRequest request) {
);
}
+ @Nullable
+ EmissionsService emissionsService();
+
@Nullable
LuceneIndex lucenceIndex();
+
+ @Nullable
+ StopConsolidationService stopConsolidationService();
+
+ @Nullable
+ SorlandsbanenNorwayService sorlandsbanenService();
}
diff --git a/application/src/main/java/org/opentripplanner/standalone/config/BuildConfig.java b/application/src/main/java/org/opentripplanner/standalone/config/BuildConfig.java
index ef2931b987e..16c6f1e722c 100644
--- a/application/src/main/java/org/opentripplanner/standalone/config/BuildConfig.java
+++ b/application/src/main/java/org/opentripplanner/standalone/config/BuildConfig.java
@@ -23,7 +23,6 @@
import org.opentripplanner.ext.emissions.EmissionsConfig;
import org.opentripplanner.ext.fares.FaresConfiguration;
import org.opentripplanner.framework.geometry.CompactElevationProfile;
-import org.opentripplanner.framework.lang.ObjectUtils;
import org.opentripplanner.graph_builder.module.ned.parameter.DemExtractParameters;
import org.opentripplanner.graph_builder.module.ned.parameter.DemExtractParametersList;
import org.opentripplanner.graph_builder.module.osm.parameters.OsmExtractParameters;
@@ -46,6 +45,7 @@
import org.opentripplanner.standalone.config.framework.json.NodeAdapter;
import org.opentripplanner.standalone.config.sandbox.DataOverlayConfigMapper;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.lang.ObjectUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/standalone/config/RouterConfig.java b/application/src/main/java/org/opentripplanner/standalone/config/RouterConfig.java
index 55128af5659..cb00428284b 100644
--- a/application/src/main/java/org/opentripplanner/standalone/config/RouterConfig.java
+++ b/application/src/main/java/org/opentripplanner/standalone/config/RouterConfig.java
@@ -69,7 +69,7 @@ public RouterConfig(JsonNode node, String source, boolean logUnusedParams) {
this.transmodelApi = new TransmodelAPIConfig("transmodelApi", root);
this.routingRequestDefaults = mapDefaultRouteRequest("routingDefaults", root);
this.transitConfig = new TransitRoutingConfig("transit", root, routingRequestDefaults);
- this.routingRequestDefaults.setMaxSearchWindow(transitConfig.maxSearchWindow());
+ this.routingRequestDefaults.initMaxSearchWindow(transitConfig.maxSearchWindow());
this.updatersParameters = new UpdatersConfig(root);
this.rideHailingConfig = new RideHailingServicesConfig(root);
this.vectorTileConfig = VectorTileConfig.mapVectorTilesParameters(root, "vectorTiles");
diff --git a/application/src/main/java/org/opentripplanner/standalone/config/framework/json/ConfigType.java b/application/src/main/java/org/opentripplanner/standalone/config/framework/json/ConfigType.java
index fec5cb05a51..3796fcac645 100644
--- a/application/src/main/java/org/opentripplanner/standalone/config/framework/json/ConfigType.java
+++ b/application/src/main/java/org/opentripplanner/standalone/config/framework/json/ConfigType.java
@@ -6,9 +6,9 @@
import java.util.EnumSet;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.lang.StringUtils;
-import org.opentripplanner.framework.text.MarkdownFormatter;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.lang.StringUtils;
+import org.opentripplanner.utils.text.MarkdownFormatter;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* These are the types we support in the NodeAdaptor
diff --git a/application/src/main/java/org/opentripplanner/standalone/config/framework/json/EnumMapper.java b/application/src/main/java/org/opentripplanner/standalone/config/framework/json/EnumMapper.java
index c57220c41d5..c39c2ef7377 100644
--- a/application/src/main/java/org/opentripplanner/standalone/config/framework/json/EnumMapper.java
+++ b/application/src/main/java/org/opentripplanner/standalone/config/framework/json/EnumMapper.java
@@ -3,7 +3,7 @@
import java.util.Arrays;
import java.util.Optional;
import org.opentripplanner.framework.doc.DocumentedEnum;
-import org.opentripplanner.framework.lang.StringUtils;
+import org.opentripplanner.utils.lang.StringUtils;
/**
* This converts strings appearing in configuration files into enum values.
diff --git a/application/src/main/java/org/opentripplanner/standalone/config/framework/json/NodeInfo.java b/application/src/main/java/org/opentripplanner/standalone/config/framework/json/NodeInfo.java
index ce29639b924..b9db7fb75c8 100644
--- a/application/src/main/java/org/opentripplanner/standalone/config/framework/json/NodeInfo.java
+++ b/application/src/main/java/org/opentripplanner/standalone/config/framework/json/NodeInfo.java
@@ -6,8 +6,8 @@
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.lang.StringUtils;
-import org.opentripplanner.framework.tostring.ValueObjectToStringBuilder;
+import org.opentripplanner.utils.lang.StringUtils;
+import org.opentripplanner.utils.tostring.ValueObjectToStringBuilder;
/**
* Information about a configuration parameter.
diff --git a/application/src/main/java/org/opentripplanner/standalone/config/framework/json/ParameterBuilder.java b/application/src/main/java/org/opentripplanner/standalone/config/framework/json/ParameterBuilder.java
index 0afca602872..784d381a2e6 100644
--- a/application/src/main/java/org/opentripplanner/standalone/config/framework/json/ParameterBuilder.java
+++ b/application/src/main/java/org/opentripplanner/standalone/config/framework/json/ParameterBuilder.java
@@ -36,11 +36,11 @@
import java.util.function.Function;
import java.util.regex.Pattern;
import org.opentripplanner.framework.application.OtpAppException;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.LocalDateUtils;
import org.opentripplanner.routing.api.request.framework.CostLinearFunction;
import org.opentripplanner.routing.api.request.framework.TimePenalty;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.LocalDateUtils;
/**
* TODO RT_AB: add Javadoc to clarify whether this is building a declarative representation of the
diff --git a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/TransitRoutingConfig.java b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/TransitRoutingConfig.java
index 74dbfd4bab9..e6602a188f4 100644
--- a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/TransitRoutingConfig.java
+++ b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/TransitRoutingConfig.java
@@ -62,8 +62,8 @@ public TransitRoutingConfig(
.summary("This parameter is used to allocate enough memory space for Raptor.")
.description(
"""
-Set it to the maximum number of transfers for any given itinerary expected to be found within the
-entire transit network. The memory overhead of setting this higher than the maximum number of
+Set it to the maximum number of transfers for any given itinerary expected to be found within the
+entire transit network. The memory overhead of setting this higher than the maximum number of
transfers is very little so it is better to set it too high than to low.
"""
)
@@ -78,8 +78,8 @@ public TransitRoutingConfig(
.description(
"""
This reduce the number of trips departure time lookups and comparisons. When testing with data from
-Entur and all of Norway as a Graph, the optimal value was about 50. If you calculate the departure
-time every time or want to fine tune the performance, changing this may improve the performance a
+Entur and all of Norway as a Graph, the optimal value was about 50. If you calculate the departure
+time every time or want to fine tune the performance, changing this may improve the performance a
few percents.
"""
)
@@ -108,7 +108,7 @@ public TransitRoutingConfig(
.description(
"""
Use this parameter to set the total number of executable threads available across all searches.
-Multiple searches can run in parallel - this parameter have no effect with regard to that. If 0,
+Multiple searches can run in parallel - this parameter has no effect with regard to that. If 0,
no extra threads are started and the search is done in one thread.
"""
)
@@ -142,7 +142,7 @@ public TransitRoutingConfig(
| `recommended` | Use a small cost penalty like `60`. | int |
| `preferred` | The best place to do transfers. Should be set to `0`(zero). | int |
-Use values in a range from `0` to `100 000`. **All key/value pairs are required if the
+Use values in a range from `0` to `100 000`. **All key/value pairs are required if the
`stopBoardAlightDuringTransferCost` is listed.**
"""
)
@@ -166,7 +166,7 @@ public TransitRoutingConfig(
.summary("Routing requests to use for pre-filling the stop-to-stop transfer cache.")
.description(
"""
-If not set, the default behavior is to cache stop-to-stop transfers using the default route request
+If not set, the default behavior is to cache stop-to-stop transfers using the default route request
(`routingDefaults`). Use this to change the default or specify more than one `RouteRequest`.
**Example**
@@ -175,7 +175,7 @@ public TransitRoutingConfig(
// router-config.json
{
"transit": {
- "transferCacheRequests": [
+ "transferCacheRequests": [
{ "modes": "WALK" },
{ "modes": "WALK", "wheelchairAccessibility": { "enabled": true } }
]
@@ -201,7 +201,7 @@ public TransitRoutingConfig(
"""
The search window is expanded when the current page return few options. If ZERO result is returned
the first duration in the list is used, if ONE result is returned then the second duration is used
-and so on. The duration is added to the existing search-window and inserted into the next and
+and so on. The duration is added to the existing search-window and inserted into the next and
previous page cursor. See JavaDoc for [TransitTuningParameters#pagingSearchWindowAdjustments](https://github.com/opentripplanner/OpenTripPlanner/blob/dev-2.x/src/main/java/org/opentripplanner/routing/algorithm/raptor/transit/TransitTuningParameters.java)" +
for more info."
"""
@@ -366,7 +366,7 @@ heuristics perform a Raptor search (one-iteration) to find a trip which we use t
.summary("Upper limit for the search-window calculation.")
.description(
"""
-Long search windows consumes a lot of resources and may take a long time. Use this parameter to
+Long search windows consume a lot of resources and may take a long time. Use this parameter to
tune the desired maximum search time.
This is the parameter that affects the response time most, the downside is that a search is only
@@ -381,12 +381,12 @@ heuristics perform a Raptor search (one-iteration) to find a trip which we use t
.summary("Used to set the steps the search-window is rounded to.")
.description(
"""
-The search window is rounded off to the closest multiplication of `stepMinutes`. If `stepMinutes` =
+The search window is rounded off to the closest multiplication of `stepMinutes`. If `stepMinutes` =
10 minutes, the search-window can be 10, 20, 30 ... minutes. It the computed search-window is 5
minutes and 17 seconds it will be rounded up to 10 minutes.
-Use a value between `1` and `60`. This should be less than the `min-raptor-search-window`
+Use a value between `1` and `60`. This should be less than the `min-raptor-search-window`
coefficient.
"""
)
diff --git a/application/src/main/java/org/opentripplanner/standalone/config/routerequest/RouteRequestConfig.java b/application/src/main/java/org/opentripplanner/standalone/config/routerequest/RouteRequestConfig.java
index dc91388458a..d05aee96ccf 100644
--- a/application/src/main/java/org/opentripplanner/standalone/config/routerequest/RouteRequestConfig.java
+++ b/application/src/main/java/org/opentripplanner/standalone/config/routerequest/RouteRequestConfig.java
@@ -18,7 +18,6 @@
import java.util.stream.Collectors;
import org.opentripplanner.api.parameter.QualifiedModeSet;
import org.opentripplanner.framework.application.OTPFeature;
-import org.opentripplanner.framework.lang.StringUtils;
import org.opentripplanner.routing.api.request.RequestModes;
import org.opentripplanner.routing.api.request.RouteRequest;
import org.opentripplanner.routing.api.request.StreetMode;
@@ -35,6 +34,7 @@
import org.opentripplanner.standalone.config.framework.json.NodeAdapter;
import org.opentripplanner.standalone.config.sandbox.DataOverlayParametersMapper;
import org.opentripplanner.transit.model.basic.TransitMode;
+import org.opentripplanner.utils.lang.StringUtils;
public class RouteRequestConfig {
diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java
index 560f234187a..279c3c48368 100644
--- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java
+++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java
@@ -8,7 +8,6 @@
import org.opentripplanner.ext.stopconsolidation.StopConsolidationRepository;
import org.opentripplanner.framework.application.LogMDCSupport;
import org.opentripplanner.framework.application.OTPFeature;
-import org.opentripplanner.framework.logging.ProgressTracker;
import org.opentripplanner.graph_builder.GraphBuilder;
import org.opentripplanner.graph_builder.GraphBuilderDataSources;
import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary;
@@ -35,6 +34,7 @@
import org.opentripplanner.transit.service.DefaultTransitService;
import org.opentripplanner.transit.service.TimetableRepository;
import org.opentripplanner.updater.configure.UpdaterConfigurator;
+import org.opentripplanner.utils.logging.ProgressTracker;
import org.opentripplanner.visualizer.GraphVisualizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -175,7 +175,8 @@ private void setupTransitRoutingServer() {
TransmodelAPI.setUp(
routerConfig().transmodelApi(),
timetableRepository(),
- routerConfig().routingRequestDefaults()
+ routerConfig().routingRequestDefaults(),
+ routerConfig().transitTuningConfig()
);
}
diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java
index e828406a35e..7191b82e814 100644
--- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java
+++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java
@@ -10,6 +10,8 @@
import org.opentripplanner.ext.geocoder.configure.GeocoderModule;
import org.opentripplanner.ext.interactivelauncher.configuration.InteractiveLauncherModule;
import org.opentripplanner.ext.ridehailing.configure.RideHailingServicesModule;
+import org.opentripplanner.ext.sorlandsbanen.SorlandsbanenNorwayService;
+import org.opentripplanner.ext.sorlandsbanen.configure.SorlandsbanenNorwayModule;
import org.opentripplanner.ext.stopconsolidation.StopConsolidationRepository;
import org.opentripplanner.ext.stopconsolidation.configure.StopConsolidationServiceModule;
import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary;
@@ -55,6 +57,7 @@
ConstructApplicationModule.class,
RideHailingServicesModule.class,
EmissionsServiceModule.class,
+ SorlandsbanenNorwayModule.class,
StopConsolidationServiceModule.class,
InteractiveLauncherModule.class,
StreetLimitationParametersServiceModule.class,
@@ -90,6 +93,9 @@ public interface ConstructApplicationFactory {
StreetLimitationParameters streetLimitationParameters();
+ @Nullable
+ SorlandsbanenNorwayService enturSorlandsbanenService();
+
@Nullable
LuceneIndex luceneIndex();
diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java
index 6c830054c49..ab0f242f834 100644
--- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java
+++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java
@@ -10,6 +10,7 @@
import org.opentripplanner.ext.geocoder.LuceneIndex;
import org.opentripplanner.ext.interactivelauncher.api.LauncherRequestDecorator;
import org.opentripplanner.ext.ridehailing.RideHailingService;
+import org.opentripplanner.ext.sorlandsbanen.SorlandsbanenNorwayService;
import org.opentripplanner.ext.stopconsolidation.StopConsolidationService;
import org.opentripplanner.raptor.configure.RaptorConfig;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripSchedule;
@@ -41,6 +42,7 @@ OtpServerRequestContext providesServerContext(
StreetLimitationParametersService streetLimitationParametersService,
@Nullable TraverseVisitor, ?> traverseVisitor,
EmissionsService emissionsService,
+ @Nullable SorlandsbanenNorwayService sorlandsbanenService,
LauncherRequestDecorator launcherRequestDecorator,
@Nullable LuceneIndex luceneIndex
) {
@@ -58,6 +60,7 @@ OtpServerRequestContext providesServerContext(
realtimeVehicleService,
vehicleRentalService,
emissionsService,
+ sorlandsbanenService,
routerConfig.flexParameters(),
rideHailingServices,
stopConsolidationService,
diff --git a/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java b/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java
index 0e81193d787..9f38db5c420 100644
--- a/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java
+++ b/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java
@@ -9,6 +9,7 @@
import org.opentripplanner.ext.flex.FlexParameters;
import org.opentripplanner.ext.geocoder.LuceneIndex;
import org.opentripplanner.ext.ridehailing.RideHailingService;
+import org.opentripplanner.ext.sorlandsbanen.SorlandsbanenNorwayService;
import org.opentripplanner.ext.stopconsolidation.StopConsolidationService;
import org.opentripplanner.inspector.raster.TileRendererManager;
import org.opentripplanner.raptor.api.request.RaptorTuningParameters;
@@ -33,7 +34,6 @@
public class DefaultServerRequestContext implements OtpServerRequestContext {
private final List rideHailingServices;
- private RouteRequest routeRequest = null;
private final Graph graph;
private final TransitService transitService;
private final TransitRoutingConfig transitRoutingConfig;
@@ -48,10 +48,16 @@ public class DefaultServerRequestContext implements OtpServerRequestContext {
private final RealtimeVehicleService realtimeVehicleService;
private final VehicleRentalService vehicleRentalService;
private final EmissionsService emissionsService;
+
+ @Nullable
+ private final SorlandsbanenNorwayService sorlandsbanenService;
+
private final StopConsolidationService stopConsolidationService;
private final StreetLimitationParametersService streetLimitationParametersService;
private final LuceneIndex luceneIndex;
+ private RouteRequest defaultRouteRequestWithTimeSet = null;
+
/**
* Make sure all mutable components are copied/cloned before calling this constructor.
*/
@@ -67,12 +73,13 @@ private DefaultServerRequestContext(
WorldEnvelopeService worldEnvelopeService,
RealtimeVehicleService realtimeVehicleService,
VehicleRentalService vehicleRentalService,
- EmissionsService emissionsService,
+ @Nullable EmissionsService emissionsService,
+ @Nullable SorlandsbanenNorwayService sorlandsbanenService,
List rideHailingServices,
- StopConsolidationService stopConsolidationService,
+ @Nullable StopConsolidationService stopConsolidationService,
StreetLimitationParametersService streetLimitationParametersService,
FlexParameters flexParameters,
- TraverseVisitor traverseVisitor,
+ @Nullable TraverseVisitor traverseVisitor,
@Nullable LuceneIndex luceneIndex
) {
this.graph = graph;
@@ -90,6 +97,7 @@ private DefaultServerRequestContext(
this.realtimeVehicleService = realtimeVehicleService;
this.rideHailingServices = rideHailingServices;
this.emissionsService = emissionsService;
+ this.sorlandsbanenService = sorlandsbanenService;
this.stopConsolidationService = stopConsolidationService;
this.streetLimitationParametersService = streetLimitationParametersService;
this.luceneIndex = luceneIndex;
@@ -110,6 +118,7 @@ public static DefaultServerRequestContext create(
RealtimeVehicleService realtimeVehicleService,
VehicleRentalService vehicleRentalService,
@Nullable EmissionsService emissionsService,
+ @Nullable SorlandsbanenNorwayService sorlandsbanenService,
FlexParameters flexParameters,
List rideHailingServices,
@Nullable StopConsolidationService stopConsolidationService,
@@ -130,6 +139,7 @@ public static DefaultServerRequestContext create(
realtimeVehicleService,
vehicleRentalService,
emissionsService,
+ sorlandsbanenService,
rideHailingServices,
stopConsolidationService,
streetLimitationParametersService,
@@ -142,10 +152,10 @@ public static DefaultServerRequestContext create(
@Override
public RouteRequest defaultRouteRequest() {
// Lazy initialize request-scoped request to avoid doing this when not needed
- if (routeRequest == null) {
- routeRequest = routeRequestDefaults.copyWithDateTimeNow();
+ if (defaultRouteRequestWithTimeSet == null) {
+ defaultRouteRequestWithTimeSet = routeRequestDefaults.copyWithDateTimeNow();
}
- return routeRequest;
+ return defaultRouteRequestWithTimeSet;
}
/**
@@ -251,4 +261,9 @@ public LuceneIndex lucenceIndex() {
public EmissionsService emissionsService() {
return emissionsService;
}
+
+ @Nullable
+ public SorlandsbanenNorwayService sorlandsbanenService() {
+ return sorlandsbanenService;
+ }
}
diff --git a/application/src/main/java/org/opentripplanner/standalone/server/EtagRequestFilter.java b/application/src/main/java/org/opentripplanner/standalone/server/EtagRequestFilter.java
index 65cdec32a7d..b53739084ae 100644
--- a/application/src/main/java/org/opentripplanner/standalone/server/EtagRequestFilter.java
+++ b/application/src/main/java/org/opentripplanner/standalone/server/EtagRequestFilter.java
@@ -10,7 +10,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import org.apache.hc.core5.http.HttpStatus;
-import org.opentripplanner.framework.text.HexString;
+import org.opentripplanner.utils.text.HexString;
public class EtagRequestFilter implements ContainerResponseFilter {
diff --git a/application/src/main/java/org/opentripplanner/standalone/server/RequestTraceFilter.java b/application/src/main/java/org/opentripplanner/standalone/server/RequestTraceFilter.java
index 8ee2e6bbd27..31d2745913b 100644
--- a/application/src/main/java/org/opentripplanner/standalone/server/RequestTraceFilter.java
+++ b/application/src/main/java/org/opentripplanner/standalone/server/RequestTraceFilter.java
@@ -12,7 +12,7 @@
import java.util.Random;
import java.util.regex.Pattern;
import org.opentripplanner.framework.application.LogMDCSupport;
-import org.opentripplanner.framework.lang.StringUtils;
+import org.opentripplanner.utils.lang.StringUtils;
/**
* This filter manages OTP request trace parameters. A trace parameter can be read from the
diff --git a/application/src/main/java/org/opentripplanner/standalone/server/RequestTraceParameter.java b/application/src/main/java/org/opentripplanner/standalone/server/RequestTraceParameter.java
index 98abe8c8091..6e1b3286dcc 100644
--- a/application/src/main/java/org/opentripplanner/standalone/server/RequestTraceParameter.java
+++ b/application/src/main/java/org/opentripplanner/standalone/server/RequestTraceParameter.java
@@ -1,6 +1,6 @@
package org.opentripplanner.standalone.server;
-import org.opentripplanner.framework.lang.StringUtils;
+import org.opentripplanner.utils.lang.StringUtils;
/**
* OTP supports tracing user requests across log events and "outside" services. It does so by
diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/ElevatorBoardEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/ElevatorBoardEdge.java
index 81856476f2e..9bf0d67afa5 100644
--- a/application/src/main/java/org/opentripplanner/street/model/edge/ElevatorBoardEdge.java
+++ b/application/src/main/java/org/opentripplanner/street/model/edge/ElevatorBoardEdge.java
@@ -6,7 +6,6 @@
import org.opentripplanner.framework.geometry.GeometryUtils;
import org.opentripplanner.framework.i18n.I18NString;
import org.opentripplanner.framework.i18n.NonLocalizedString;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.street.model.vertex.ElevatorOffboardVertex;
import org.opentripplanner.street.model.vertex.ElevatorOnboardVertex;
import org.opentripplanner.street.search.state.State;
diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/ElevatorHopEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/ElevatorHopEdge.java
index 4acecd05a64..75eddb53777 100644
--- a/application/src/main/java/org/opentripplanner/street/model/edge/ElevatorHopEdge.java
+++ b/application/src/main/java/org/opentripplanner/street/model/edge/ElevatorHopEdge.java
@@ -1,7 +1,6 @@
package org.opentripplanner.street.model.edge;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.preference.RoutingPreferences;
import org.opentripplanner.street.model.StreetTraversalPermission;
import org.opentripplanner.street.model.vertex.Vertex;
diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java
index 505d2a95a3a..b606bcd9962 100644
--- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java
+++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java
@@ -17,8 +17,6 @@
import org.opentripplanner.framework.geometry.SphericalDistanceLibrary;
import org.opentripplanner.framework.geometry.SplitLineString;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.lang.BitSetUtils;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.routing.api.request.preference.RoutingPreferences;
import org.opentripplanner.routing.linking.DisposableEdgeCollection;
import org.opentripplanner.routing.linking.LinkingDirection;
@@ -36,6 +34,8 @@
import org.opentripplanner.street.search.state.State;
import org.opentripplanner.street.search.state.StateEditor;
import org.opentripplanner.street.search.state.VehicleRentalState;
+import org.opentripplanner.utils.lang.BitSetUtils;
+import org.opentripplanner.utils.lang.IntUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -381,21 +381,6 @@ else if (s0.currentMode() == TraverseMode.BICYCLE) {
State state = editor != null ? editor.makeState() : null;
- // Add an explicit bike-walking state for no-thru-traffic edges, so that dismounting and walking
- // is an option to avoid the restriction
- if (
- s0.getBackMode() == TraverseMode.BICYCLE &&
- canTraverse(TraverseMode.BICYCLE) &&
- isBicycleNoThruTraffic() &&
- !s0.hasEnteredNoThruTrafficArea()
- ) {
- var bikeWalk = doTraverse(s0, TraverseMode.WALK, true);
- if (bikeWalk != null) {
- State forkState = bikeWalk.makeState();
- return State.ofNullable(forkState, state);
- }
- }
-
// we are transitioning into a no-drop-off zone therefore we add a second state for dropping
// off the vehicle and walking
if (state != null && !fromv.rentalDropOffBanned(s0) && tov.rentalDropOffBanned(s0)) {
diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdgeBuilder.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdgeBuilder.java
index b3173b7bed5..99a02205eb6 100644
--- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdgeBuilder.java
+++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdgeBuilder.java
@@ -14,10 +14,10 @@
import org.locationtech.jts.geom.LineString;
import org.opentripplanner.framework.i18n.I18NString;
import org.opentripplanner.framework.i18n.NonLocalizedString;
-import org.opentripplanner.framework.lang.BitSetUtils;
import org.opentripplanner.street.model.StreetTraversalPermission;
import org.opentripplanner.street.model.vertex.StreetVertex;
import org.opentripplanner.street.search.TraverseMode;
+import org.opentripplanner.utils.lang.BitSetUtils;
public class StreetEdgeBuilder> {
diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetElevationExtension.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetElevationExtension.java
index 65ab72093ef..d741fb0a763 100644
--- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetElevationExtension.java
+++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetElevationExtension.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import org.locationtech.jts.geom.impl.PackedCoordinateSequence;
import org.opentripplanner.framework.geometry.CompactElevationProfile;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class StreetElevationExtension implements Serializable {
diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetTransitEntityLink.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetTransitEntityLink.java
index 92897232700..5a62eda0f90 100644
--- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetTransitEntityLink.java
+++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetTransitEntityLink.java
@@ -4,7 +4,6 @@
import org.locationtech.jts.geom.LineString;
import org.opentripplanner.framework.geometry.GeometryUtils;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.preference.RoutingPreferences;
import org.opentripplanner.street.model.vertex.StreetVertex;
import org.opentripplanner.street.model.vertex.Vertex;
diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLink.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLink.java
index e8fbae31b5f..682aeca0b3e 100644
--- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLink.java
+++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLink.java
@@ -3,7 +3,6 @@
import org.locationtech.jts.geom.LineString;
import org.opentripplanner.framework.geometry.GeometryUtils;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.preference.VehicleParkingPreferences;
import org.opentripplanner.routing.vehicle_parking.VehicleParking;
import org.opentripplanner.street.model.vertex.StreetVertex;
diff --git a/application/src/main/java/org/opentripplanner/street/model/note/StreetNoteAndMatcher.java b/application/src/main/java/org/opentripplanner/street/model/note/StreetNoteAndMatcher.java
index 84d775aca3b..953645c46bc 100644
--- a/application/src/main/java/org/opentripplanner/street/model/note/StreetNoteAndMatcher.java
+++ b/application/src/main/java/org/opentripplanner/street/model/note/StreetNoteAndMatcher.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
import java.util.Objects;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* A container for a pair (note and note matcher).
diff --git a/application/src/main/java/org/opentripplanner/street/model/vertex/IntersectionVertex.java b/application/src/main/java/org/opentripplanner/street/model/vertex/IntersectionVertex.java
index baea576a85f..2a8582cbaab 100644
--- a/application/src/main/java/org/opentripplanner/street/model/vertex/IntersectionVertex.java
+++ b/application/src/main/java/org/opentripplanner/street/model/vertex/IntersectionVertex.java
@@ -1,6 +1,6 @@
package org.opentripplanner.street.model.vertex;
-import org.opentripplanner.framework.lang.BitSetUtils;
+import org.opentripplanner.utils.lang.BitSetUtils;
/**
* Represents an ordinary location in space, typically an intersection.
diff --git a/application/src/main/java/org/opentripplanner/street/model/vertex/OsmBoardingLocationVertex.java b/application/src/main/java/org/opentripplanner/street/model/vertex/OsmBoardingLocationVertex.java
index 8ba8b25c2b2..8d89ebbe8e0 100644
--- a/application/src/main/java/org/opentripplanner/street/model/vertex/OsmBoardingLocationVertex.java
+++ b/application/src/main/java/org/opentripplanner/street/model/vertex/OsmBoardingLocationVertex.java
@@ -5,7 +5,7 @@
import java.util.Set;
import javax.annotation.Nullable;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* A vertex for an OSM node that represents a transit stop and has a tag to cross-reference this to
diff --git a/application/src/main/java/org/opentripplanner/street/search/state/State.java b/application/src/main/java/org/opentripplanner/street/search/state/State.java
index 6c7f342cad6..9413cbcbd57 100644
--- a/application/src/main/java/org/opentripplanner/street/search/state/State.java
+++ b/application/src/main/java/org/opentripplanner/street/search/state/State.java
@@ -1,6 +1,6 @@
package org.opentripplanner.street.search.state;
-import static org.opentripplanner.framework.lang.ObjectUtils.requireNotInitialized;
+import static org.opentripplanner.utils.lang.ObjectUtils.requireNotInitialized;
import java.time.Instant;
import java.util.ArrayList;
@@ -11,7 +11,6 @@
import javax.annotation.Nullable;
import org.opentripplanner.astar.spi.AStarState;
import org.opentripplanner.ext.dataoverlay.routing.DataOverlayContext;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.api.request.preference.RoutingPreferences;
import org.opentripplanner.service.vehiclerental.street.VehicleRentalEdge;
import org.opentripplanner.service.vehiclerental.street.VehicleRentalPlaceVertex;
@@ -21,6 +20,7 @@
import org.opentripplanner.street.search.TraverseMode;
import org.opentripplanner.street.search.intersection_model.IntersectionTraversalCalculator;
import org.opentripplanner.street.search.request.StreetSearchRequest;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class State implements AStarState, Cloneable {
diff --git a/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java b/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java
index 6735dc1db29..adc7283ee4d 100644
--- a/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java
+++ b/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java
@@ -2,9 +2,9 @@
import java.time.LocalDate;
import java.util.List;
-import org.opentripplanner.framework.collection.ListUtils;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.timetable.TripAlteration;
+import org.opentripplanner.utils.collection.ListUtils;
/*
* A request for trips on a specific service date.
diff --git a/application/src/main/java/org/opentripplanner/transit/model/basic/Money.java b/application/src/main/java/org/opentripplanner/transit/model/basic/Money.java
index de1c6647b6b..97d6f91be5a 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/basic/Money.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/basic/Money.java
@@ -8,7 +8,7 @@
import java.util.Locale;
import java.util.Objects;
import java.util.function.Function;
-import org.opentripplanner.framework.lang.IntUtils;
+import org.opentripplanner.utils.lang.IntUtils;
/**
* Represents an amount of money.
diff --git a/application/src/main/java/org/opentripplanner/transit/model/framework/Deduplicator.java b/application/src/main/java/org/opentripplanner/transit/model/framework/Deduplicator.java
index 587ad2871cd..69b5385ad86 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/framework/Deduplicator.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/framework/Deduplicator.java
@@ -14,7 +14,7 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Does the same thing as String.intern, but for several different types. Java's String.intern uses
diff --git a/application/src/main/java/org/opentripplanner/transit/model/framework/FeedScopedId.java b/application/src/main/java/org/opentripplanner/transit/model/framework/FeedScopedId.java
index bdb09cb0db8..be12be83548 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/framework/FeedScopedId.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/framework/FeedScopedId.java
@@ -1,12 +1,12 @@
package org.opentripplanner.transit.model.framework;
-import static org.opentripplanner.framework.lang.StringUtils.assertHasValue;
+import static org.opentripplanner.utils.lang.StringUtils.assertHasValue;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.lang.StringUtils;
+import org.opentripplanner.utils.lang.StringUtils;
public final class FeedScopedId implements Serializable, Comparable {
diff --git a/application/src/main/java/org/opentripplanner/transit/model/network/BikeAccess.java b/application/src/main/java/org/opentripplanner/transit/model/network/BikeAccess.java
index 536a01a9b14..c0d850e9ce7 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/network/BikeAccess.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/network/BikeAccess.java
@@ -1,6 +1,8 @@
package org.opentripplanner.transit.model.network;
/**
+ * This represents the state of whether bikes are allowed on board trips (or routes).
+ *
* GTFS codes:
* 0 = unknown / unspecified, 1 = bikes allowed, 2 = bikes NOT allowed
*/
diff --git a/application/src/main/java/org/opentripplanner/transit/model/network/CarAccess.java b/application/src/main/java/org/opentripplanner/transit/model/network/CarAccess.java
new file mode 100644
index 00000000000..2fca43cfb32
--- /dev/null
+++ b/application/src/main/java/org/opentripplanner/transit/model/network/CarAccess.java
@@ -0,0 +1,13 @@
+package org.opentripplanner.transit.model.network;
+
+/**
+ * This represents the state of whether cars are allowed on board trips.
+ *
+ * GTFS codes:
+ * 0 = unknown / unspecified, 1 = cars allowed, 2 = cars NOT allowed
+ */
+public enum CarAccess {
+ UNKNOWN,
+ NOT_ALLOWED,
+ ALLOWED,
+}
diff --git a/application/src/main/java/org/opentripplanner/transit/model/network/Route.java b/application/src/main/java/org/opentripplanner/transit/model/network/Route.java
index bd868fba10d..1daae1e6209 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/network/Route.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/network/Route.java
@@ -9,7 +9,6 @@
import java.util.Objects;
import javax.annotation.Nullable;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.transit.model.basic.SubMode;
import org.opentripplanner.transit.model.basic.TransitMode;
import org.opentripplanner.transit.model.framework.AbstractTransitEntity;
@@ -18,6 +17,7 @@
import org.opentripplanner.transit.model.organization.Agency;
import org.opentripplanner.transit.model.organization.Branding;
import org.opentripplanner.transit.model.organization.Operator;
+import org.opentripplanner.utils.lang.IntUtils;
public final class Route extends AbstractTransitEntity implements LogInfo {
diff --git a/application/src/main/java/org/opentripplanner/transit/model/network/StopPattern.java b/application/src/main/java/org/opentripplanner/transit/model/network/StopPattern.java
index 7395d28419f..9df095d5170 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/network/StopPattern.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/network/StopPattern.java
@@ -9,13 +9,13 @@
import java.util.Optional;
import java.util.function.Predicate;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.lang.MemEfficientArrayBuilder;
import org.opentripplanner.model.PickDrop;
import org.opentripplanner.model.StopTime;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.site.RegularStop;
import org.opentripplanner.transit.model.site.Station;
import org.opentripplanner.transit.model.site.StopLocation;
+import org.opentripplanner.utils.lang.MemEfficientArrayBuilder;
/**
* This class represents what is called a JourneyPattern in Transmodel: the sequence of stops at
diff --git a/application/src/main/java/org/opentripplanner/transit/model/network/TripPattern.java b/application/src/main/java/org/opentripplanner/transit/model/network/TripPattern.java
index becf1686733..88d48d741f3 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/network/TripPattern.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/network/TripPattern.java
@@ -1,7 +1,7 @@
package org.opentripplanner.transit.model.network;
import static java.util.Objects.requireNonNull;
-import static org.opentripplanner.framework.lang.ObjectUtils.requireNotInitialized;
+import static org.opentripplanner.utils.lang.ObjectUtils.requireNotInitialized;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/application/src/main/java/org/opentripplanner/transit/model/network/grouppriority/TransitGroupPriorityService.java b/application/src/main/java/org/opentripplanner/transit/model/network/grouppriority/TransitGroupPriorityService.java
index 048b2279a88..e8172cdf546 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/network/grouppriority/TransitGroupPriorityService.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/network/grouppriority/TransitGroupPriorityService.java
@@ -7,12 +7,12 @@
import java.util.Collection;
import java.util.List;
import java.util.stream.Stream;
-import org.opentripplanner.framework.lang.ArrayUtils;
import org.opentripplanner.routing.api.request.framework.CostLinearFunction;
import org.opentripplanner.routing.api.request.request.filter.TransitGroupSelect;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.timetable.Trip;
+import org.opentripplanner.utils.lang.ArrayUtils;
/**
* This class dynamically builds an index of transit-group-ids from the provided
diff --git a/application/src/main/java/org/opentripplanner/transit/model/organization/Agency.java b/application/src/main/java/org/opentripplanner/transit/model/organization/Agency.java
index 4d82ab05e57..978cf0ca416 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/organization/Agency.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/organization/Agency.java
@@ -1,7 +1,7 @@
/* This file is based on code copied from project OneBusAway, see the LICENSE file for further information. */
package org.opentripplanner.transit.model.organization;
-import static org.opentripplanner.framework.lang.StringUtils.assertHasValue;
+import static org.opentripplanner.utils.lang.StringUtils.assertHasValue;
import java.time.ZoneId;
import java.util.Objects;
@@ -21,7 +21,6 @@ public final class Agency extends AbstractTransitEntity i
private final String lang;
private final String phone;
private final String fareUrl;
- private final String brandingUrl;
Agency(AgencyBuilder builder) {
super(builder.getId());
@@ -43,7 +42,6 @@ public final class Agency extends AbstractTransitEntity i
this.lang = builder.getLang();
this.phone = builder.getPhone();
this.fareUrl = builder.getFareUrl();
- this.brandingUrl = builder.getBrandingUrl();
}
public static AgencyBuilder of(FeedScopedId id) {
@@ -78,11 +76,6 @@ public String getFareUrl() {
return fareUrl;
}
- @Nullable
- public String getBrandingUrl() {
- return brandingUrl;
- }
-
@Override
public AgencyBuilder copy() {
return new AgencyBuilder(this);
@@ -102,8 +95,7 @@ public boolean sameAs(Agency other) {
Objects.equals(url, other.url) &&
Objects.equals(lang, other.lang) &&
Objects.equals(phone, other.phone) &&
- Objects.equals(fareUrl, other.fareUrl) &&
- Objects.equals(brandingUrl, other.brandingUrl)
+ Objects.equals(fareUrl, other.fareUrl)
);
}
}
diff --git a/application/src/main/java/org/opentripplanner/transit/model/organization/AgencyBuilder.java b/application/src/main/java/org/opentripplanner/transit/model/organization/AgencyBuilder.java
index 3cf24523c5d..f985a953d9e 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/organization/AgencyBuilder.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/organization/AgencyBuilder.java
@@ -11,7 +11,6 @@ public class AgencyBuilder extends AbstractEntityBuilder
private String lang;
private String phone;
private String fareUrl;
- private String brandingUrl;
AgencyBuilder(FeedScopedId id) {
super(id);
@@ -25,7 +24,6 @@ public class AgencyBuilder extends AbstractEntityBuilder
this.lang = original.getLang();
this.phone = original.getPhone();
this.fareUrl = original.getFareUrl();
- this.brandingUrl = original.getBrandingUrl();
}
public String getName() {
@@ -82,15 +80,6 @@ public AgencyBuilder withFareUrl(String fareUrl) {
return this;
}
- public String getBrandingUrl() {
- return brandingUrl;
- }
-
- public AgencyBuilder withBrandingUrl(String brandingUrl) {
- this.brandingUrl = brandingUrl;
- return this;
- }
-
@Override
protected Agency buildFromValues() {
return new Agency(this);
diff --git a/application/src/main/java/org/opentripplanner/transit/model/organization/ContactInfo.java b/application/src/main/java/org/opentripplanner/transit/model/organization/ContactInfo.java
index 01ad5047510..d54b38dba24 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/organization/ContactInfo.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/organization/ContactInfo.java
@@ -2,8 +2,8 @@
import java.util.Objects;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.transit.model.framework.TransitObject;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class ContactInfo implements TransitObject {
diff --git a/application/src/main/java/org/opentripplanner/transit/model/organization/Operator.java b/application/src/main/java/org/opentripplanner/transit/model/organization/Operator.java
index 399b726602f..35461fd7498 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/organization/Operator.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/organization/Operator.java
@@ -1,6 +1,6 @@
package org.opentripplanner.transit.model.organization;
-import static org.opentripplanner.framework.lang.StringUtils.assertHasValue;
+import static org.opentripplanner.utils.lang.StringUtils.assertHasValue;
import java.util.Objects;
import javax.annotation.Nullable;
diff --git a/application/src/main/java/org/opentripplanner/transit/model/site/StopLocation.java b/application/src/main/java/org/opentripplanner/transit/model/site/StopLocation.java
index d9c79732970..ecd0cf440b6 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/site/StopLocation.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/site/StopLocation.java
@@ -8,12 +8,12 @@
import org.locationtech.jts.geom.Geometry;
import org.opentripplanner.framework.geometry.WgsCoordinate;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.lang.ObjectUtils;
import org.opentripplanner.transit.model.basic.Accessibility;
import org.opentripplanner.transit.model.basic.SubMode;
import org.opentripplanner.transit.model.basic.TransitMode;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.framework.LogInfo;
+import org.opentripplanner.utils.lang.ObjectUtils;
/**
* A StopLocation describes a place where a vehicle can be boarded or alighted, which is not
diff --git a/application/src/main/java/org/opentripplanner/transit/model/site/StopLocationsGroup.java b/application/src/main/java/org/opentripplanner/transit/model/site/StopLocationsGroup.java
index 3536f59e9b6..4158828e9a4 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/site/StopLocationsGroup.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/site/StopLocationsGroup.java
@@ -3,9 +3,9 @@
import java.util.Collection;
import org.opentripplanner.framework.geometry.WgsCoordinate;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.lang.ObjectUtils;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.framework.LogInfo;
+import org.opentripplanner.utils.lang.ObjectUtils;
/**
* A grouping of Stops referred to by the same name. No actual boarding or alighting happens at this
diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimes.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimes.java
index 3cae0c1678b..9a7298cd15e 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimes.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimes.java
@@ -13,14 +13,14 @@
import javax.annotation.Nullable;
import org.opentripplanner.framework.error.OtpError;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.lang.IntUtils;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.transit.model.basic.Accessibility;
import org.opentripplanner.transit.model.framework.DataValidationException;
import org.opentripplanner.transit.model.framework.Deduplicator;
import org.opentripplanner.transit.model.framework.DeduplicatorService;
import org.opentripplanner.transit.model.timetable.booking.BookingInfo;
+import org.opentripplanner.utils.lang.IntUtils;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* Regular/planed/scheduled read-only version of {@link TripTimes}. The set of static
diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimesBuilder.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimesBuilder.java
index 200afc27e8d..acca4a6a526 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimesBuilder.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimesBuilder.java
@@ -4,9 +4,9 @@
import java.util.List;
import javax.annotation.Nullable;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.transit.model.framework.DeduplicatorService;
import org.opentripplanner.transit.model.timetable.booking.BookingInfo;
+import org.opentripplanner.utils.time.TimeUtils;
public class ScheduledTripTimesBuilder {
diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/Trip.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/Trip.java
index 6e829e15866..057adacd7ed 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/timetable/Trip.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/Trip.java
@@ -3,12 +3,11 @@
import static java.util.Objects.requireNonNull;
import static java.util.Objects.requireNonNullElse;
-import static org.opentripplanner.framework.lang.ObjectUtils.ifNotNull;
+import static org.opentripplanner.utils.lang.ObjectUtils.ifNotNull;
import java.util.Objects;
import javax.annotation.Nullable;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.lang.StringUtils;
import org.opentripplanner.transit.model.basic.Accessibility;
import org.opentripplanner.transit.model.basic.SubMode;
import org.opentripplanner.transit.model.basic.TransitMode;
@@ -16,8 +15,10 @@
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.framework.LogInfo;
import org.opentripplanner.transit.model.network.BikeAccess;
+import org.opentripplanner.transit.model.network.CarAccess;
import org.opentripplanner.transit.model.network.Route;
import org.opentripplanner.transit.model.organization.Operator;
+import org.opentripplanner.utils.lang.StringUtils;
/**
* A Trip represents the movement of a public transport vehicle on a given {@link Route}, using a
@@ -38,6 +39,7 @@ public final class Trip extends AbstractTransitEntity impleme
private final TransitMode mode;
private final Direction direction;
private final BikeAccess bikesAllowed;
+ private final CarAccess carsAllowed;
private final Accessibility wheelchairBoarding;
private final SubMode netexSubmode;
@@ -76,6 +78,7 @@ public final class Trip extends AbstractTransitEntity impleme
: route.getNetexSubmode();
this.direction = requireNonNullElse(builder.getDirection(), Direction.UNKNOWN);
this.bikesAllowed = requireNonNullElse(builder.getBikesAllowed(), route.getBikesAllowed());
+ this.carsAllowed = requireNonNullElse(builder.getCarsAllowed(), CarAccess.UNKNOWN);
this.wheelchairBoarding =
requireNonNullElse(builder.getWheelchairBoarding(), Accessibility.NO_INFORMATION);
this.netexAlteration = requireNonNullElse(builder.getNetexAlteration(), TripAlteration.PLANNED);
@@ -156,6 +159,10 @@ public BikeAccess getBikesAllowed() {
return bikesAllowed;
}
+ public CarAccess getCarsAllowed() {
+ return carsAllowed;
+ }
+
public Accessibility getWheelchairBoarding() {
return wheelchairBoarding;
}
@@ -217,6 +224,7 @@ public boolean sameAs(Trip other) {
Objects.equals(this.shapeId, other.shapeId) &&
Objects.equals(this.direction, other.direction) &&
Objects.equals(this.bikesAllowed, other.bikesAllowed) &&
+ Objects.equals(this.carsAllowed, other.carsAllowed) &&
Objects.equals(this.wheelchairBoarding, other.wheelchairBoarding) &&
Objects.equals(this.netexAlteration, other.netexAlteration)
);
diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/TripBuilder.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/TripBuilder.java
index 063dfe10da2..5ed0616831d 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/timetable/TripBuilder.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/TripBuilder.java
@@ -6,6 +6,7 @@
import org.opentripplanner.transit.model.framework.AbstractEntityBuilder;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.network.BikeAccess;
+import org.opentripplanner.transit.model.network.CarAccess;
import org.opentripplanner.transit.model.network.Route;
import org.opentripplanner.transit.model.organization.Operator;
@@ -21,6 +22,7 @@ public class TripBuilder extends AbstractEntityBuilder {
private FeedScopedId shapeId;
private Direction direction;
private BikeAccess bikesAllowed;
+ private CarAccess carsAllowed;
private Accessibility wheelchairBoarding;
private String gtfsBlockId;
private String netexInternalPlanningCode;
@@ -44,6 +46,7 @@ public class TripBuilder extends AbstractEntityBuilder {
this.shapeId = original.getShapeId();
this.direction = original.getDirection();
this.bikesAllowed = original.getBikesAllowed();
+ this.carsAllowed = original.getCarsAllowed();
this.wheelchairBoarding = original.getWheelchairBoarding();
this.netexInternalPlanningCode = original.getNetexInternalPlanningCode();
}
@@ -151,11 +154,20 @@ public BikeAccess getBikesAllowed() {
return bikesAllowed;
}
+ public CarAccess getCarsAllowed() {
+ return carsAllowed;
+ }
+
public TripBuilder withBikesAllowed(BikeAccess bikesAllowed) {
this.bikesAllowed = bikesAllowed;
return this;
}
+ public TripBuilder withCarsAllowed(CarAccess carsAllowed) {
+ this.carsAllowed = carsAllowed;
+ return this;
+ }
+
public Accessibility getWheelchairBoarding() {
return wheelchairBoarding;
}
diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/TripTimesStringBuilder.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/TripTimesStringBuilder.java
index a5e77037dea..143cb59ff31 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/timetable/TripTimesStringBuilder.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/TripTimesStringBuilder.java
@@ -1,8 +1,8 @@
package org.opentripplanner.transit.model.timetable;
import java.util.ArrayList;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.transit.model.network.TripPattern;
+import org.opentripplanner.utils.time.TimeUtils;
public class TripTimesStringBuilder {
diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingInfo.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingInfo.java
index 3e23696b65a..b21543b717c 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingInfo.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingInfo.java
@@ -4,8 +4,8 @@
import java.time.Duration;
import java.util.EnumSet;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.transit.model.organization.ContactInfo;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* Info about how a trip might be booked at a particular stop. All of this is pass-through
diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingTime.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingTime.java
index 8034fe07388..d0f1558e0d4 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingTime.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingTime.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.time.LocalTime;
import java.util.Objects;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* Represents either the earliest or latest time a trip can be booked relative to the departure day
diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfo.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfo.java
index 8dad53a0bde..471cff394e2 100644
--- a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfo.java
+++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfo.java
@@ -3,7 +3,7 @@
import java.time.Duration;
import java.util.Objects;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This is the contract between booking info and the router. The router will enforce
diff --git a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java
index 2ce99e7809b..5f7cfa95524 100644
--- a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java
+++ b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java
@@ -22,7 +22,6 @@
import org.locationtech.jts.geom.Envelope;
import org.opentripplanner.ext.flex.FlexIndex;
import org.opentripplanner.framework.application.OTPRequestTimeoutException;
-import org.opentripplanner.framework.collection.CollectionsView;
import org.opentripplanner.model.FeedInfo;
import org.opentripplanner.model.PathTransfer;
import org.opentripplanner.model.StopTimesInPattern;
@@ -59,6 +58,7 @@
import org.opentripplanner.transit.model.timetable.TripIdAndServiceDate;
import org.opentripplanner.transit.model.timetable.TripOnServiceDate;
import org.opentripplanner.updater.GraphUpdaterStatus;
+import org.opentripplanner.utils.collection.CollectionsView;
/**
* Default implementation of the Transit Service and Transit Editor Service.
diff --git a/application/src/main/java/org/opentripplanner/transit/service/SiteRepository.java b/application/src/main/java/org/opentripplanner/transit/service/SiteRepository.java
index 6c9d591933a..a2a4adea931 100644
--- a/application/src/main/java/org/opentripplanner/transit/service/SiteRepository.java
+++ b/application/src/main/java/org/opentripplanner/transit/service/SiteRepository.java
@@ -8,8 +8,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.Nullable;
import org.locationtech.jts.geom.Envelope;
-import org.opentripplanner.framework.collection.CollectionsView;
-import org.opentripplanner.framework.collection.MapUtils;
import org.opentripplanner.framework.geometry.WgsCoordinate;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.site.AreaStop;
@@ -20,6 +18,8 @@
import org.opentripplanner.transit.model.site.Station;
import org.opentripplanner.transit.model.site.StopLocation;
import org.opentripplanner.transit.model.site.StopLocationsGroup;
+import org.opentripplanner.utils.collection.CollectionsView;
+import org.opentripplanner.utils.collection.MapUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/transit/service/StopModelIndex.java b/application/src/main/java/org/opentripplanner/transit/service/StopModelIndex.java
index 48048101b3d..13a8c0d278d 100644
--- a/application/src/main/java/org/opentripplanner/transit/service/StopModelIndex.java
+++ b/application/src/main/java/org/opentripplanner/transit/service/StopModelIndex.java
@@ -7,7 +7,6 @@
import java.util.Objects;
import javax.annotation.Nullable;
import org.locationtech.jts.geom.Envelope;
-import org.opentripplanner.framework.collection.CollectionsView;
import org.opentripplanner.framework.geometry.HashGridSpatialIndex;
import org.opentripplanner.transit.model.site.AreaStop;
import org.opentripplanner.transit.model.site.GroupStop;
@@ -15,6 +14,7 @@
import org.opentripplanner.transit.model.site.RegularStop;
import org.opentripplanner.transit.model.site.Station;
import org.opentripplanner.transit.model.site.StopLocation;
+import org.opentripplanner.utils.collection.CollectionsView;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.event.Level;
diff --git a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java
index 6dec0c09eb6..a57299d96ab 100644
--- a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java
+++ b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java
@@ -20,10 +20,9 @@
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
+import java.util.stream.Collectors;
import javax.annotation.Nullable;
import org.opentripplanner.ext.flex.trip.FlexTrip;
-import org.opentripplanner.framework.lang.ObjectUtils;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore;
import org.opentripplanner.graph_builder.issues.NoFutureDates;
import org.opentripplanner.model.FeedInfo;
@@ -44,13 +43,18 @@
import org.opentripplanner.transit.model.framework.AbstractTransitEntity;
import org.opentripplanner.transit.model.framework.Deduplicator;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.transit.model.network.CarAccess;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.organization.Agency;
import org.opentripplanner.transit.model.organization.Operator;
+import org.opentripplanner.transit.model.site.GroupStop;
+import org.opentripplanner.transit.model.site.RegularStop;
import org.opentripplanner.transit.model.site.StopLocation;
import org.opentripplanner.transit.model.timetable.TripOnServiceDate;
import org.opentripplanner.updater.GraphUpdaterManager;
import org.opentripplanner.updater.configure.UpdaterConfigurator;
+import org.opentripplanner.utils.lang.ObjectUtils;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -564,6 +568,36 @@ public FlexTrip getFlexTrip(FeedScopedId tripId) {
return flexTripsById.get(tripId);
}
+ /**
+ * The stops that are used by transit capable of transporting cars need to be
+ * connected to the road network (e.g. car ferries). This method returns the
+ * stops that are used by trips that allow cars.
+ * @return set of stop locations that are used for trips that allow cars
+ */
+ public Set getStopLocationsUsedForCarsAllowedTrips() {
+ Set stopLocations = getAllTripPatterns()
+ .stream()
+ .filter(t ->
+ t
+ .getScheduledTimetable()
+ .getTripTimes()
+ .stream()
+ .anyMatch(tt -> tt.getTrip().getCarsAllowed() == CarAccess.ALLOWED)
+ )
+ .flatMap(t -> t.getStops().stream())
+ .collect(Collectors.toSet());
+
+ stopLocations.addAll(
+ stopLocations
+ .stream()
+ .filter(GroupStop.class::isInstance)
+ .map(GroupStop.class::cast)
+ .flatMap(g -> g.getChildLocations().stream().filter(RegularStop.class::isInstance))
+ .toList()
+ );
+ return stopLocations;
+ }
+
private void invalidateIndex() {
this.index = null;
}
diff --git a/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java b/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java
index 6972bfb6208..96e2d25bbd8 100644
--- a/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java
+++ b/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java
@@ -4,8 +4,6 @@
import gnu.trove.set.TIntSet;
import java.text.ParseException;
import java.time.LocalDate;
-import org.opentripplanner.framework.time.ServiceDateUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore;
import org.opentripplanner.gtfs.mapping.DirectionMapper;
import org.opentripplanner.transit.model.framework.FeedScopedId;
@@ -15,6 +13,8 @@
import org.opentripplanner.transit.model.timetable.Trip;
import org.opentripplanner.transit.model.timetable.TripTimes;
import org.opentripplanner.transit.service.TransitService;
+import org.opentripplanner.utils.time.ServiceDateUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This class is used for matching TripDescriptors without trip_ids to scheduled GTFS data and to
diff --git a/application/src/main/java/org/opentripplanner/updater/alert/GtfsRealtimeAlertsUpdater.java b/application/src/main/java/org/opentripplanner/updater/alert/GtfsRealtimeAlertsUpdater.java
index 23b6d741e10..b71dad6a656 100644
--- a/application/src/main/java/org/opentripplanner/updater/alert/GtfsRealtimeAlertsUpdater.java
+++ b/application/src/main/java/org/opentripplanner/updater/alert/GtfsRealtimeAlertsUpdater.java
@@ -4,13 +4,13 @@
import java.net.URI;
import org.opentripplanner.framework.io.OtpHttpClient;
import org.opentripplanner.framework.io.OtpHttpClientFactory;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.impl.TransitAlertServiceImpl;
import org.opentripplanner.routing.services.TransitAlertService;
import org.opentripplanner.transit.service.TimetableRepository;
import org.opentripplanner.updater.spi.HttpHeaders;
import org.opentripplanner.updater.spi.PollingGraphUpdater;
import org.opentripplanner.updater.spi.WriteToGraphCallback;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/siri/AddedTripBuilder.java b/application/src/main/java/org/opentripplanner/updater/siri/AddedTripBuilder.java
index 3be1bcbc4a2..a1ca89f5c83 100644
--- a/application/src/main/java/org/opentripplanner/updater/siri/AddedTripBuilder.java
+++ b/application/src/main/java/org/opentripplanner/updater/siri/AddedTripBuilder.java
@@ -16,7 +16,6 @@
import java.util.function.Function;
import javax.annotation.Nullable;
import org.opentripplanner.framework.i18n.NonLocalizedString;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.model.StopTime;
import org.opentripplanner.transit.model.basic.TransitMode;
import org.opentripplanner.transit.model.framework.DataValidationException;
@@ -37,6 +36,7 @@
import org.opentripplanner.updater.siri.mapper.PickDropMapper;
import org.opentripplanner.updater.spi.DataValidationExceptionMapper;
import org.opentripplanner.updater.spi.UpdateError;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.rutebanken.netex.model.BusSubmodeEnumeration;
import org.rutebanken.netex.model.RailSubmodeEnumeration;
import org.slf4j.Logger;
diff --git a/application/src/main/java/org/opentripplanner/updater/siri/DebugString.java b/application/src/main/java/org/opentripplanner/updater/siri/DebugString.java
index e8265856245..fa5d45544e0 100644
--- a/application/src/main/java/org/opentripplanner/updater/siri/DebugString.java
+++ b/application/src/main/java/org/opentripplanner/updater/siri/DebugString.java
@@ -1,6 +1,6 @@
package org.opentripplanner.updater.siri;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import uk.org.siri.siri20.DataFrameRefStructure;
import uk.org.siri.siri20.DatedVehicleJourneyRef;
import uk.org.siri.siri20.EstimatedVehicleJourney;
diff --git a/application/src/main/java/org/opentripplanner/updater/siri/ModifiedTripBuilder.java b/application/src/main/java/org/opentripplanner/updater/siri/ModifiedTripBuilder.java
index 68435290d1b..0f1475f7b50 100644
--- a/application/src/main/java/org/opentripplanner/updater/siri/ModifiedTripBuilder.java
+++ b/application/src/main/java/org/opentripplanner/updater/siri/ModifiedTripBuilder.java
@@ -10,7 +10,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.transit.model.framework.DataValidationException;
import org.opentripplanner.transit.model.framework.Result;
import org.opentripplanner.transit.model.network.StopPattern;
@@ -23,6 +22,7 @@
import org.opentripplanner.updater.siri.mapper.PickDropMapper;
import org.opentripplanner.updater.spi.DataValidationExceptionMapper;
import org.opentripplanner.updater.spi.UpdateError;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uk.org.siri.siri20.EstimatedVehicleJourney;
diff --git a/application/src/main/java/org/opentripplanner/updater/siri/SiriFuzzyTripMatcher.java b/application/src/main/java/org/opentripplanner/updater/siri/SiriFuzzyTripMatcher.java
index db3fa50e94c..604dceed408 100644
--- a/application/src/main/java/org/opentripplanner/updater/siri/SiriFuzzyTripMatcher.java
+++ b/application/src/main/java/org/opentripplanner/updater/siri/SiriFuzzyTripMatcher.java
@@ -11,7 +11,6 @@
import java.util.function.BiFunction;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.model.Timetable;
import org.opentripplanner.model.calendar.CalendarService;
import org.opentripplanner.transit.model.basic.TransitMode;
@@ -21,6 +20,7 @@
import org.opentripplanner.transit.model.timetable.Trip;
import org.opentripplanner.transit.model.timetable.TripTimes;
import org.opentripplanner.transit.service.TransitService;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uk.org.siri.siri20.EstimatedVehicleJourney;
diff --git a/application/src/main/java/org/opentripplanner/updater/siri/TimetableHelper.java b/application/src/main/java/org/opentripplanner/updater/siri/TimetableHelper.java
index 870316403f6..dad1bc9a243 100644
--- a/application/src/main/java/org/opentripplanner/updater/siri/TimetableHelper.java
+++ b/application/src/main/java/org/opentripplanner/updater/siri/TimetableHelper.java
@@ -5,9 +5,9 @@
import java.time.ZonedDateTime;
import java.util.function.Supplier;
import org.opentripplanner.framework.i18n.NonLocalizedString;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.transit.model.timetable.RealTimeTripTimes;
import org.opentripplanner.updater.siri.mapper.OccupancyMapper;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import uk.org.siri.siri20.NaturalLanguageStringStructure;
import uk.org.siri.siri20.OccupancyEnumeration;
diff --git a/application/src/main/java/org/opentripplanner/updater/siri/updater/google/GooglePubsubEstimatedTimetableSource.java b/application/src/main/java/org/opentripplanner/updater/siri/updater/google/GooglePubsubEstimatedTimetableSource.java
index 4592d102d1d..b9812576fd8 100644
--- a/application/src/main/java/org/opentripplanner/updater/siri/updater/google/GooglePubsubEstimatedTimetableSource.java
+++ b/application/src/main/java/org/opentripplanner/updater/siri/updater/google/GooglePubsubEstimatedTimetableSource.java
@@ -29,9 +29,9 @@
import org.opentripplanner.framework.io.OtpHttpClientFactory;
import org.opentripplanner.framework.retry.OtpRetry;
import org.opentripplanner.framework.retry.OtpRetryBuilder;
-import org.opentripplanner.framework.text.FileSizeToTextConverter;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.updater.siri.updater.AsyncEstimatedTimetableSource;
+import org.opentripplanner.utils.text.FileSizeToTextConverter;
+import org.opentripplanner.utils.time.DurationUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uk.org.siri.siri20.ServiceDelivery;
diff --git a/application/src/main/java/org/opentripplanner/updater/siri/updater/google/SiriETGooglePubsubUpdaterParameters.java b/application/src/main/java/org/opentripplanner/updater/siri/updater/google/SiriETGooglePubsubUpdaterParameters.java
index fc698142adc..2970ac114c0 100644
--- a/application/src/main/java/org/opentripplanner/updater/siri/updater/google/SiriETGooglePubsubUpdaterParameters.java
+++ b/application/src/main/java/org/opentripplanner/updater/siri/updater/google/SiriETGooglePubsubUpdaterParameters.java
@@ -3,8 +3,8 @@
import java.time.Duration;
import java.util.Objects;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.updater.trip.UrlUpdaterParameters;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public record SiriETGooglePubsubUpdaterParameters(
String configRef,
diff --git a/application/src/main/java/org/opentripplanner/updater/spi/ResultLogger.java b/application/src/main/java/org/opentripplanner/updater/spi/ResultLogger.java
index 97af8d650bb..9ea737fa0e7 100644
--- a/application/src/main/java/org/opentripplanner/updater/spi/ResultLogger.java
+++ b/application/src/main/java/org/opentripplanner/updater/spi/ResultLogger.java
@@ -3,7 +3,7 @@
import static net.logstash.logback.argument.StructuredArguments.keyValue;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.lang.DoubleUtils;
+import org.opentripplanner.utils.lang.DoubleUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/spi/UpdateSuccess.java b/application/src/main/java/org/opentripplanner/updater/spi/UpdateSuccess.java
index 3e6135d88c0..6d797a9a650 100644
--- a/application/src/main/java/org/opentripplanner/updater/spi/UpdateSuccess.java
+++ b/application/src/main/java/org/opentripplanner/updater/spi/UpdateSuccess.java
@@ -3,7 +3,7 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-import org.opentripplanner.framework.collection.ListUtils;
+import org.opentripplanner.utils.collection.ListUtils;
/**
* The result of a successful application of a realtime update, for example for trips or
diff --git a/application/src/main/java/org/opentripplanner/updater/trip/GtfsRealtimeTripUpdateSource.java b/application/src/main/java/org/opentripplanner/updater/trip/GtfsRealtimeTripUpdateSource.java
index 48f2d39ccc4..0b20a4c22c7 100644
--- a/application/src/main/java/org/opentripplanner/updater/trip/GtfsRealtimeTripUpdateSource.java
+++ b/application/src/main/java/org/opentripplanner/updater/trip/GtfsRealtimeTripUpdateSource.java
@@ -14,8 +14,8 @@
import java.util.List;
import org.opentripplanner.framework.io.OtpHttpClient;
import org.opentripplanner.framework.io.OtpHttpClientFactory;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.updater.spi.HttpHeaders;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/trip/MqttGtfsRealtimeUpdater.java b/application/src/main/java/org/opentripplanner/updater/trip/MqttGtfsRealtimeUpdater.java
index e1c8bf4ea83..20b49ed022f 100644
--- a/application/src/main/java/org/opentripplanner/updater/trip/MqttGtfsRealtimeUpdater.java
+++ b/application/src/main/java/org/opentripplanner/updater/trip/MqttGtfsRealtimeUpdater.java
@@ -16,11 +16,11 @@
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.updater.spi.GraphUpdater;
import org.opentripplanner.updater.spi.UpdateResult;
import org.opentripplanner.updater.spi.WriteToGraphCallback;
import org.opentripplanner.updater.trip.metrics.TripUpdateMetrics;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/trip/PollingTripUpdater.java b/application/src/main/java/org/opentripplanner/updater/trip/PollingTripUpdater.java
index 71f93235e01..c725c8b1088 100644
--- a/application/src/main/java/org/opentripplanner/updater/trip/PollingTripUpdater.java
+++ b/application/src/main/java/org/opentripplanner/updater/trip/PollingTripUpdater.java
@@ -3,11 +3,11 @@
import com.google.transit.realtime.GtfsRealtime.TripUpdate;
import java.util.List;
import java.util.function.Consumer;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.updater.spi.PollingGraphUpdater;
import org.opentripplanner.updater.spi.UpdateResult;
import org.opentripplanner.updater.spi.WriteToGraphCallback;
import org.opentripplanner.updater.trip.metrics.BatchTripUpdateMetrics;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java b/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java
index f83fa9d247e..54c3901f3e8 100644
--- a/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java
+++ b/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java
@@ -37,8 +37,6 @@
import java.util.function.Supplier;
import org.opentripplanner.framework.i18n.I18NString;
import org.opentripplanner.framework.i18n.NonLocalizedString;
-import org.opentripplanner.framework.lang.StringUtils;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.gtfs.mapping.TransitModeMapper;
import org.opentripplanner.model.RealTimeTripUpdate;
import org.opentripplanner.model.StopTime;
@@ -70,6 +68,8 @@
import org.opentripplanner.updater.spi.UpdateError;
import org.opentripplanner.updater.spi.UpdateResult;
import org.opentripplanner.updater.spi.UpdateSuccess;
+import org.opentripplanner.utils.lang.StringUtils;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/AvailabiltyUpdate.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/AvailabiltyUpdate.java
index a9d352cbaf2..414a62938ba 100644
--- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/AvailabiltyUpdate.java
+++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/AvailabiltyUpdate.java
@@ -1,8 +1,8 @@
package org.opentripplanner.updater.vehicle_parking;
import java.util.Objects;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.lang.IntUtils;
public record AvailabiltyUpdate(FeedScopedId vehicleParkingId, int spacesAvailable) {
public AvailabiltyUpdate {
diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java
index 96544321735..b23f46522c3 100644
--- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java
+++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java
@@ -4,7 +4,6 @@
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.vehicle_parking.VehicleParking;
import org.opentripplanner.routing.vehicle_parking.VehicleParkingService;
import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces;
@@ -14,6 +13,7 @@
import org.opentripplanner.updater.spi.DataSource;
import org.opentripplanner.updater.spi.PollingGraphUpdater;
import org.opentripplanner.updater.spi.WriteToGraphCallback;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java
index 59aea16e928..830429151b4 100644
--- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java
+++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java
@@ -8,7 +8,6 @@
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.graph.Graph;
import org.opentripplanner.routing.linking.DisposableEdgeCollection;
import org.opentripplanner.routing.linking.LinkingDirection;
@@ -28,6 +27,7 @@
import org.opentripplanner.updater.spi.DataSource;
import org.opentripplanner.updater.spi.PollingGraphUpdater;
import org.opentripplanner.updater.spi.WriteToGraphCallback;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_position/GtfsRealtimeHttpVehiclePositionSource.java b/application/src/main/java/org/opentripplanner/updater/vehicle_position/GtfsRealtimeHttpVehiclePositionSource.java
index ec0be6822e7..31ae9a32faf 100644
--- a/application/src/main/java/org/opentripplanner/updater/vehicle_position/GtfsRealtimeHttpVehiclePositionSource.java
+++ b/application/src/main/java/org/opentripplanner/updater/vehicle_position/GtfsRealtimeHttpVehiclePositionSource.java
@@ -10,8 +10,8 @@
import org.opentripplanner.framework.io.OtpHttpClient;
import org.opentripplanner.framework.io.OtpHttpClientException;
import org.opentripplanner.framework.io.OtpHttpClientFactory;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.updater.spi.HttpHeaders;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_position/PollingVehiclePositionUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_position/PollingVehiclePositionUpdater.java
index c2860d1d091..4c487ac997b 100644
--- a/application/src/main/java/org/opentripplanner/updater/vehicle_position/PollingVehiclePositionUpdater.java
+++ b/application/src/main/java/org/opentripplanner/updater/vehicle_position/PollingVehiclePositionUpdater.java
@@ -3,12 +3,12 @@
import com.google.transit.realtime.GtfsRealtime.VehiclePosition;
import java.util.List;
import java.util.Set;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository;
import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle;
import org.opentripplanner.standalone.config.routerconfig.updaters.VehiclePositionsUpdaterConfig;
import org.opentripplanner.updater.spi.PollingGraphUpdater;
import org.opentripplanner.updater.spi.WriteToGraphCallback;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_position/RealtimeVehiclePatternMatcher.java b/application/src/main/java/org/opentripplanner/updater/vehicle_position/RealtimeVehiclePatternMatcher.java
index 0723adc91b8..27ee0d479ab 100644
--- a/application/src/main/java/org/opentripplanner/updater/vehicle_position/RealtimeVehiclePatternMatcher.java
+++ b/application/src/main/java/org/opentripplanner/updater/vehicle_position/RealtimeVehiclePatternMatcher.java
@@ -30,8 +30,6 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.opentripplanner.framework.geometry.WgsCoordinate;
-import org.opentripplanner.framework.lang.StringUtils;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository;
import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle;
import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle.StopStatus;
@@ -48,6 +46,8 @@
import org.opentripplanner.updater.spi.UpdateError;
import org.opentripplanner.updater.spi.UpdateResult;
import org.opentripplanner.updater.spi.UpdateSuccess;
+import org.opentripplanner.utils.lang.StringUtils;
+import org.opentripplanner.utils.time.ServiceDateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdater.java
index 77c3c8d01c6..24686edce6c 100644
--- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdater.java
+++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdater.java
@@ -10,11 +10,6 @@
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import org.opentripplanner.framework.lang.ObjectUtils;
-import org.opentripplanner.framework.logging.Throttle;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.linking.DisposableEdgeCollection;
import org.opentripplanner.routing.linking.LinkingDirection;
import org.opentripplanner.routing.linking.VertexLinker;
@@ -37,6 +32,11 @@
import org.opentripplanner.updater.spi.UpdaterConstructionException;
import org.opentripplanner.updater.spi.WriteToGraphCallback;
import org.opentripplanner.updater.vehicle_rental.datasources.VehicleRentalDatasource;
+import org.opentripplanner.utils.lang.ObjectUtils;
+import org.opentripplanner.utils.logging.Throttle;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsGeofencingZoneMapper.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsGeofencingZoneMapper.java
index 22a4131f338..934243a1e76 100644
--- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsGeofencingZoneMapper.java
+++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsGeofencingZoneMapper.java
@@ -10,9 +10,9 @@
import org.mobilitydata.gbfs.v2_3.geofencing_zones.GBFSGeofencingZones;
import org.opentripplanner.framework.geometry.GeometryUtils;
import org.opentripplanner.framework.geometry.UnsupportedGeometryException;
-import org.opentripplanner.framework.lang.StringUtils;
import org.opentripplanner.service.vehiclerental.model.GeofencingZone;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java
index c441efb974a..e3e86981bc8 100644
--- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java
+++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java
@@ -17,12 +17,12 @@
import org.opentripplanner.framework.application.OTPFeature;
import org.opentripplanner.framework.io.OtpHttpClient;
import org.opentripplanner.framework.io.OtpHttpClientFactory;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.service.vehiclerental.model.GeofencingZone;
import org.opentripplanner.service.vehiclerental.model.RentalVehicleType;
import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace;
import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem;
import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
index 4a334e32a7d..cf1ad2b591c 100644
--- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
+++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
@@ -3089,6 +3089,12 @@ enum PlanAccessMode {
"""
BICYCLE_RENTAL
"""
+ Driving to a stop and boarding a vehicle with the car.
+ Access can use driving only if the mode used for transfers
+ and egress is also `CAR`.
+ """
+ CAR
+ """
Getting dropped off by a car to a location that is accessible with a car.
Note, this can include walking after the drop-off.
"""
@@ -3198,6 +3204,11 @@ enum PlanEgressMode {
"""
BICYCLE_RENTAL
"""
+ Driving from a stop to the destination. Egress can use driving only if the mode
+ used for access and transfers is also `CAR`.
+ """
+ CAR
+ """
Getting picked up by a car from a location that is accessible with a car.
Note, this can include walking before the pickup.
"""
@@ -3235,6 +3246,11 @@ enum PlanTransferMode {
cycling if the mode used for access and egress is also `BICYCLE`.
"""
BICYCLE
+ """
+ Driving between transit vehicles. Transfers can only use driving if the mode
+ used for access and egress is also `CAR`.
+ """
+ CAR
"Walking between transit vehicles (typically between stops)."
WALK
}
diff --git a/application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql b/application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql
index 1ef883b4038..ed182473bb6 100644
--- a/application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql
+++ b/application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql
@@ -831,7 +831,12 @@ type QueryType {
modes: Modes,
"The maximum number of trip patterns to return. Note! This reduce the number of trip patterns AFTER the OTP travel search is done in a post-filtering process. There is little/no performance gain in reducing the number of trip patterns returned. See also the trip meta-data on how to implement paging."
numTripPatterns: Int = 50,
- "Use the cursor to go to the next \"page\" of itineraries. Copy the cursor from the last response and keep the original request as is. This will enable you to search for itineraries in the next or previous time-window."
+ """
+ Use the cursor to go to the next "page" of itineraries. Copy the cursor from the last
+ response and keep the original request as is. This will enable you to search for
+ itineraries in the next or previous search-window. The paging will automatically scale
+ up/down the search-window to fit the `numTripPatterns`.
+ """
pageCursor: String,
"The list of points the journey is required to pass through."
passThroughPoints: [PassThroughPoint!] @deprecated(reason : "Use via instead"),
@@ -868,13 +873,35 @@ type QueryType {
"""
The length of the search-window in minutes. This parameter is optional.
- The search-window is defined as the duration between the earliest-departure-time(EDT) and the latest-departure-time(LDT). OTP will search for all itineraries in this departure window. If `arriveBy=true` the `dateTime` parameter is the latest-arrival-time, so OTP will dynamically calculate the EDT. Using a short search-window is faster than using a longer one, but the search duration is not linear. Using a "too" short search-window will waste resources server side, while using a search-window that is too long will be slow.
+ The search-window is defined as the duration between the earliest-departure-time(EDT) and
+ the latest-departure-time(LDT). OTP will search for all itineraries in this departure
+ window. If `arriveBy=true` the `dateTime` parameter is the latest-arrival-time, so OTP
+ will dynamically calculate the EDT. Using a short search-window is faster than using a
+ longer one, but the search duration is not linear. Using a "too" short search-window will
+ waste resources server side, while using a search-window that is too long will be slow.
- OTP will dynamically calculate a reasonable value for the search-window, if not provided. The calculation comes with a significant overhead (10-20% extra). Whether you should use the dynamic calculated value or pass in a value depends on your use-case. For a travel planner in a small geographical area, with a dense network of public transportation, a fixed value between 40 minutes and 2 hours makes sense. To find the appropriate search-window, adjust it so that the number of itineraries on average is around the wanted `numItineraries`. Make sure you set the `numItineraries` to a high number while testing. For a country wide area like Norway, using the dynamic search-window is the best.
+ OTP will dynamically calculate a reasonable value for the search-window, if not provided. The
+ calculation comes with a significant overhead (10-20% extra). Whether you should use the
+ dynamic calculated value or pass in a value depends on your use-case. For a travel planner
+ in a small geographical area, with a dense network of public transportation, a fixed value
+ between 40 minutes and 2 hours makes sense. To find the appropriate search-window, adjust it
+ so that the number of itineraries on average is around the wanted `numTripPatterns`. Make
+ sure you set the `numTripPatterns` to a high number while testing. For a country wide area like
+ Norway, using the dynamic search-window is the best.
- When paginating, the search-window is calculated using the `numItineraries` in the original search together with statistics from the search for the last page. This behaviour is configured server side, and can not be overridden from the client.
+ When paginating, the search-window is calculated using the `numTripPatterns` in the original
+ search together with statistics from the search for the last page. This behaviour is
+ configured server side, and can not be overridden from the client. The paging may even
+ exceed the maximum value.
- The search-window used is returned to the response metadata as `searchWindowUsed` for debugging purposes.
+ The search-window used is returned to the response metadata as `searchWindowUsed`.
+ This can be used by the client to calculate the when the next page start/end.
+
+ Note! In some cases you may have to page many times to get all the results you want.
+ This is intended. Increasing the search-window beyond the max value is NOT going to be
+ much faster. Instead the client can inform the user about the progress.
+
+ Maximum value: 1440 minutes (24h)
"""
searchWindow: Int,
"""
diff --git a/application/src/test/java/org/opentripplanner/DateTimeHelper.java b/application/src/test/java/org/opentripplanner/DateTimeHelper.java
index 6a058118d1b..2751af48daf 100644
--- a/application/src/test/java/org/opentripplanner/DateTimeHelper.java
+++ b/application/src/test/java/org/opentripplanner/DateTimeHelper.java
@@ -3,7 +3,7 @@
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.ZonedDateTime;
-import org.opentripplanner.framework.time.DateUtils;
+import org.opentripplanner.utils.time.DateUtils;
public class DateTimeHelper {
diff --git a/application/src/test/java/org/opentripplanner/OtpArchitectureModules.java b/application/src/test/java/org/opentripplanner/OtpArchitectureModules.java
index 72520acaa1c..8d6fc431f50 100644
--- a/application/src/test/java/org/opentripplanner/OtpArchitectureModules.java
+++ b/application/src/test/java/org/opentripplanner/OtpArchitectureModules.java
@@ -18,6 +18,9 @@ public interface OtpArchitectureModules {
/* OTP Modules */
Package OTP_ROOT = Package.of("org.opentripplanner");
+
+ Package UTILS_PACKAGE = OTP_ROOT.subPackage("utils");
+
Package DATASTORE = OTP_ROOT.subPackage("datastore");
Package FRAMEWORK = OTP_ROOT.subPackage("framework");
Module GEO_UTILS = Module.of(JTS_GEOM, FRAMEWORK.subPackage("geometry"));
@@ -37,15 +40,20 @@ public interface OtpArchitectureModules {
* This is a bag of TRUE util classes - no dependencies to other OTP classes or frameworks
* (except true utilities like slf4j).
*/
+ Module OTP_UTILS = Module.of(
+ UTILS_PACKAGE.subPackage("collection"),
+ UTILS_PACKAGE.subPackage("lang"),
+ UTILS_PACKAGE.subPackage("logging"),
+ UTILS_PACKAGE.subPackage("text"),
+ UTILS_PACKAGE.subPackage("time"),
+ UTILS_PACKAGE.subPackage("tostring")
+ );
+
Module FRAMEWORK_UTILS = Module.of(
+ OTP_UTILS,
FRAMEWORK.subPackage("application"),
FRAMEWORK.subPackage("error"),
FRAMEWORK.subPackage("i18n"),
- FRAMEWORK.subPackage("lang"),
- FRAMEWORK.subPackage("logging"),
- FRAMEWORK.subPackage("text"),
- FRAMEWORK.subPackage("time"),
- FRAMEWORK.subPackage("tostring"),
FRAMEWORK.subPackage("concurrent"),
FRAMEWORK.subPackage("doc")
);
diff --git a/application/src/test/java/org/opentripplanner/TestServerContext.java b/application/src/test/java/org/opentripplanner/TestServerContext.java
index fd9d75def75..38bbd81316b 100644
--- a/application/src/test/java/org/opentripplanner/TestServerContext.java
+++ b/application/src/test/java/org/opentripplanner/TestServerContext.java
@@ -55,6 +55,7 @@ public static OtpServerRequestContext createServerContext(
createRealtimeVehicleService(transitService),
createVehicleRentalService(),
createEmissionsService(),
+ null,
routerConfig.flexParameters(),
List.of(),
null,
diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java
index 406217e6604..3aad9075f73 100644
--- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java
+++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java
@@ -38,7 +38,6 @@
import org.opentripplanner._support.time.ZoneIds;
import org.opentripplanner.ext.fares.FaresToItineraryMapper;
import org.opentripplanner.ext.fares.impl.DefaultFareService;
-import org.opentripplanner.framework.collection.ListUtils;
import org.opentripplanner.framework.geometry.WgsCoordinate;
import org.opentripplanner.framework.i18n.I18NString;
import org.opentripplanner.framework.i18n.NonLocalizedString;
@@ -97,6 +96,7 @@
import org.opentripplanner.transit.service.TimetableRepository;
import org.opentripplanner.transit.service.TransitEditorService;
import org.opentripplanner.transit.service.TransitService;
+import org.opentripplanner.utils.collection.ListUtils;
class GraphQLIntegrationTest {
diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/BikesAllowedMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/BikesAllowedMapperTest.java
index 5ed267f1f4f..035d3605a21 100644
--- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/BikesAllowedMapperTest.java
+++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/BikesAllowedMapperTest.java
@@ -2,20 +2,16 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
-import java.util.Arrays;
import org.junit.jupiter.api.Test;
+import org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLBikesAllowed;
import org.opentripplanner.transit.model.network.BikeAccess;
class BikesAllowedMapperTest {
@Test
void mapping() {
- Arrays
- .stream(BikeAccess.values())
- .filter(ba -> ba != BikeAccess.UNKNOWN)
- .forEach(d -> {
- var mapped = BikesAllowedMapper.map(d);
- assertEquals(d.toString(), mapped.toString());
- });
+ assertEquals(GraphQLBikesAllowed.NO_INFORMATION, BikesAllowedMapper.map(BikeAccess.UNKNOWN));
+ assertEquals(GraphQLBikesAllowed.NOT_ALLOWED, BikesAllowedMapper.map(BikeAccess.NOT_ALLOWED));
+ assertEquals(GraphQLBikesAllowed.ALLOWED, BikesAllowedMapper.map(BikeAccess.ALLOWED));
}
}
diff --git a/application/src/test/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchemaTest.java b/application/src/test/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchemaTest.java
index bfbaedfabbf..4cdb0586aa7 100644
--- a/application/src/test/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchemaTest.java
+++ b/application/src/test/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchemaTest.java
@@ -9,6 +9,7 @@
import java.io.File;
import org.junit.jupiter.api.Test;
import org.opentripplanner._support.time.ZoneIds;
+import org.opentripplanner.routing.algorithm.raptoradapter.transit.TransitTuningParameters;
import org.opentripplanner.routing.api.request.RouteRequest;
class TransmodelGraphQLSchemaTest {
@@ -19,7 +20,11 @@ class TransmodelGraphQLSchemaTest {
@Test
void testSchemaBuild() {
- var schema = TransmodelGraphQLSchema.create(new RouteRequest(), ZoneIds.OSLO);
+ var schema = TransmodelGraphQLSchema.create(
+ new RouteRequest(),
+ ZoneIds.OSLO,
+ TransitTuningParameters.FOR_TEST
+ );
assertNotNull(schema);
String original = readFile(SCHEMA_FILE);
diff --git a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java
index 593fb622adc..372cda4f308 100644
--- a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java
+++ b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java
@@ -5,8 +5,8 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.model.plan.TestItineraryBuilder.newItinerary;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import graphql.ExecutionInput;
import graphql.execution.ExecutionId;
@@ -145,6 +145,7 @@ void setup() {
new DefaultRealtimeVehicleService(transitService),
new DefaultVehicleRentalService(),
new DefaultEmissionsService(new EmissionsDataModel()),
+ null,
RouterConfig.DEFAULT.flexParameters(),
List.of(),
null,
diff --git a/application/src/test/java/org/opentripplanner/apis/transmodel/model/plan/TripPlanTimePenaltyDtoTest.java b/application/src/test/java/org/opentripplanner/apis/transmodel/model/plan/TripPlanTimePenaltyDtoTest.java
index 58054a3c778..0548bde0612 100644
--- a/application/src/test/java/org/opentripplanner/apis/transmodel/model/plan/TripPlanTimePenaltyDtoTest.java
+++ b/application/src/test/java/org/opentripplanner/apis/transmodel/model/plan/TripPlanTimePenaltyDtoTest.java
@@ -7,11 +7,11 @@
import org.junit.jupiter.api.Test;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.TimeAndCost;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.Place;
import org.opentripplanner.model.plan.TestItineraryBuilder;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
+import org.opentripplanner.utils.time.DurationUtils;
class TripPlanTimePenaltyDtoTest {
diff --git a/application/src/test/java/org/opentripplanner/apis/transmodel/support/ExecutionResultMapperTest.java b/application/src/test/java/org/opentripplanner/apis/transmodel/support/ExecutionResultMapperTest.java
index b697adc9288..7cc373e5145 100644
--- a/application/src/test/java/org/opentripplanner/apis/transmodel/support/ExecutionResultMapperTest.java
+++ b/application/src/test/java/org/opentripplanner/apis/transmodel/support/ExecutionResultMapperTest.java
@@ -1,7 +1,7 @@
package org.opentripplanner.apis.transmodel.support;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.lang.StringUtils.quoteReplace;
+import static org.opentripplanner.utils.lang.StringUtils.quoteReplace;
import graphql.ExecutionResult;
import graphql.GraphQLError;
diff --git a/application/src/test/java/org/opentripplanner/datastore/OtpDataStoreTest.java b/application/src/test/java/org/opentripplanner/datastore/OtpDataStoreTest.java
index 1733a97777b..d7afc55a556 100644
--- a/application/src/test/java/org/opentripplanner/datastore/OtpDataStoreTest.java
+++ b/application/src/test/java/org/opentripplanner/datastore/OtpDataStoreTest.java
@@ -34,8 +34,8 @@
import org.opentripplanner.datastore.api.FileType;
import org.opentripplanner.datastore.api.OtpDataStoreConfig;
import org.opentripplanner.datastore.configure.DataStoreModule;
-import org.opentripplanner.framework.lang.StringUtils;
import org.opentripplanner.standalone.config.OtpConfigLoader;
+import org.opentripplanner.utils.lang.StringUtils;
public class OtpDataStoreTest {
diff --git a/application/src/test/java/org/opentripplanner/framework/FrameworkArchitectureTest.java b/application/src/test/java/org/opentripplanner/framework/FrameworkArchitectureTest.java
index 9e44dd05dda..1bfc576d822 100644
--- a/application/src/test/java/org/opentripplanner/framework/FrameworkArchitectureTest.java
+++ b/application/src/test/java/org/opentripplanner/framework/FrameworkArchitectureTest.java
@@ -6,6 +6,7 @@
import static org.opentripplanner.OtpArchitectureModules.GNU_TROVE;
import static org.opentripplanner.OtpArchitectureModules.JTS_GEOM;
import static org.opentripplanner.OtpArchitectureModules.OPEN_GIS;
+import static org.opentripplanner.OtpArchitectureModules.OTP_UTILS;
import org.junit.jupiter.api.Test;
import org.opentripplanner._support.arch.Module;
@@ -27,16 +28,13 @@ public class FrameworkArchitectureTest {
private static final Package GEOMETRY = FRAMEWORK.subPackage("geometry");
private static final Package I18N = FRAMEWORK.subPackage("i18n");
private static final Package IO = FRAMEWORK.subPackage("io");
- private static final Package LANG = FRAMEWORK.subPackage("lang");
private static final Package LOGGING = FRAMEWORK.subPackage("logging");
private static final Package RESOURCES = FRAMEWORK.subPackage("resources");
- private static final Package TEXT = FRAMEWORK.subPackage("text");
private static final Package TIME = FRAMEWORK.subPackage("time");
- private static final Package TO_STRING = FRAMEWORK.subPackage("tostring");
@Test
void enforceApplicationPackageDependencies() {
- APPLICATION.dependsOn(LANG).verify();
+ APPLICATION.dependsOn(OTP_UTILS).verify();
}
@Test
@@ -52,16 +50,7 @@ void enforceFunctionalPackageDependencies() {
@Test
void enforceGeometryPackageDependencies() {
GEOMETRY
- .dependsOn(
- GEO_JSON,
- GEO_TOOLS,
- GNU_TROVE,
- JTS_GEOM,
- OPEN_GIS,
- LANG,
- TO_STRING,
- GUAVA_COLLECTIONS
- )
+ .dependsOn(GEO_JSON, GEO_TOOLS, GNU_TROVE, JTS_GEOM, OPEN_GIS, GUAVA_COLLECTIONS, OTP_UTILS)
.verify();
}
@@ -75,14 +64,9 @@ void enforceIoPackageDependencies() {
IO.dependsOn(APACHE_HTTP, XML_MODULES).verify();
}
- @Test
- void enforceLangPackageDependencies() {
- LANG.verify();
- }
-
@Test
void enforceLoggingPackageDependencies() {
- LOGGING.dependsOn(TEXT, TIME).verify();
+ LOGGING.dependsOn(OTP_UTILS).verify();
}
@Test
@@ -90,18 +74,8 @@ void enforceResourcesPackageDependencies() {
RESOURCES.verify();
}
- @Test
- void enforceTextPackageDependencies() {
- TEXT.dependsOn(LANG).verify();
- }
-
@Test
void enforceTimePackageDependencies() {
- TIME.dependsOn(LOGGING).verify();
- }
-
- @Test
- void enforceToStingPackageDependencies() {
- TO_STRING.dependsOn(LANG, TIME).verify();
+ TIME.dependsOn(OTP_UTILS).verify();
}
}
diff --git a/application/src/test/java/org/opentripplanner/framework/geometry/WgsCoordinateTest.java b/application/src/test/java/org/opentripplanner/framework/geometry/WgsCoordinateTest.java
index 5cd7ac66123..d9da08044a5 100644
--- a/application/src/test/java/org/opentripplanner/framework/geometry/WgsCoordinateTest.java
+++ b/application/src/test/java/org/opentripplanner/framework/geometry/WgsCoordinateTest.java
@@ -5,6 +5,7 @@
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.opentripplanner.framework.geometry.WgsCoordinate.GREENWICH;
import java.util.List;
import org.junit.jupiter.api.Test;
@@ -99,10 +100,17 @@ void add() {
assertEquals(new WgsCoordinate(12d, 5d), new WgsCoordinate(9d, 1d).add(3d, 4d));
}
+ @Test
+ void testIsNorthOf() {
+ var c = new WgsCoordinate(10.0, 30.0);
+ assertTrue(c.isNorthOf(9.9));
+ assertFalse(c.isNorthOf(10.1));
+ }
+
@Test
void testGreenwich() {
- assertEquals(51.48d, WgsCoordinate.GREENWICH.latitude());
- assertEquals(0d, WgsCoordinate.GREENWICH.longitude());
+ assertEquals(51.48d, GREENWICH.latitude());
+ assertEquals(0d, GREENWICH.longitude());
}
@Test
@@ -120,4 +128,9 @@ void roundingTo100m() {
assertEquals(10, rounded.longitude());
assertEquals(53.557, rounded.latitude());
}
+
+ @Test
+ void testDistanceTo() {
+ assertEquals(131_394, (int) GREENWICH.distanceTo(GREENWICH.add(-1.0, 1.0)));
+ }
}
diff --git a/application/src/test/java/org/opentripplanner/framework/model/TimeAndCostTest.java b/application/src/test/java/org/opentripplanner/framework/model/TimeAndCostTest.java
index 4660da480b2..5eca02043ef 100644
--- a/application/src/test/java/org/opentripplanner/framework/model/TimeAndCostTest.java
+++ b/application/src/test/java/org/opentripplanner/framework/model/TimeAndCostTest.java
@@ -6,7 +6,7 @@
import java.time.Duration;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.time.DurationUtils;
class TimeAndCostTest {
diff --git a/application/src/test/java/org/opentripplanner/framework/time/DateUtilsTest.java b/application/src/test/java/org/opentripplanner/framework/time/DateUtilsTest.java
deleted file mode 100644
index d89eea5d73b..00000000000
--- a/application/src/test/java/org/opentripplanner/framework/time/DateUtilsTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.opentripplanner.framework.time;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.DateUtils.secToHHMM;
-
-import java.time.LocalDate;
-import java.time.ZoneId;
-import java.time.ZonedDateTime;
-import org.junit.jupiter.api.Test;
-import org.opentripplanner._support.time.ZoneIds;
-
-public class DateUtilsTest {
-
- // Create some time constants: T_(_)?
- private static final int T00_00 = 0;
- private static final int T00_00_01 = 1;
- private static final int T00_00_59 = 59;
- private static final int T00_01 = 60;
- private static final int T00_05 = 300;
- private static final int T08_07 = (8 * 60 + 7) * 60;
- private static final int T08_47 = (8 * 60 + 47) * 60;
- private static final int T35_00 = 35 * 3600;
-
- // Create some negative time constants: N_(_)?
- private static final int N00_00_01 = -1;
- private static final int N00_00_59 = -59;
- private static final int N00_05 = -300;
- private static final int N08_00 = -8 * 3600;
- private static final int N08_07 = -(8 * 60 + 7) * 60;
- private static final int N08_47 = -(8 * 60 + 47) * 60;
-
- public static final ZoneId UTC = ZoneIds.UTC;
-
- @Test
- public final void testToDate() {
- ZonedDateTime date = DateUtils.toZonedDateTime("1970-01-01", "00:00", UTC);
- assertEquals("1970-01-01", date.toLocalDate().toString());
- assertEquals(0, date.toEpochSecond());
-
- date = DateUtils.toZonedDateTime(null, "00:00", UTC);
- assertEquals(LocalDate.now(UTC).toString(), date.toLocalDate().toString());
- assertEquals(0, date.toEpochSecond() % TimeUtils.ONE_DAY_SECONDS);
- }
-
- @Test
- public final void testSecToHHMM() {
- assertEquals("0:00", secToHHMM(T00_00), "Handle zero");
- assertEquals("0:00", secToHHMM(T00_00_01), "Skip seconds(1 sec)");
- assertEquals("0:00", secToHHMM(T00_00_59), "Skip seconds(59 sec), round down");
- assertEquals("0:01", secToHHMM(T00_01), "1 minute with leading zero");
- assertEquals("0:05", secToHHMM(T00_05), "5 minutes");
- assertEquals("8:07", secToHHMM(T08_07), "Hour and min with leading zero on minute");
- assertEquals("8:47", secToHHMM(T08_47), "8 hours and 47 minutes");
- assertEquals("35:00", secToHHMM(T35_00), "allow ServiceTime beyond 24 hours");
-
- // Negative times
- assertEquals("-0:00", secToHHMM(N00_00_01), "1 sec - round to minus zero");
- assertEquals("-0:00", secToHHMM(N00_00_59), "59 sec - round down with minus sign");
- assertEquals("-0:05", secToHHMM(N00_05), "minus 5 min");
- assertEquals("-8:00", secToHHMM(N08_00));
- assertEquals("-8:07", secToHHMM(N08_07));
- assertEquals("-8:47", secToHHMM(N08_47));
- }
-}
diff --git a/application/src/test/java/org/opentripplanner/framework/token/TestTokenSchemaConstants.java b/application/src/test/java/org/opentripplanner/framework/token/TestTokenSchemaConstants.java
index 09ac58a0d2d..94303a28e14 100644
--- a/application/src/test/java/org/opentripplanner/framework/token/TestTokenSchemaConstants.java
+++ b/application/src/test/java/org/opentripplanner/framework/token/TestTokenSchemaConstants.java
@@ -3,7 +3,7 @@
import java.time.Duration;
import java.time.Instant;
import java.time.Month;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.time.DurationUtils;
public interface TestTokenSchemaConstants {
// Token field names. These are used to reference a specific field value in theString BYTE_FIELD = "AByte";
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/BuildConfigurationDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/BuildConfigurationDocTest.java
index 8189f18f20e..a44d013fd03 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/BuildConfigurationDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/BuildConfigurationDocTest.java
@@ -3,13 +3,13 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_3;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceJsonExample;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceParametersDetails;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceParametersTable;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_3;
import java.io.File;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/EmissionsConfigurationDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/EmissionsConfigurationDocTest.java
index 5010c78d527..94f0679cdfc 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/EmissionsConfigurationDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/EmissionsConfigurationDocTest.java
@@ -3,11 +3,11 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_4;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceSection;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_4;
import java.io.File;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/FlexConfigurationDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/FlexConfigurationDocTest.java
index e18090466b9..1958d200ca3 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/FlexConfigurationDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/FlexConfigurationDocTest.java
@@ -3,11 +3,11 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_4;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceSection;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_4;
import java.io.File;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/OsmMapperDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/OsmMapperDocTest.java
index 91c6f5c530a..e2844437ca5 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/OsmMapperDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/OsmMapperDocTest.java
@@ -18,13 +18,13 @@
import java.util.Set;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
-import org.opentripplanner.framework.text.Table;
-import org.opentripplanner.framework.text.TableBuilder;
import org.opentripplanner.generate.doc.framework.GeneratesDocumentation;
import org.opentripplanner.osm.tagmapping.OsmTagMapper;
import org.opentripplanner.osm.tagmapping.OsmTagMapperSource;
import org.opentripplanner.osm.wayproperty.SafetyFeatures;
import org.opentripplanner.osm.wayproperty.WayPropertySet;
+import org.opentripplanner.utils.text.Table;
+import org.opentripplanner.utils.text.TableBuilder;
@GeneratesDocumentation
public class OsmMapperDocTest {
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/RideHailingDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/RideHailingDocTest.java
index 2d04e002413..fe959d9138d 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/RideHailingDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/RideHailingDocTest.java
@@ -4,11 +4,11 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_4;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceSection;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_4;
import java.io.File;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/RouteRequestDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/RouteRequestDocTest.java
index b4725c5e2a1..c51660a9a60 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/RouteRequestDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/RouteRequestDocTest.java
@@ -4,13 +4,13 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_3;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceJsonExample;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceParametersDetails;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceParametersTable;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_3;
import java.io.File;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/RouterConfigurationDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/RouterConfigurationDocTest.java
index 77490c506fd..cdb10e28c6a 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/RouterConfigurationDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/RouterConfigurationDocTest.java
@@ -4,13 +4,13 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_3;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceJsonExample;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceParametersDetails;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceParametersTable;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_3;
import java.io.File;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/SiriAzureConfigDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/SiriAzureConfigDocTest.java
index fcf93770f38..003b29ebcbb 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/SiriAzureConfigDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/SiriAzureConfigDocTest.java
@@ -4,11 +4,11 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_4;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceSection;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_4;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.File;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/SiriConfigDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/SiriConfigDocTest.java
index 71df3027c7d..b53c5370b53 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/SiriConfigDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/SiriConfigDocTest.java
@@ -4,11 +4,11 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_4;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceSection;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_4;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.File;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/SiriGooglePubSubConfigDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/SiriGooglePubSubConfigDocTest.java
index ce414b298d0..c6daed2e4b0 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/SiriGooglePubSubConfigDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/SiriGooglePubSubConfigDocTest.java
@@ -4,11 +4,11 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_4;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceSection;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_4;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.File;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/UpdaterConfigDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/UpdaterConfigDocTest.java
index 7a3f2969c4d..234d4c68b33 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/UpdaterConfigDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/UpdaterConfigDocTest.java
@@ -4,11 +4,11 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_4;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceSection;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_4;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.File;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/VehicleParkingDocTest.java b/application/src/test/java/org/opentripplanner/generate/doc/VehicleParkingDocTest.java
index caffafdf72b..cca0d45d0f5 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/VehicleParkingDocTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/VehicleParkingDocTest.java
@@ -4,11 +4,11 @@
import static org.opentripplanner.framework.io.FileUtils.assertFileEquals;
import static org.opentripplanner.framework.io.FileUtils.readFile;
import static org.opentripplanner.framework.io.FileUtils.writeFile;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_4;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.TEMPLATE_PATH;
import static org.opentripplanner.generate.doc.framework.DocsTestConstants.USER_DOC_PATH;
import static org.opentripplanner.generate.doc.framework.TemplateUtil.replaceSection;
import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_4;
import java.io.File;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/framework/AbstractTable.java b/application/src/test/java/org/opentripplanner/generate/doc/framework/AbstractTable.java
index 1805b8e6dde..0af3cc938cf 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/framework/AbstractTable.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/framework/AbstractTable.java
@@ -1,18 +1,18 @@
package org.opentripplanner.generate.doc.framework;
-import static org.opentripplanner.framework.text.MarkdownFormatter.code;
-import static org.opentripplanner.framework.text.MarkdownFormatter.escapeInTable;
import static org.opentripplanner.generate.doc.framework.NodeAdapterHelper.anchor;
import static org.opentripplanner.standalone.config.framework.json.ConfigType.ENUM_MAP;
import static org.opentripplanner.standalone.config.framework.json.ConfigType.ENUM_SET;
+import static org.opentripplanner.utils.text.MarkdownFormatter.code;
+import static org.opentripplanner.utils.text.MarkdownFormatter.escapeInTable;
import java.util.List;
-import org.opentripplanner.framework.text.MarkdownFormatter;
-import org.opentripplanner.framework.text.Table;
-import org.opentripplanner.framework.text.TableBuilder;
import org.opentripplanner.standalone.config.framework.json.ConfigType;
import org.opentripplanner.standalone.config.framework.json.NodeAdapter;
import org.opentripplanner.standalone.config.framework.json.NodeInfo;
+import org.opentripplanner.utils.text.MarkdownFormatter;
+import org.opentripplanner.utils.text.Table;
+import org.opentripplanner.utils.text.TableBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/framework/DocBuilder.java b/application/src/test/java/org/opentripplanner/generate/doc/framework/DocBuilder.java
index 16579075077..ea62f3a052c 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/framework/DocBuilder.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/framework/DocBuilder.java
@@ -1,12 +1,12 @@
package org.opentripplanner.generate.doc.framework;
-import static org.opentripplanner.framework.text.MarkdownFormatter.NEW_LINE;
+import static org.opentripplanner.utils.text.MarkdownFormatter.NEW_LINE;
import com.fasterxml.jackson.databind.JsonNode;
import java.util.List;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.text.MarkdownFormatter;
import org.opentripplanner.standalone.config.framework.json.EnumMapper;
+import org.opentripplanner.utils.text.MarkdownFormatter;
/**
* Builder for creating a new document
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/framework/DocBuilderTest.java b/application/src/test/java/org/opentripplanner/generate/doc/framework/DocBuilderTest.java
index 8885a400af8..1a9796e9aac 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/framework/DocBuilderTest.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/framework/DocBuilderTest.java
@@ -1,7 +1,7 @@
package org.opentripplanner.generate.doc.framework;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.text.MarkdownFormatter.HEADER_1;
+import static org.opentripplanner.utils.text.MarkdownFormatter.HEADER_1;
import java.util.Arrays;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/framework/ParameterDetailsList.java b/application/src/test/java/org/opentripplanner/generate/doc/framework/ParameterDetailsList.java
index 6593c7c0359..ea165d3dc16 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/framework/ParameterDetailsList.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/framework/ParameterDetailsList.java
@@ -5,11 +5,11 @@
import static org.opentripplanner.standalone.config.framework.json.ConfigType.ENUM_SET;
import java.util.EnumSet;
-import org.opentripplanner.framework.text.MarkdownFormatter;
import org.opentripplanner.standalone.config.framework.json.ConfigType;
import org.opentripplanner.standalone.config.framework.json.EnumMapper;
import org.opentripplanner.standalone.config.framework.json.NodeAdapter;
import org.opentripplanner.standalone.config.framework.json.NodeInfo;
+import org.opentripplanner.utils.text.MarkdownFormatter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/framework/ParameterSummaryTable.java b/application/src/test/java/org/opentripplanner/generate/doc/framework/ParameterSummaryTable.java
index f95b76b8a0f..8712c0fe47d 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/framework/ParameterSummaryTable.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/framework/ParameterSummaryTable.java
@@ -1,14 +1,14 @@
package org.opentripplanner.generate.doc.framework;
-import static org.opentripplanner.framework.text.Table.Align.Center;
-import static org.opentripplanner.framework.text.Table.Align.Left;
+import static org.opentripplanner.utils.text.Table.Align.Center;
+import static org.opentripplanner.utils.text.Table.Align.Left;
import java.util.List;
-import org.opentripplanner.framework.text.MarkdownFormatter;
-import org.opentripplanner.framework.text.Table;
-import org.opentripplanner.framework.text.TableBuilder;
import org.opentripplanner.standalone.config.framework.json.NodeAdapter;
import org.opentripplanner.standalone.config.framework.json.NodeInfo;
+import org.opentripplanner.utils.text.MarkdownFormatter;
+import org.opentripplanner.utils.text.Table;
+import org.opentripplanner.utils.text.TableBuilder;
public class ParameterSummaryTable extends AbstractTable {
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/support/ConfigTypeTable.java b/application/src/test/java/org/opentripplanner/generate/doc/support/ConfigTypeTable.java
index 85c9476549c..e85eee9eedb 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/support/ConfigTypeTable.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/support/ConfigTypeTable.java
@@ -1,8 +1,8 @@
package org.opentripplanner.generate.doc.support;
-import org.opentripplanner.framework.text.MarkdownFormatter;
-import org.opentripplanner.framework.text.Table;
import org.opentripplanner.standalone.config.framework.json.ConfigType;
+import org.opentripplanner.utils.text.MarkdownFormatter;
+import org.opentripplanner.utils.text.Table;
@SuppressWarnings("NewClassNamingConvention")
public class ConfigTypeTable {
diff --git a/application/src/test/java/org/opentripplanner/generate/doc/support/OTPFeatureTable.java b/application/src/test/java/org/opentripplanner/generate/doc/support/OTPFeatureTable.java
index 22966028192..ccdc1337b87 100644
--- a/application/src/test/java/org/opentripplanner/generate/doc/support/OTPFeatureTable.java
+++ b/application/src/test/java/org/opentripplanner/generate/doc/support/OTPFeatureTable.java
@@ -1,12 +1,12 @@
package org.opentripplanner.generate.doc.support;
-import static org.opentripplanner.framework.text.MarkdownFormatter.checkMark;
-import static org.opentripplanner.framework.text.Table.Align.Center;
-import static org.opentripplanner.framework.text.Table.Align.Left;
+import static org.opentripplanner.utils.text.MarkdownFormatter.checkMark;
+import static org.opentripplanner.utils.text.Table.Align.Center;
+import static org.opentripplanner.utils.text.Table.Align.Left;
import org.opentripplanner.framework.application.OTPFeature;
-import org.opentripplanner.framework.text.MarkdownFormatter;
-import org.opentripplanner.framework.text.Table;
+import org.opentripplanner.utils.text.MarkdownFormatter;
+import org.opentripplanner.utils.text.Table;
@SuppressWarnings("NewClassNamingConvention")
public class OTPFeatureTable {
diff --git a/application/src/test/java/org/opentripplanner/graph_builder/issue/api/DataImportIssueSummaryTest.java b/application/src/test/java/org/opentripplanner/graph_builder/issue/api/DataImportIssueSummaryTest.java
index 6524d53547e..989e2ca2016 100644
--- a/application/src/test/java/org/opentripplanner/graph_builder/issue/api/DataImportIssueSummaryTest.java
+++ b/application/src/test/java/org/opentripplanner/graph_builder/issue/api/DataImportIssueSummaryTest.java
@@ -5,7 +5,7 @@
import java.util.List;
import java.util.Map;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.collection.ListUtils;
+import org.opentripplanner.utils.collection.ListUtils;
class DataImportIssueSummaryTest {
diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/DirectTransferGeneratorTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/DirectTransferGeneratorTest.java
index bb3144aa904..8a17e5258d8 100644
--- a/application/src/test/java/org/opentripplanner/graph_builder/module/DirectTransferGeneratorTest.java
+++ b/application/src/test/java/org/opentripplanner/graph_builder/module/DirectTransferGeneratorTest.java
@@ -16,7 +16,6 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;
import org.opentripplanner.TestOtpModel;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore;
import org.opentripplanner.model.PathTransfer;
import org.opentripplanner.routing.algorithm.GraphRoutingTest;
@@ -31,6 +30,7 @@
import org.opentripplanner.transit.model.network.StopPattern;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.site.StopLocation;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* This creates a graph with trip patterns
diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java
index d04d1a33058..fd7996aefe3 100644
--- a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java
+++ b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java
@@ -1,6 +1,6 @@
package org.opentripplanner.graph_builder.module;
-import static org.junit.jupiter.api.Assertions.assertEquals;
+import static com.google.common.truth.Truth.assertThat;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -9,12 +9,14 @@
import static org.opentripplanner.street.model.StreetTraversalPermission.PEDESTRIAN;
import static org.opentripplanner.transit.model._data.TimetableRepositoryForTest.id;
+import java.util.Arrays;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.opentripplanner.ext.flex.trip.UnscheduledTrip;
import org.opentripplanner.framework.application.OTPFeature;
import org.opentripplanner.framework.geometry.WgsCoordinate;
import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore;
+import org.opentripplanner.model.StopTime;
import org.opentripplanner.routing.graph.Graph;
import org.opentripplanner.street.model._data.StreetModelForTest;
import org.opentripplanner.street.model.edge.Edge;
@@ -23,7 +25,15 @@
import org.opentripplanner.street.model.vertex.TransitStopVertex;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
import org.opentripplanner.transit.model.framework.Deduplicator;
+import org.opentripplanner.transit.model.network.CarAccess;
+import org.opentripplanner.transit.model.network.Route;
+import org.opentripplanner.transit.model.network.StopPattern;
+import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.site.RegularStop;
+import org.opentripplanner.transit.model.site.StopLocation;
+import org.opentripplanner.transit.model.timetable.RealTimeTripTimes;
+import org.opentripplanner.transit.model.timetable.Trip;
+import org.opentripplanner.transit.model.timetable.TripTimesFactory;
import org.opentripplanner.transit.service.SiteRepository;
import org.opentripplanner.transit.service.TimetableRepository;
@@ -41,7 +51,7 @@ void linkingIsIdempotent() {
module.buildGraph();
assertTrue(model.stopVertex().isConnectedToGraph());
- assertEquals(1, model.stopVertex().getOutgoing().size());
+ assertThat(model.stopVertex().getOutgoing()).hasSize(1);
}
@Test
@@ -53,7 +63,7 @@ void linkRegularStop() {
assertTrue(model.stopVertex().isConnectedToGraph());
- assertEquals(1, model.stopVertex().getOutgoing().size());
+ assertThat(model.stopVertex().getOutgoing()).hasSize(1);
var outgoing = model.outgoingLinks().getFirst();
assertInstanceOf(StreetTransitStopLink.class, outgoing);
@@ -77,7 +87,7 @@ void linkFlexStop() {
assertTrue(model.stopVertex().isConnectedToGraph());
// stop is used by a flex trip, needs to be linked to both the walk and car edge
- assertEquals(2, model.stopVertex().getOutgoing().size());
+ assertThat(model.stopVertex().getOutgoing()).hasSize(2);
var linkToWalk = model.outgoingLinks().getFirst();
SplitterVertex walkSplit = (SplitterVertex) linkToWalk.getToVertex();
@@ -92,6 +102,37 @@ void linkFlexStop() {
});
}
+ @Test
+ void linkCarsAllowedStop() {
+ var model = new TestModel();
+ var carsAllowedTrip = TimetableRepositoryForTest
+ .of()
+ .trip("carsAllowedTrip")
+ .withCarsAllowed(CarAccess.ALLOWED)
+ .build();
+ model.withCarsAllowedTrip(carsAllowedTrip, model.stop());
+
+ var module = model.streetLinkerModule();
+
+ module.buildGraph();
+
+ assertTrue(model.stopVertex().isConnectedToGraph());
+
+ // Because the stop is used by a carsAllowed trip it needs to be linked to both the walk and car edge
+ assertThat(model.stopVertex().getOutgoing()).hasSize(2);
+ var linkToWalk = model.outgoingLinks().getFirst();
+ SplitterVertex walkSplit = (SplitterVertex) linkToWalk.getToVertex();
+
+ assertTrue(walkSplit.isConnectedToWalkingEdge());
+ assertFalse(walkSplit.isConnectedToDriveableEdge());
+
+ var linkToCar = model.outgoingLinks().getLast();
+ SplitterVertex carSplit = (SplitterVertex) linkToCar.getToVertex();
+
+ assertFalse(carSplit.isConnectedToWalkingEdge());
+ assertTrue(carSplit.isConnectedToDriveableEdge());
+ }
+
private static class TestModel {
private final TransitStopVertex stopVertex;
@@ -155,5 +196,33 @@ public RegularStop stop() {
public void withFlexTrip(UnscheduledTrip flexTrip) {
timetableRepository.addFlexTrip(flexTrip.getId(), flexTrip);
}
+
+ public void withCarsAllowedTrip(Trip trip, StopLocation... stops) {
+ Route route = TimetableRepositoryForTest.route("carsAllowedRoute").build();
+ var stopTimes = Arrays
+ .stream(stops)
+ .map(s -> {
+ var stopTime = new StopTime();
+ stopTime.setStop(s);
+ stopTime.setArrivalTime(30);
+ stopTime.setDepartureTime(60);
+ stopTime.setTrip(trip);
+ return stopTime;
+ })
+ .toList();
+ StopPattern stopPattern = new StopPattern(stopTimes);
+ RealTimeTripTimes tripTimes = TripTimesFactory.tripTimes(
+ trip,
+ stopTimes,
+ timetableRepository.getDeduplicator()
+ );
+ TripPattern tripPattern = TimetableRepositoryForTest
+ .tripPattern("carsAllowedTripPattern", route)
+ .withStopPattern(stopPattern)
+ .withScheduledTimeTableBuilder(builder -> builder.addTripTimes(tripTimes))
+ .build();
+
+ timetableRepository.addTripPattern(tripPattern.getId(), tripPattern);
+ }
}
}
diff --git a/application/src/test/java/org/opentripplanner/gtfs/mapping/AgencyMapperTest.java b/application/src/test/java/org/opentripplanner/gtfs/mapping/AgencyMapperTest.java
index e0390fee6b2..789b94991b0 100644
--- a/application/src/test/java/org/opentripplanner/gtfs/mapping/AgencyMapperTest.java
+++ b/application/src/test/java/org/opentripplanner/gtfs/mapping/AgencyMapperTest.java
@@ -31,7 +31,6 @@ public class AgencyMapperTest {
private static final String FARE_URL = "www.url.com/fare";
- private static final String BRANDING_URL = "www.url.com/brand";
private final AgencyMapper subject = new AgencyMapper(TimetableRepositoryForTest.FEED_ID);
static {
@@ -42,7 +41,6 @@ public class AgencyMapperTest {
AGENCY.setTimezone(TIMEZONE);
AGENCY.setUrl(URL);
AGENCY.setFareUrl(FARE_URL);
- AGENCY.setBrandingUrl(BRANDING_URL);
}
@Test
@@ -66,7 +64,6 @@ public void testMap() throws Exception {
assertEquals(TIMEZONE, result.getTimezone().getId());
assertEquals(URL, result.getUrl());
assertEquals(FARE_URL, result.getFareUrl());
- assertEquals(BRANDING_URL, result.getBrandingUrl());
}
@Test
@@ -88,7 +85,6 @@ public void testMapWithNulls() throws Exception {
assertNull(result.getLang());
assertNull(result.getPhone());
assertNull(result.getFareUrl());
- assertNull(result.getBrandingUrl());
}
/** Mapping the same object twice, should return the the same instance. */
diff --git a/application/src/test/java/org/opentripplanner/gtfs/mapping/CarAccessMapperTest.java b/application/src/test/java/org/opentripplanner/gtfs/mapping/CarAccessMapperTest.java
new file mode 100644
index 00000000000..a312d9967d6
--- /dev/null
+++ b/application/src/test/java/org/opentripplanner/gtfs/mapping/CarAccessMapperTest.java
@@ -0,0 +1,26 @@
+package org.opentripplanner.gtfs.mapping;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.junit.jupiter.api.Test;
+import org.onebusaway.gtfs.model.Route;
+import org.onebusaway.gtfs.model.Trip;
+import org.opentripplanner.transit.model.network.CarAccess;
+
+public class CarAccessMapperTest {
+
+ private static final int CARS_ALLOWED = 1;
+ private static final int CARS_NOT_ALLOWED = 2;
+
+ @Test
+ public void testTripProvidedValues() {
+ Trip trip = new Trip();
+ assertEquals(CarAccess.UNKNOWN, CarAccessMapper.mapForTrip(trip));
+
+ trip.setCarsAllowed(CARS_ALLOWED);
+ assertEquals(CarAccess.ALLOWED, CarAccessMapper.mapForTrip(trip));
+
+ trip.setCarsAllowed(CARS_NOT_ALLOWED);
+ assertEquals(CarAccess.NOT_ALLOWED, CarAccessMapper.mapForTrip(trip));
+ }
+}
diff --git a/application/src/test/java/org/opentripplanner/gtfs/mapping/RouteMapperTest.java b/application/src/test/java/org/opentripplanner/gtfs/mapping/RouteMapperTest.java
index 2119c7299d0..56b760a1fd8 100644
--- a/application/src/test/java/org/opentripplanner/gtfs/mapping/RouteMapperTest.java
+++ b/application/src/test/java/org/opentripplanner/gtfs/mapping/RouteMapperTest.java
@@ -47,8 +47,6 @@ public class RouteMapperTest {
private static final Integer SORT_ORDER = 1;
- private static final String BRANDING_URL = "www.url.me/brand";
-
private static final Route ROUTE = new Route();
private final RouteMapper subject = new RouteMapper(
new AgencyMapper(TimetableRepositoryForTest.FEED_ID),
@@ -68,7 +66,6 @@ public class RouteMapperTest {
ROUTE.setTextColor(TEXT_COLOR);
ROUTE.setBikesAllowed(BIKES_ALLOWED);
ROUTE.setSortOrder(SORT_ORDER);
- ROUTE.setBrandingUrl(BRANDING_URL);
}
@Test
@@ -95,9 +92,9 @@ public void testMap() throws Exception {
assertEquals(BikeAccess.ALLOWED, result.getBikesAllowed());
assertEquals(SORT_ORDER, result.getGtfsSortOrder());
+ // We no longer read the non-standard brandingUrl from gtfs, but if it is supplied, it will not cause an error.
Branding branding = result.getBranding();
- assertNotNull(branding);
- assertEquals(BRANDING_URL, branding.getUrl());
+ assertNull(branding);
}
@Test
diff --git a/application/src/test/java/org/opentripplanner/gtfs/mapping/ServiceCalendarDateMapperTest.java b/application/src/test/java/org/opentripplanner/gtfs/mapping/ServiceCalendarDateMapperTest.java
index 320ef4ba555..f363b1c1cb1 100644
--- a/application/src/test/java/org/opentripplanner/gtfs/mapping/ServiceCalendarDateMapperTest.java
+++ b/application/src/test/java/org/opentripplanner/gtfs/mapping/ServiceCalendarDateMapperTest.java
@@ -11,7 +11,7 @@
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.ServiceCalendarDate;
import org.onebusaway.gtfs.model.calendar.ServiceDate;
-import org.opentripplanner.framework.time.ServiceDateUtils;
+import org.opentripplanner.utils.time.ServiceDateUtils;
public class ServiceCalendarDateMapperTest {
diff --git a/application/src/test/java/org/opentripplanner/gtfs/mapping/ServiceCalendarMapperTest.java b/application/src/test/java/org/opentripplanner/gtfs/mapping/ServiceCalendarMapperTest.java
index 41d3c4c64cc..8a9265376f3 100644
--- a/application/src/test/java/org/opentripplanner/gtfs/mapping/ServiceCalendarMapperTest.java
+++ b/application/src/test/java/org/opentripplanner/gtfs/mapping/ServiceCalendarMapperTest.java
@@ -12,7 +12,7 @@
import org.onebusaway.gtfs.model.AgencyAndId;
import org.onebusaway.gtfs.model.ServiceCalendar;
import org.onebusaway.gtfs.model.calendar.ServiceDate;
-import org.opentripplanner.framework.time.ServiceDateUtils;
+import org.opentripplanner.utils.time.ServiceDateUtils;
public class ServiceCalendarMapperTest {
diff --git a/application/src/test/java/org/opentripplanner/gtfs/mapping/TripMapperTest.java b/application/src/test/java/org/opentripplanner/gtfs/mapping/TripMapperTest.java
index 581cff59e79..4132b73826c 100644
--- a/application/src/test/java/org/opentripplanner/gtfs/mapping/TripMapperTest.java
+++ b/application/src/test/java/org/opentripplanner/gtfs/mapping/TripMapperTest.java
@@ -19,6 +19,7 @@
import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore;
import org.opentripplanner.transit.model.basic.Accessibility;
import org.opentripplanner.transit.model.network.BikeAccess;
+import org.opentripplanner.transit.model.network.CarAccess;
import org.opentripplanner.transit.model.timetable.Direction;
public class TripMapperTest {
@@ -26,6 +27,7 @@ public class TripMapperTest {
private static final String FEED_ID = "FEED";
private static final AgencyAndId AGENCY_AND_ID = new AgencyAndId("A", "1");
private static final int BIKES_ALLOWED = 1;
+ private static final int CARS_ALLOWED = 1;
private static final String BLOCK_ID = "Block Id";
private static final int DIRECTION_ID = 1;
private static final String TRIP_HEADSIGN = "Trip Headsign";
@@ -52,6 +54,7 @@ private static TripMapper defaultTripMapper() {
TRIP.setId(AGENCY_AND_ID);
TRIP.setBikesAllowed(BIKES_ALLOWED);
+ TRIP.setCarsAllowed(CARS_ALLOWED);
TRIP.setBlockId(BLOCK_ID);
TRIP.setDirectionId(Integer.toString(DIRECTION_ID));
TRIP.setRoute(data.route);
@@ -83,6 +86,7 @@ void testMap() throws Exception {
assertEquals(TRIP_SHORT_NAME, result.getShortName());
assertEquals(Accessibility.POSSIBLE, result.getWheelchairBoarding());
assertEquals(BikeAccess.ALLOWED, result.getBikesAllowed());
+ assertEquals(CarAccess.ALLOWED, result.getCarsAllowed());
}
@Test
@@ -104,6 +108,7 @@ void testMapWithNulls() throws Exception {
assertEquals(Direction.UNKNOWN, result.getDirection());
assertEquals(Accessibility.NO_INFORMATION, result.getWheelchairBoarding());
assertEquals(BikeAccess.UNKNOWN, result.getBikesAllowed());
+ assertEquals(CarAccess.UNKNOWN, result.getCarsAllowed());
}
/** Mapping the same object twice, should return the same instance. */
diff --git a/application/src/test/java/org/opentripplanner/model/calendar/impl/CalendarServiceDataFactoryImplTest.java b/application/src/test/java/org/opentripplanner/model/calendar/impl/CalendarServiceDataFactoryImplTest.java
index 9516ce03a32..1a322fde916 100644
--- a/application/src/test/java/org/opentripplanner/model/calendar/impl/CalendarServiceDataFactoryImplTest.java
+++ b/application/src/test/java/org/opentripplanner/model/calendar/impl/CalendarServiceDataFactoryImplTest.java
@@ -19,7 +19,6 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.opentripplanner.ConstantsForTests;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore;
import org.opentripplanner.gtfs.GtfsContext;
import org.opentripplanner.gtfs.GtfsContextBuilder;
@@ -30,6 +29,7 @@
import org.opentripplanner.model.impl.OtpTransitServiceBuilder;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.time.ServiceDateUtils;
/**
* @author Thomas Gran (Capra) - tgr@capraconsulting.no (08.11.2017)
diff --git a/application/src/test/java/org/opentripplanner/model/plan/PlanTestConstants.java b/application/src/test/java/org/opentripplanner/model/plan/PlanTestConstants.java
index e5ec76af8af..adebe4f111c 100644
--- a/application/src/test/java/org/opentripplanner/model/plan/PlanTestConstants.java
+++ b/application/src/test/java/org/opentripplanner/model/plan/PlanTestConstants.java
@@ -1,9 +1,9 @@
package org.opentripplanner.model.plan;
-import static org.opentripplanner.framework.time.TimeUtils.time;
+import static org.opentripplanner.utils.time.TimeUtils.time;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
+import org.opentripplanner.utils.time.DurationUtils;
public interface PlanTestConstants {
int NOT_SET = -999_999;
diff --git a/application/src/test/java/org/opentripplanner/model/plan/TestItineraryBuilder.java b/application/src/test/java/org/opentripplanner/model/plan/TestItineraryBuilder.java
index d23759907c2..33eeae0a553 100644
--- a/application/src/test/java/org/opentripplanner/model/plan/TestItineraryBuilder.java
+++ b/application/src/test/java/org/opentripplanner/model/plan/TestItineraryBuilder.java
@@ -22,8 +22,6 @@
import org.opentripplanner.ext.ridehailing.model.RideHailingLeg;
import org.opentripplanner.ext.ridehailing.model.RideHailingProvider;
import org.opentripplanner.framework.i18n.I18NString;
-import org.opentripplanner.framework.lang.IntUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.StopTime;
import org.opentripplanner.model.transfer.ConstrainedTransfer;
import org.opentripplanner.model.transfer.TransferConstraint;
@@ -41,6 +39,8 @@
import org.opentripplanner.transit.model.timetable.Trip;
import org.opentripplanner.transit.model.timetable.TripTimes;
import org.opentripplanner.transit.model.timetable.TripTimesFactory;
+import org.opentripplanner.utils.lang.IntUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This is a helper class to allow unit-testing on Itineraries. The builder does not necessarily
diff --git a/application/src/test/java/org/opentripplanner/model/plan/paging/PagingSearchWindowAdjusterTest.java b/application/src/test/java/org/opentripplanner/model/plan/paging/PagingSearchWindowAdjusterTest.java
index 22dcd49e63f..784fa4b5f99 100644
--- a/application/src/test/java/org/opentripplanner/model/plan/paging/PagingSearchWindowAdjusterTest.java
+++ b/application/src/test/java/org/opentripplanner/model/plan/paging/PagingSearchWindowAdjusterTest.java
@@ -1,7 +1,7 @@
package org.opentripplanner.model.plan.paging;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.DurationUtils.duration;
+import static org.opentripplanner.utils.time.DurationUtils.duration;
import java.time.Duration;
import java.time.Instant;
diff --git a/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorFactoryTest.java b/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorFactoryTest.java
index 7bf54d05bc2..910620872f3 100644
--- a/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorFactoryTest.java
+++ b/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorFactoryTest.java
@@ -10,10 +10,10 @@
import java.time.Duration;
import java.time.Instant;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.ItinerarySortKey;
import org.opentripplanner.model.plan.PlanTestConstants;
+import org.opentripplanner.utils.time.TimeUtils;
@SuppressWarnings("ConstantConditions")
class PageCursorFactoryTest implements PlanTestConstants {
diff --git a/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorSerializerTest.java b/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorSerializerTest.java
index 20c0230f309..e60c2aa1a5b 100644
--- a/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorSerializerTest.java
+++ b/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorSerializerTest.java
@@ -8,8 +8,8 @@
import java.time.Duration;
import java.time.Instant;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.model.plan.ItinerarySortKey;
+import org.opentripplanner.utils.time.DurationUtils;
class PageCursorSerializerTest {
diff --git a/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorTest.java b/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorTest.java
index f9896c66d6a..bd6037ef4a1 100644
--- a/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorTest.java
+++ b/application/src/test/java/org/opentripplanner/model/plan/paging/cursor/PageCursorTest.java
@@ -2,12 +2,12 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.opentripplanner.framework.collection.ListSection.HEAD;
-import static org.opentripplanner.framework.collection.ListSection.TAIL;
import static org.opentripplanner.model.plan.SortOrder.STREET_AND_ARRIVAL_TIME;
import static org.opentripplanner.model.plan.SortOrder.STREET_AND_DEPARTURE_TIME;
import static org.opentripplanner.model.plan.paging.cursor.PageType.NEXT_PAGE;
import static org.opentripplanner.model.plan.paging.cursor.PageType.PREVIOUS_PAGE;
+import static org.opentripplanner.utils.collection.ListSection.HEAD;
+import static org.opentripplanner.utils.collection.ListSection.TAIL;
import java.time.Duration;
import java.time.Instant;
@@ -21,13 +21,13 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.opentripplanner._support.time.ZoneIds;
-import org.opentripplanner.framework.collection.ListSection;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.Place;
import org.opentripplanner.model.plan.PlanTestConstants;
import org.opentripplanner.model.plan.SortOrder;
import org.opentripplanner.model.plan.TestItineraryBuilder;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
+import org.opentripplanner.utils.collection.ListSection;
class PageCursorTest implements PlanTestConstants {
diff --git a/application/src/test/java/org/opentripplanner/model/transfer/TransferConstraintTest.java b/application/src/test/java/org/opentripplanner/model/transfer/TransferConstraintTest.java
index 100e3137f49..47ff414790e 100644
--- a/application/src/test/java/org/opentripplanner/model/transfer/TransferConstraintTest.java
+++ b/application/src/test/java/org/opentripplanner/model/transfer/TransferConstraintTest.java
@@ -10,7 +10,7 @@
import java.util.function.IntSupplier;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.time.DurationUtils;
public class TransferConstraintTest {
diff --git a/application/src/test/java/org/opentripplanner/netex/NetexEpipBundleSmokeTest.java b/application/src/test/java/org/opentripplanner/netex/NetexEpipBundleSmokeTest.java
index f5d3f4d21a3..ac893842ccc 100644
--- a/application/src/test/java/org/opentripplanner/netex/NetexEpipBundleSmokeTest.java
+++ b/application/src/test/java/org/opentripplanner/netex/NetexEpipBundleSmokeTest.java
@@ -92,7 +92,6 @@ private void assertAgencies(Collection agencies) {
assertNull(a.getLang());
assertNull(a.getPhone());
assertNull(a.getFareUrl());
- assertNull(a.getBrandingUrl());
}
private void assertOperators(Collection operators) {
diff --git a/application/src/test/java/org/opentripplanner/netex/NetexNordicBundleSmokeTest.java b/application/src/test/java/org/opentripplanner/netex/NetexNordicBundleSmokeTest.java
index c91195c1ab5..f0b59e697ee 100644
--- a/application/src/test/java/org/opentripplanner/netex/NetexNordicBundleSmokeTest.java
+++ b/application/src/test/java/org/opentripplanner/netex/NetexNordicBundleSmokeTest.java
@@ -104,7 +104,6 @@ private void assertAgencies(Collection agencies) {
assertNull(a.getLang());
assertNull(a.getPhone());
assertNull(a.getFareUrl());
- assertNull(a.getBrandingUrl());
}
private void assertMultiModalStations(Collection multiModalStations) {
diff --git a/application/src/test/java/org/opentripplanner/osm/model/OsmWayTest.java b/application/src/test/java/org/opentripplanner/osm/model/OsmWayTest.java
index 424f7247415..9ac9457a9ec 100644
--- a/application/src/test/java/org/opentripplanner/osm/model/OsmWayTest.java
+++ b/application/src/test/java/org/opentripplanner/osm/model/OsmWayTest.java
@@ -17,6 +17,56 @@ void testIsBicycleDismountForced() {
assertTrue(way.isBicycleDismountForced());
}
+ @Test
+ void testAreaMustContain3Nodes() {
+ OsmWay way = new OsmWay();
+ way.addTag("area", "yes");
+ assertFalse(way.isRoutableArea());
+ way.addNodeRef(1);
+ assertFalse(way.isRoutableArea());
+ way.addNodeRef(2);
+ assertFalse(way.isRoutableArea());
+ way.addNodeRef(3);
+ assertTrue(way.isRoutableArea());
+ way.addNodeRef(4);
+ assertTrue(way.isRoutableArea());
+ }
+
+ @Test
+ void testAreaTags() {
+ OsmWay platform = getClosedPolygon();
+ platform.addTag("public_transport", "platform");
+ assertTrue(platform.isRoutableArea());
+ platform.addTag("area", "no");
+ assertFalse(platform.isRoutableArea());
+
+ OsmWay roundabout = getClosedPolygon();
+ roundabout.addTag("highway", "roundabout");
+ assertFalse(roundabout.isRoutableArea());
+
+ OsmWay pedestrian = getClosedPolygon();
+ pedestrian.addTag("highway", "pedestrian");
+ assertFalse(pedestrian.isRoutableArea());
+ pedestrian.addTag("area", "yes");
+ assertTrue(pedestrian.isRoutableArea());
+
+ OsmWay indoorArea = getClosedPolygon();
+ indoorArea.addTag("indoor", "area");
+ assertTrue(indoorArea.isRoutableArea());
+
+ OsmWay bikeParking = getClosedPolygon();
+ bikeParking.addTag("amenity", "bicycle_parking");
+ assertTrue(bikeParking.isRoutableArea());
+
+ OsmWay corridor = getClosedPolygon();
+ corridor.addTag("indoor", "corridor");
+ assertTrue(corridor.isRoutableArea());
+
+ OsmWay door = getClosedPolygon();
+ door.addTag("indoor", "door");
+ assertFalse(door.isRoutableArea());
+ }
+
@Test
void testIsSteps() {
OsmWay way = new OsmWay();
@@ -125,4 +175,13 @@ void escalator() {
escalator.addTag("conveying", "whoknows?");
assertFalse(escalator.isEscalator());
}
+
+ private OsmWay getClosedPolygon() {
+ var way = new OsmWay();
+ way.addNodeRef(1);
+ way.addNodeRef(2);
+ way.addNodeRef(3);
+ way.addNodeRef(1);
+ return way;
+ }
}
diff --git a/application/src/test/java/org/opentripplanner/osm/model/OsmWithTagsTest.java b/application/src/test/java/org/opentripplanner/osm/model/OsmWithTagsTest.java
index f2e26d74313..2f81cc55e3f 100644
--- a/application/src/test/java/org/opentripplanner/osm/model/OsmWithTagsTest.java
+++ b/application/src/test/java/org/opentripplanner/osm/model/OsmWithTagsTest.java
@@ -212,6 +212,8 @@ void isWheelchairAccessible() {
@Test
void isRoutable() {
assertFalse(WayTestData.zooPlatform().isRoutable());
+ assertTrue(WayTestData.indoor("area").isRoutable());
+ assertFalse(WayTestData.indoor("room").isRoutable());
}
@Test
diff --git a/application/src/test/java/org/opentripplanner/osm/tagmapping/UKMapperTest.java b/application/src/test/java/org/opentripplanner/osm/tagmapping/UKMapperTest.java
new file mode 100644
index 00000000000..3e9e46618fd
--- /dev/null
+++ b/application/src/test/java/org/opentripplanner/osm/tagmapping/UKMapperTest.java
@@ -0,0 +1,26 @@
+package org.opentripplanner.osm.tagmapping;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.opentripplanner.street.model.StreetTraversalPermission.PEDESTRIAN;
+
+import org.junit.jupiter.api.Test;
+import org.opentripplanner.osm.wayproperty.WayPropertySet;
+import org.opentripplanner.osm.wayproperty.specifier.WayTestData;
+
+public class UKMapperTest {
+
+ static WayPropertySet wps = new WayPropertySet();
+
+ static {
+ var source = new UKMapper();
+ source.populateProperties(wps);
+ }
+
+ @Test
+ void indoor() {
+ var corridor = wps.getDataForWay(WayTestData.indoor("corridor"));
+ assertEquals(PEDESTRIAN, corridor.getPermission());
+ var area = wps.getDataForWay(WayTestData.indoor("area"));
+ assertEquals(PEDESTRIAN, area.getPermission());
+ }
+}
diff --git a/application/src/test/java/org/opentripplanner/osm/wayproperty/specifier/WayTestData.java b/application/src/test/java/org/opentripplanner/osm/wayproperty/specifier/WayTestData.java
index 4206b4de091..e075955f6c4 100644
--- a/application/src/test/java/org/opentripplanner/osm/wayproperty/specifier/WayTestData.java
+++ b/application/src/test/java/org/opentripplanner/osm/wayproperty/specifier/WayTestData.java
@@ -218,4 +218,10 @@ public static OsmWithTags zooPlatform() {
way.addTag("usage", "tourism");
return way;
}
+
+ public static OsmWithTags indoor(String value) {
+ var way = new OsmWithTags();
+ way.addTag("indoor", value);
+ return way;
+ }
}
diff --git a/application/src/test/java/org/opentripplanner/raptor/RaptorArchitectureTest.java b/application/src/test/java/org/opentripplanner/raptor/RaptorArchitectureTest.java
index 657e060c30b..13f341279f7 100644
--- a/application/src/test/java/org/opentripplanner/raptor/RaptorArchitectureTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/RaptorArchitectureTest.java
@@ -77,7 +77,7 @@ void enforcePackageDependenciesRaptorAPI() {
@Test
void enforcePackageDependenciesRaptorSPI() {
- RAPTOR.subPackage("spi").dependsOn(FRAMEWORK_UTILS, API_MODEL, API_PATH).verify();
+ RAPTOR_SPI.dependsOn(FRAMEWORK_UTILS, API_MODEL, API_PATH).verify();
}
@Test
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/RaptorTestConstants.java b/application/src/test/java/org/opentripplanner/raptor/_data/RaptorTestConstants.java
index 78489508dc4..0b5e47c977a 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/RaptorTestConstants.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/RaptorTestConstants.java
@@ -1,7 +1,7 @@
package org.opentripplanner.raptor._data;
-import static org.opentripplanner.framework.time.DurationUtils.durationInSeconds;
-import static org.opentripplanner.framework.time.TimeUtils.hm2time;
+import static org.opentripplanner.utils.time.DurationUtils.durationInSeconds;
+import static org.opentripplanner.utils.time.TimeUtils.hm2time;
import org.opentripplanner.raptor.spi.DefaultSlackProvider;
import org.opentripplanner.raptor.spi.RaptorSlackProvider;
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/api/TestPathBuilderTestRaptor.java b/application/src/test/java/org/opentripplanner/raptor/_data/api/TestPathBuilderTestRaptor.java
index de40c29d583..9b37057cdc6 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/api/TestPathBuilderTestRaptor.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/api/TestPathBuilderTestRaptor.java
@@ -2,13 +2,12 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.opentripplanner.framework.time.DurationUtils.durationInSeconds;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.model.transfer.TransferConstraint.REGULAR_TRANSFER;
import static org.opentripplanner.raptor._data.stoparrival.BasicPathTestCase.C1_CALCULATOR;
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.walk;
+import static org.opentripplanner.utils.time.DurationUtils.durationInSeconds;
+import static org.opentripplanner.utils.time.TimeUtils.time;
-import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.opentripplanner.raptor._data.RaptorTestConstants;
import org.opentripplanner.raptor._data.stoparrival.BasicPathTestCase;
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/BasicPathTestCase.java b/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/BasicPathTestCase.java
index 4a92264e87c..88aa857f76a 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/BasicPathTestCase.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/BasicPathTestCase.java
@@ -1,8 +1,6 @@
package org.opentripplanner.raptor._data.stoparrival;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.DurationUtils.durationToStr;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.model.transfer.TransferConstraint.REGULAR_TRANSFER;
import static org.opentripplanner.raptor._data.stoparrival.TestArrivals.access;
import static org.opentripplanner.raptor._data.stoparrival.TestArrivals.bus;
@@ -11,6 +9,8 @@
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.flexWithOnBoard;
import static org.opentripplanner.raptor._data.transit.TestTripPattern.pattern;
import static org.opentripplanner.routing.algorithm.raptoradapter.transit.cost.RaptorCostConverter.toRaptorCost;
+import static org.opentripplanner.utils.time.DurationUtils.durationToStr;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.util.Arrays;
import java.util.List;
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/Egress.java b/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/Egress.java
index a244acdf720..302de528d9f 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/Egress.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/Egress.java
@@ -1,11 +1,11 @@
package org.opentripplanner.raptor._data.stoparrival;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor._data.transit.TestTripSchedule;
import org.opentripplanner.raptor.api.model.PathLegType;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.view.ArrivalView;
import org.opentripplanner.raptor.api.view.EgressPathView;
+import org.opentripplanner.utils.time.TimeUtils;
public class Egress extends AbstractStopArrival {
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/FlexAccessAndEgressPathTestCase.java b/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/FlexAccessAndEgressPathTestCase.java
index 1e694e3d771..51639ecc72d 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/FlexAccessAndEgressPathTestCase.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/stoparrival/FlexAccessAndEgressPathTestCase.java
@@ -1,15 +1,14 @@
package org.opentripplanner.raptor._data.stoparrival;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.DurationUtils.durationInSeconds;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.raptor._data.stoparrival.TestArrivals.access;
import static org.opentripplanner.raptor._data.stoparrival.TestArrivals.bus;
import static org.opentripplanner.raptor.api.model.RaptorValueFormatter.formatC1;
import static org.opentripplanner.routing.algorithm.raptoradapter.transit.cost.RaptorCostConverter.toRaptorCost;
+import static org.opentripplanner.utils.time.DurationUtils.durationInSeconds;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor._data.RaptorTestConstants;
import org.opentripplanner.raptor._data.transit.TestAccessEgress;
import org.opentripplanner.raptor._data.transit.TestTransfer;
@@ -24,6 +23,7 @@
import org.opentripplanner.raptor.spi.RaptorSlackProvider;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.cost.DefaultCostCalculator;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.cost.RaptorCostConverter;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This test case construct two Raptor paths for forward and reverse search, with and without
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestAccessEgress.java b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestAccessEgress.java
index 8047ec0d4cb..c58240126de 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestAccessEgress.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestAccessEgress.java
@@ -9,9 +9,9 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.model.RaptorConstants;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* Simple implementation for {@link RaptorAccessEgress} for use in unit-tests.
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestConstrainedBoardingSearch.java b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestConstrainedBoardingSearch.java
index 7812b9d2fce..5e8980dc50a 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestConstrainedBoardingSearch.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestConstrainedBoardingSearch.java
@@ -9,11 +9,11 @@
import java.util.function.BiPredicate;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.transfer.TransferConstraint;
import org.opentripplanner.raptor.spi.RaptorBoardOrAlightEvent;
import org.opentripplanner.raptor.spi.RaptorConstrainedBoardingSearch;
import org.opentripplanner.raptor.spi.RaptorTimeTable;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class TestConstrainedBoardingSearch
implements RaptorConstrainedBoardingSearch {
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestConstrainedTransfer.java b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestConstrainedTransfer.java
index 66233e4eb74..643585f8c5b 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestConstrainedTransfer.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestConstrainedTransfer.java
@@ -1,12 +1,12 @@
package org.opentripplanner.raptor._data.transit;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.transfer.TransferConstraint;
import org.opentripplanner.raptor.api.model.RaptorConstrainedTransfer;
import org.opentripplanner.raptor.api.model.RaptorTransferConstraint;
import org.opentripplanner.raptor.spi.RaptorBoardOrAlightEvent;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.constrainedtransfer.ConstrainedTransferBoarding;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
class TestConstrainedTransfer implements RaptorConstrainedTransfer {
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestRoute.java b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestRoute.java
index c3029b9ebfd..6a606876e0e 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestRoute.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestRoute.java
@@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.transfer.TransferConstraint;
import org.opentripplanner.raptor.api.model.SearchDirection;
import org.opentripplanner.raptor.spi.RaptorConstrainedBoardingSearch;
@@ -12,6 +11,7 @@
import org.opentripplanner.raptor.spi.RaptorTripScheduleSearch;
import org.opentripplanner.routing.algorithm.raptoradapter.api.DefaultTripPattern;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.request.TripScheduleSearchFactory;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class TestRoute implements RaptorRoute, RaptorTimeTable {
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTransferPoint.java b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTransferPoint.java
index d3a0e4c3d4e..ef2271e51ae 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTransferPoint.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTransferPoint.java
@@ -1,7 +1,7 @@
package org.opentripplanner.raptor._data.transit;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.model.transfer.TransferPoint;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class TestTransferPoint implements TransferPoint {
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTripPattern.java b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTripPattern.java
index 63dcbeb5863..811c17cc568 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTripPattern.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTripPattern.java
@@ -1,8 +1,8 @@
package org.opentripplanner.raptor._data.transit;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.routing.algorithm.raptoradapter.api.DefaultTripPattern;
import org.opentripplanner.transit.model.network.Route;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
public class TestTripPattern implements DefaultTripPattern {
diff --git a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTripSchedule.java b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTripSchedule.java
index ab8d26406ee..75062d9a61e 100644
--- a/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTripSchedule.java
+++ b/application/src/test/java/org/opentripplanner/raptor/_data/transit/TestTripSchedule.java
@@ -5,15 +5,15 @@
import java.time.LocalDate;
import java.util.Arrays;
import java.util.stream.IntStream;
-import org.opentripplanner.framework.lang.IntUtils;
-import org.opentripplanner.framework.time.TimeUtils;
-import org.opentripplanner.framework.tostring.ToStringBuilder;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.routing.algorithm.raptoradapter.api.DefaultTripPattern;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripSchedule;
import org.opentripplanner.transit.model.basic.Accessibility;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.timetable.TripTimes;
+import org.opentripplanner.utils.lang.IntUtils;
+import org.opentripplanner.utils.time.TimeUtils;
+import org.opentripplanner.utils.tostring.ToStringBuilder;
/**
* An implementation of the {@link RaptorTripSchedule} for unit-testing.
diff --git a/application/src/test/java/org/opentripplanner/raptor/api/path/PathTest.java b/application/src/test/java/org/opentripplanner/raptor/api/path/PathTest.java
index de71574a952..7ea3c9805f5 100644
--- a/application/src/test/java/org/opentripplanner/raptor/api/path/PathTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/api/path/PathTest.java
@@ -3,8 +3,6 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.opentripplanner.framework.time.TimeUtils.time;
-import static org.opentripplanner.framework.time.TimeUtils.timeToStrCompact;
import static org.opentripplanner.raptor._data.stoparrival.BasicPathTestCase.ACCESS_START;
import static org.opentripplanner.raptor._data.stoparrival.BasicPathTestCase.BASIC_PATH_AS_DETAILED_STRING;
import static org.opentripplanner.raptor._data.stoparrival.BasicPathTestCase.BASIC_PATH_AS_STRING;
@@ -13,6 +11,8 @@
import static org.opentripplanner.raptor._data.stoparrival.BasicPathTestCase.TOTAL_C1;
import static org.opentripplanner.raptor._data.stoparrival.BasicPathTestCase.basicTripStops;
import static org.opentripplanner.raptor._data.transit.TestTripPattern.pattern;
+import static org.opentripplanner.utils.time.TimeUtils.time;
+import static org.opentripplanner.utils.time.TimeUtils.timeToStrCompact;
import java.util.List;
import java.util.stream.Collectors;
diff --git a/application/src/test/java/org/opentripplanner/raptor/moduletests/B01_AccessTest.java b/application/src/test/java/org/opentripplanner/raptor/moduletests/B01_AccessTest.java
index 37814d6c6dc..76583a38649 100644
--- a/application/src/test/java/org/opentripplanner/raptor/moduletests/B01_AccessTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/moduletests/B01_AccessTest.java
@@ -12,7 +12,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor.RaptorService;
import org.opentripplanner.raptor._data.RaptorTestConstants;
import org.opentripplanner.raptor._data.transit.TestAccessEgress;
@@ -22,6 +21,7 @@
import org.opentripplanner.raptor.configure.RaptorConfig;
import org.opentripplanner.raptor.moduletests.support.ModuleTestDebugLogging;
import org.opentripplanner.raptor.moduletests.support.RaptorModuleTestCase;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* FEATURE UNDER TEST
diff --git a/application/src/test/java/org/opentripplanner/raptor/moduletests/F02_EgressWithRidesTest.java b/application/src/test/java/org/opentripplanner/raptor/moduletests/F02_EgressWithRidesTest.java
index 87b2237fac8..1b5164c79a4 100644
--- a/application/src/test/java/org/opentripplanner/raptor/moduletests/F02_EgressWithRidesTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/moduletests/F02_EgressWithRidesTest.java
@@ -17,7 +17,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor.RaptorService;
import org.opentripplanner.raptor._data.RaptorTestConstants;
import org.opentripplanner.raptor._data.transit.TestTransitData;
@@ -27,6 +26,7 @@
import org.opentripplanner.raptor.moduletests.support.ModuleTestDebugLogging;
import org.opentripplanner.raptor.moduletests.support.RaptorModuleTestCase;
import org.opentripplanner.raptor.spi.DefaultSlackProvider;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* FEATURE UNDER TEST
diff --git a/application/src/test/java/org/opentripplanner/raptor/moduletests/G01_AccessWithOpeningHoursTest.java b/application/src/test/java/org/opentripplanner/raptor/moduletests/G01_AccessWithOpeningHoursTest.java
index 7f5e5421e79..bf3bf359001 100644
--- a/application/src/test/java/org/opentripplanner/raptor/moduletests/G01_AccessWithOpeningHoursTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/moduletests/G01_AccessWithOpeningHoursTest.java
@@ -19,7 +19,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor.RaptorService;
import org.opentripplanner.raptor._data.RaptorTestConstants;
import org.opentripplanner.raptor._data.transit.TestTransitData;
@@ -30,6 +29,7 @@
import org.opentripplanner.raptor.moduletests.support.ModuleTestDebugLogging;
import org.opentripplanner.raptor.moduletests.support.RaptorModuleTestCase;
import org.opentripplanner.raptor.moduletests.support.RaptorModuleTestCaseFactory;
+import org.opentripplanner.utils.time.TimeUtils;
/*
* FEATURE UNDER TEST
diff --git a/application/src/test/java/org/opentripplanner/raptor/moduletests/G02_EgressWithOpeningHoursTest.java b/application/src/test/java/org/opentripplanner/raptor/moduletests/G02_EgressWithOpeningHoursTest.java
index 9498f0b0080..994305cb0d5 100644
--- a/application/src/test/java/org/opentripplanner/raptor/moduletests/G02_EgressWithOpeningHoursTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/moduletests/G02_EgressWithOpeningHoursTest.java
@@ -1,7 +1,6 @@
package org.opentripplanner.raptor.moduletests;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.hm2time;
import static org.opentripplanner.raptor._data.api.PathUtils.withoutCost;
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.walk;
import static org.opentripplanner.raptor._data.transit.TestRoute.route;
@@ -13,6 +12,7 @@
import static org.opentripplanner.raptor.moduletests.support.RaptorModuleTestConfig.minDuration;
import static org.opentripplanner.raptor.moduletests.support.RaptorModuleTestConfig.multiCriteria;
import static org.opentripplanner.raptor.moduletests.support.RaptorModuleTestConfig.standard;
+import static org.opentripplanner.utils.time.TimeUtils.hm2time;
import java.time.Duration;
import java.util.List;
diff --git a/application/src/test/java/org/opentripplanner/raptor/moduletests/I01_HeuristicTest.java b/application/src/test/java/org/opentripplanner/raptor/moduletests/I01_HeuristicTest.java
index 7fe9cfa2c15..1e2f79cce44 100644
--- a/application/src/test/java/org/opentripplanner/raptor/moduletests/I01_HeuristicTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/moduletests/I01_HeuristicTest.java
@@ -90,7 +90,7 @@ public void setup() {
public void regular() {
var request = requestBuilder.build();
- var search = new RangeRaptorDynamicSearch<>(config, data, request);
+ var search = new RangeRaptorDynamicSearch<>(config, data, null, request);
search.route();
@@ -105,7 +105,7 @@ public void withConstrainedTransfers() {
var request = requestBuilder.build();
- var search = new RangeRaptorDynamicSearch<>(config, data, request);
+ var search = new RangeRaptorDynamicSearch<>(config, data, null, request);
search.route();
diff --git a/application/src/test/java/org/opentripplanner/raptor/moduletests/L01_TimePenaltyAccessTest.java b/application/src/test/java/org/opentripplanner/raptor/moduletests/L01_TimePenaltyAccessTest.java
index 778dd36a227..a4753cc2c17 100644
--- a/application/src/test/java/org/opentripplanner/raptor/moduletests/L01_TimePenaltyAccessTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/moduletests/L01_TimePenaltyAccessTest.java
@@ -1,7 +1,6 @@
package org.opentripplanner.raptor.moduletests;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.raptor._data.api.PathUtils.withoutCost;
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.walk;
import static org.opentripplanner.raptor._data.transit.TestRoute.route;
@@ -11,6 +10,7 @@
import static org.opentripplanner.raptor.moduletests.support.RaptorModuleTestConfig.TC_STANDARD_REV;
import static org.opentripplanner.raptor.moduletests.support.RaptorModuleTestConfig.TC_STANDARD_REV_ONE;
import static org.opentripplanner.raptor.moduletests.support.RaptorModuleTestConfig.multiCriteria;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.time.Duration;
import java.util.List;
diff --git a/application/src/test/java/org/opentripplanner/raptor/moduletests/L01_TimePenaltyEgressTest.java b/application/src/test/java/org/opentripplanner/raptor/moduletests/L01_TimePenaltyEgressTest.java
index 1e6897475f4..d75b91c7aee 100644
--- a/application/src/test/java/org/opentripplanner/raptor/moduletests/L01_TimePenaltyEgressTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/moduletests/L01_TimePenaltyEgressTest.java
@@ -1,7 +1,6 @@
package org.opentripplanner.raptor.moduletests;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.raptor._data.api.PathUtils.withoutCost;
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.walk;
import static org.opentripplanner.raptor._data.transit.TestRoute.route;
@@ -11,6 +10,7 @@
import static org.opentripplanner.raptor.moduletests.support.RaptorModuleTestConfig.TC_STANDARD_REV;
import static org.opentripplanner.raptor.moduletests.support.RaptorModuleTestConfig.TC_STANDARD_REV_ONE;
import static org.opentripplanner.raptor.moduletests.support.RaptorModuleTestConfig.multiCriteria;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.time.Duration;
import java.util.List;
diff --git a/application/src/test/java/org/opentripplanner/raptor/moduletests/support/RaptorModuleTestCaseFactory.java b/application/src/test/java/org/opentripplanner/raptor/moduletests/support/RaptorModuleTestCaseFactory.java
index 0f7554dccab..937acd7fcc4 100644
--- a/application/src/test/java/org/opentripplanner/raptor/moduletests/support/RaptorModuleTestCaseFactory.java
+++ b/application/src/test/java/org/opentripplanner/raptor/moduletests/support/RaptorModuleTestCaseFactory.java
@@ -7,10 +7,10 @@
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor._data.transit.TestTripSchedule;
import org.opentripplanner.raptor.api.request.RaptorRequestBuilder;
import org.opentripplanner.raptor.spi.UnknownPath;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* Factory for {@link RaptorModuleTestConfig}, create a list of test-cases.
diff --git a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/multicriteria/arrivals/c1/StopArrivalFactoryC1Test.java b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/multicriteria/arrivals/c1/StopArrivalFactoryC1Test.java
index d47edf1c58f..4d18cde5232 100644
--- a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/multicriteria/arrivals/c1/StopArrivalFactoryC1Test.java
+++ b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/multicriteria/arrivals/c1/StopArrivalFactoryC1Test.java
@@ -3,8 +3,6 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor._data.transit.TestAccessEgress;
import org.opentripplanner.raptor._data.transit.TestTransfer;
import org.opentripplanner.raptor._data.transit.TestTripPattern;
@@ -13,6 +11,8 @@
import org.opentripplanner.raptor.api.view.PatternRideView;
import org.opentripplanner.raptor.rangeraptor.multicriteria.arrivals.McStopArrival;
import org.opentripplanner.raptor.rangeraptor.multicriteria.ride.c1.PatternRideC1;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
public class StopArrivalFactoryC1Test {
diff --git a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/multicriteria/arrivals/c2/StopArrivalFactoryC2Test.java b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/multicriteria/arrivals/c2/StopArrivalFactoryC2Test.java
index 4c78461b016..c71ca7fee11 100644
--- a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/multicriteria/arrivals/c2/StopArrivalFactoryC2Test.java
+++ b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/multicriteria/arrivals/c2/StopArrivalFactoryC2Test.java
@@ -3,8 +3,6 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor._data.transit.TestAccessEgress;
import org.opentripplanner.raptor._data.transit.TestTransfer;
import org.opentripplanner.raptor._data.transit.TestTripPattern;
@@ -13,6 +11,8 @@
import org.opentripplanner.raptor.rangeraptor.multicriteria.arrivals.McStopArrival;
import org.opentripplanner.raptor.rangeraptor.multicriteria.ride.c2.PatternRideC2;
import org.opentripplanner.raptor.spi.RaptorCostCalculator;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
public class StopArrivalFactoryC2Test {
diff --git a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/EgressPathsTest.java b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/EgressPathsTest.java
index 144904fa3e6..3939bbb865f 100644
--- a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/EgressPathsTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/EgressPathsTest.java
@@ -10,9 +10,9 @@
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor.api.model.RaptorAccessEgress;
import org.opentripplanner.raptor.api.request.RaptorProfile;
+import org.opentripplanner.utils.time.DurationUtils;
class EgressPathsTest {
diff --git a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardRaptorTransitCalculatorTest.java b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardRaptorTransitCalculatorTest.java
index ad7a269b856..bf1999d88fc 100644
--- a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardRaptorTransitCalculatorTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardRaptorTransitCalculatorTest.java
@@ -3,10 +3,10 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.opentripplanner.framework.time.TimeUtils.hm2time;
import static org.opentripplanner.raptor._data.RaptorTestConstants.D1m;
import static org.opentripplanner.raptor._data.RaptorTestConstants.STOP_A;
import static org.opentripplanner.raptor._data.RaptorTestConstants.STOP_B;
+import static org.opentripplanner.utils.time.TimeUtils.hm2time;
import org.junit.jupiter.api.Test;
import org.opentripplanner.raptor._data.transit.TestAccessEgress;
diff --git a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardTransitCalculatorTest.java b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardTransitCalculatorTest.java
index 10f5e18875b..5fb1cb5fade 100644
--- a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardTransitCalculatorTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ForwardTransitCalculatorTest.java
@@ -1,11 +1,11 @@
package org.opentripplanner.raptor.rangeraptor.transit;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.hm2time;
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.flex;
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.flexAndWalk;
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.free;
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.walk;
+import static org.opentripplanner.utils.time.TimeUtils.hm2time;
import org.junit.jupiter.api.Test;
import org.opentripplanner.raptor._data.RaptorTestConstants;
diff --git a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ReverseRaptorTransitCalculatorTest.java b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ReverseRaptorTransitCalculatorTest.java
index 3afecaf3e81..981fb058f9b 100644
--- a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ReverseRaptorTransitCalculatorTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/ReverseRaptorTransitCalculatorTest.java
@@ -3,10 +3,10 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.opentripplanner.framework.time.TimeUtils.hm2time;
import static org.opentripplanner.raptor._data.RaptorTestConstants.D1m;
import static org.opentripplanner.raptor._data.RaptorTestConstants.STOP_A;
import static org.opentripplanner.raptor._data.RaptorTestConstants.STOP_B;
+import static org.opentripplanner.utils.time.TimeUtils.hm2time;
import org.junit.jupiter.api.Test;
import org.opentripplanner.raptor._data.transit.TestTransfer;
diff --git a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/TripTimesSearchTest.java b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/TripTimesSearchTest.java
index 50295b0341e..d70f58fd1c5 100644
--- a/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/TripTimesSearchTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/rangeraptor/transit/TripTimesSearchTest.java
@@ -2,7 +2,6 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.opentripplanner.framework.time.TimeUtils.timeToStrLong;
import static org.opentripplanner.raptor._data.stoparrival.TestArrivals.access;
import static org.opentripplanner.raptor._data.stoparrival.TestArrivals.bus;
import static org.opentripplanner.raptor._data.transit.TestAccessEgress.free;
@@ -11,13 +10,14 @@
import static org.opentripplanner.raptor.rangeraptor.transit.TripTimesSearch.findTripForwardSearchApproximateTime;
import static org.opentripplanner.raptor.rangeraptor.transit.TripTimesSearch.findTripReverseSearch;
import static org.opentripplanner.raptor.rangeraptor.transit.TripTimesSearch.findTripReverseSearchApproximateTime;
+import static org.opentripplanner.utils.time.TimeUtils.timeToStrLong;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor._data.RaptorTestConstants;
import org.opentripplanner.raptor._data.transit.TestTripSchedule;
import org.opentripplanner.raptor.api.view.ArrivalView;
import org.opentripplanner.raptor.spi.BoardAndAlightTime;
+import org.opentripplanner.utils.time.TimeUtils;
public class TripTimesSearchTest implements RaptorTestConstants {
diff --git a/application/src/test/java/org/opentripplanner/raptor/spi/RaptorTripScheduleTest.java b/application/src/test/java/org/opentripplanner/raptor/spi/RaptorTripScheduleTest.java
index 6b4392a13a9..9188617016a 100644
--- a/application/src/test/java/org/opentripplanner/raptor/spi/RaptorTripScheduleTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/spi/RaptorTripScheduleTest.java
@@ -1,7 +1,7 @@
package org.opentripplanner.raptor.spi;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.timeToStrLong;
+import static org.opentripplanner.utils.time.TimeUtils.timeToStrLong;
import org.junit.jupiter.api.Test;
import org.opentripplanner.raptor._data.transit.TestTripPattern;
diff --git a/application/src/test/java/org/opentripplanner/raptor/util/paretoset/ParetoSetTest.java b/application/src/test/java/org/opentripplanner/raptor/util/paretoset/ParetoSetTest.java
index 1c410c13e1c..5f2d56cfcdd 100644
--- a/application/src/test/java/org/opentripplanner/raptor/util/paretoset/ParetoSetTest.java
+++ b/application/src/test/java/org/opentripplanner/raptor/util/paretoset/ParetoSetTest.java
@@ -12,7 +12,7 @@
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.lang.IntUtils;
+import org.opentripplanner.utils.lang.IntUtils;
public class ParetoSetTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveBikeRentalWithMostlyWalkingTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveBikeRentalWithMostlyWalkingTest.java
index 4e47306601c..c1dc34413cd 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveBikeRentalWithMostlyWalkingTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveBikeRentalWithMostlyWalkingTest.java
@@ -8,9 +8,9 @@
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.plan.Itinerary;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
public class RemoveBikeRentalWithMostlyWalkingTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveParkAndRideWithMostlyWalkingTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveParkAndRideWithMostlyWalkingTest.java
index a4c90d1346f..88baabb1e2a 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveParkAndRideWithMostlyWalkingTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveParkAndRideWithMostlyWalkingTest.java
@@ -8,9 +8,9 @@
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.plan.Itinerary;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
public class RemoveParkAndRideWithMostlyWalkingTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveWalkOnlyFilterTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveWalkOnlyFilterTest.java
index 359423a842b..6281c4f744c 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveWalkOnlyFilterTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/street/RemoveWalkOnlyFilterTest.java
@@ -8,9 +8,9 @@
import java.util.List;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.plan.Itinerary;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
public class RemoveWalkOnlyFilterTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/FlexSearchWindowFilterTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/FlexSearchWindowFilterTest.java
index 30c8872b859..dd51ccbcd19 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/FlexSearchWindowFilterTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/FlexSearchWindowFilterTest.java
@@ -2,8 +2,8 @@
import static com.google.common.truth.Truth.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.model.plan.TestItineraryBuilder.newItinerary;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.time.Duration;
import java.time.Instant;
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilterTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilterTest.java
index 622482fe4b3..1943104e1d0 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilterTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/NumItinerariesFilterTest.java
@@ -8,9 +8,9 @@
import java.util.List;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.collection.ListSection;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.paging.cursor.PageCursorInput;
+import org.opentripplanner.utils.collection.ListSection;
public class NumItinerariesFilterTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/OutsideSearchWindowFilterTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/OutsideSearchWindowFilterTest.java
index 6e475ac5893..0e61d146d17 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/OutsideSearchWindowFilterTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/OutsideSearchWindowFilterTest.java
@@ -4,8 +4,8 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.model.plan.TestItineraryBuilder.newItinerary;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.time.Duration;
import java.util.List;
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/PagingFilterTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/PagingFilterTest.java
index 713e72e344c..165cddd31f3 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/PagingFilterTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/PagingFilterTest.java
@@ -1,10 +1,10 @@
package org.opentripplanner.routing.algorithm.filterchain.filters.system;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.collection.ListUtils.first;
-import static org.opentripplanner.framework.collection.ListUtils.last;
import static org.opentripplanner.model.plan.Itinerary.toStr;
import static org.opentripplanner.model.plan.TestItineraryBuilder.newItinerary;
+import static org.opentripplanner.utils.collection.ListUtils.first;
+import static org.opentripplanner.utils.collection.ListUtils.last;
import java.util.ArrayList;
import java.util.List;
@@ -13,14 +13,14 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.opentripplanner._support.debug.TestDebug;
-import org.opentripplanner.framework.collection.ListSection;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.Place;
import org.opentripplanner.model.plan.PlanTestConstants;
import org.opentripplanner.model.plan.SortOrder;
import org.opentripplanner.routing.algorithm.filterchain.framework.sort.SortOrderComparator;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
+import org.opentripplanner.utils.collection.ListSection;
+import org.opentripplanner.utils.time.TimeUtils;
public class PagingFilterTest implements PlanTestConstants {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/PagingServiceFactoryTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/PagingServiceFactoryTest.java
index 369f58d6ef1..64797b9c5a1 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/PagingServiceFactoryTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/PagingServiceFactoryTest.java
@@ -7,14 +7,14 @@
import java.time.Instant;
import java.util.List;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor._data.transit.TestAccessEgress;
import org.opentripplanner.raptor.api.request.RaptorRequestBuilder;
import org.opentripplanner.raptor.api.request.RaptorTuningParameters;
import org.opentripplanner.raptor.api.request.SearchParams;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.TransitTuningParameters;
import org.opentripplanner.routing.api.request.RouteRequest;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
class PagingServiceFactoryTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapperTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapperTest.java
index 4887b1e6f03..ede3166e22b 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapperTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapperTest.java
@@ -24,7 +24,6 @@
import org.opentripplanner.framework.application.OTPFeature;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.TimeAndCost;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.PickDrop;
import org.opentripplanner.model.StopTime;
import org.opentripplanner.model.plan.Leg;
@@ -67,6 +66,7 @@
import org.opentripplanner.transit.model.timetable.booking.RoutingBookingInfo;
import org.opentripplanner.transit.service.DefaultTransitService;
import org.opentripplanner.transit.service.TimetableRepository;
+import org.opentripplanner.utils.time.TimeUtils;
public class RaptorPathToItineraryMapperTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/SnapshotTestBase.java b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/SnapshotTestBase.java
index 98acfeeb7af..cab308c092b 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/SnapshotTestBase.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/SnapshotTestBase.java
@@ -41,7 +41,6 @@
import org.opentripplanner.api.parameter.Qualifier;
import org.opentripplanner.ext.restapi.mapping.ItineraryMapper;
import org.opentripplanner.ext.restapi.model.ApiLeg;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.GenericLocation;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.Leg;
@@ -54,6 +53,7 @@
import org.opentripplanner.standalone.api.OtpServerRequestContext;
import org.opentripplanner.transit.model.basic.MainAndSubMode;
import org.opentripplanner.transit.model.basic.TransitMode;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* A base class for creating snapshots test of itinerary generation using the Portland graph.
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/router/street/AccessEgressPenaltyDecoratorTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/router/street/AccessEgressPenaltyDecoratorTest.java
index 78b12a97b82..a1b58ce76fa 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/router/street/AccessEgressPenaltyDecoratorTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/router/street/AccessEgressPenaltyDecoratorTest.java
@@ -10,7 +10,6 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.DefaultAccessEgress;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.RoutingAccessEgress;
import org.opentripplanner.routing.api.request.StreetMode;
@@ -19,6 +18,7 @@
import org.opentripplanner.routing.api.request.framework.TimePenalty;
import org.opentripplanner.street.search.state.State;
import org.opentripplanner.street.search.state.TestStateBuilder;
+import org.opentripplanner.utils.time.DurationUtils;
class AccessEgressPenaltyDecoratorTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitDataCreatorTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitDataCreatorTest.java
index b81792877ae..7df9677082d 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitDataCreatorTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RaptorRoutingRequestTransitDataCreatorTest.java
@@ -10,7 +10,6 @@
import java.util.List;
import org.junit.jupiter.api.Test;
import org.opentripplanner._support.time.ZoneIds;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.model.StopTime;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripPatternForDate;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
@@ -22,6 +21,7 @@
import org.opentripplanner.transit.model.network.grouppriority.TransitGroupPriorityService;
import org.opentripplanner.transit.model.timetable.ScheduledTripTimes;
import org.opentripplanner.transit.model.timetable.TripTimes;
+import org.opentripplanner.utils.time.ServiceDateUtils;
public class RaptorRoutingRequestTransitDataCreatorTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RouteRequestTransitDataProviderFilterTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RouteRequestTransitDataProviderFilterTest.java
index 8b52f1b58fa..ea4b7174e79 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RouteRequestTransitDataProviderFilterTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/RouteRequestTransitDataProviderFilterTest.java
@@ -1,5 +1,6 @@
package org.opentripplanner.routing.algorithm.raptoradapter.transit.request;
+import static com.google.common.truth.Truth.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -34,6 +35,7 @@
import org.opentripplanner.transit.model.framework.Deduplicator;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.network.BikeAccess;
+import org.opentripplanner.transit.model.network.CarAccess;
import org.opentripplanner.transit.model.network.Route;
import org.opentripplanner.transit.model.network.RouteBuilder;
import org.opentripplanner.transit.model.network.RoutingTripPattern;
@@ -107,6 +109,7 @@ void testWheelchairAccess(Accessibility wheelchair, WheelchairPreferences access
.getRoutingTripPattern();
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
true,
accessibility,
@@ -157,6 +160,7 @@ void testRealtimeCancelledStops(boolean includeRealtimeCancellations) {
.getRoutingTripPattern();
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -202,6 +206,7 @@ void notFilteringExpectedTripPatternForDateTest() {
TripPatternForDate tripPatternForDate = createTestTripPatternForDate();
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -221,6 +226,7 @@ void bannedRouteFilteringTest() {
TripPatternForDate tripPatternForDate = createTestTripPatternForDate();
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -246,6 +252,7 @@ void bannedTripFilteringTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -253,6 +260,7 @@ void bannedTripFilteringTest() {
);
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -281,6 +289,7 @@ void matchModeFilterAndBannedAgencyFilter() {
);
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -316,6 +325,7 @@ void matchCombinedModesAndBannedAgencyFilter() {
);
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -347,6 +357,7 @@ void matchSelectedAgencyExcludedSubMode() {
);
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -389,6 +400,7 @@ void transitModeFilteringTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
TransmodelTransportSubmode.LOCAL_BUS.getValue(),
Accessibility.NOT_POSSIBLE,
@@ -415,6 +427,7 @@ void notFilteringExpectedTripTimesTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -422,6 +435,7 @@ void notFilteringExpectedTripTimesTest() {
);
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -442,6 +456,36 @@ void bikesAllowedFilteringTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
+ TransitMode.BUS,
+ null,
+ Accessibility.NOT_POSSIBLE,
+ null
+ );
+
+ var filter = new RouteRequestTransitDataProviderFilter(
+ true,
+ false,
+ true,
+ WheelchairPreferences.DEFAULT,
+ false,
+ false,
+ Set.of(),
+ List.of(AllowAllTransitFilter.of())
+ );
+
+ boolean valid = filter.tripTimesPredicate(tripTimes, true);
+
+ assertFalse(valid);
+ }
+
+ @Test
+ void carsAllowedFilteringTest() {
+ TripTimes tripTimes = createTestTripTimes(
+ TRIP_ID,
+ ROUTE,
+ BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -449,6 +493,7 @@ void bikesAllowedFilteringTest() {
);
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
true,
true,
WheelchairPreferences.DEFAULT,
@@ -469,6 +514,7 @@ void removeInaccessibleTrip() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -476,6 +522,7 @@ void removeInaccessibleTrip() {
);
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
true,
WheelchairPreferences.DEFAULT,
@@ -496,6 +543,7 @@ void keepAccessibleTrip() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.POSSIBLE,
@@ -503,6 +551,7 @@ void keepAccessibleTrip() {
);
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
true,
WheelchairPreferences.DEFAULT,
@@ -523,6 +572,7 @@ void keepRealTimeAccessibleTrip() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -530,6 +580,7 @@ void keepRealTimeAccessibleTrip() {
);
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
true,
WheelchairPreferences.DEFAULT,
@@ -552,6 +603,7 @@ void includePlannedCancellationsTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -561,6 +613,7 @@ void includePlannedCancellationsTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -569,6 +622,7 @@ void includePlannedCancellationsTest() {
// Given
var filter1 = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
WheelchairPreferences.DEFAULT,
@@ -590,6 +644,7 @@ void includePlannedCancellationsTest() {
// Given
var filter2 = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -616,6 +671,7 @@ void includeRealtimeCancellationsTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -626,6 +682,7 @@ void includeRealtimeCancellationsTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -635,6 +692,7 @@ void includeRealtimeCancellationsTest() {
// Given
var filter1 = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
WheelchairPreferences.DEFAULT,
@@ -656,6 +714,7 @@ void includeRealtimeCancellationsTest() {
// Given
var filter2 = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -712,12 +771,64 @@ void testBikesAllowed() {
);
}
+ @Test
+ void testCarsAllowed() {
+ TripTimes tripTimesCarsAllowed = createTestTripTimes(
+ TRIP_ID,
+ ROUTE,
+ BikeAccess.UNKNOWN,
+ CarAccess.ALLOWED,
+ TransitMode.FERRY,
+ null,
+ Accessibility.NO_INFORMATION,
+ TripAlteration.PLANNED
+ );
+
+ TripTimes tripTimesCarsNotAllowed = createTestTripTimes(
+ TRIP_ID,
+ ROUTE,
+ BikeAccess.UNKNOWN,
+ CarAccess.NOT_ALLOWED,
+ TransitMode.FERRY,
+ null,
+ Accessibility.NO_INFORMATION,
+ TripAlteration.PLANNED
+ );
+
+ TripTimes tripTimesCarsUnknown = createTestTripTimes(
+ TRIP_ID,
+ ROUTE,
+ BikeAccess.UNKNOWN,
+ CarAccess.UNKNOWN,
+ TransitMode.FERRY,
+ null,
+ Accessibility.NO_INFORMATION,
+ TripAlteration.PLANNED
+ );
+
+ RouteRequestTransitDataProviderFilter filter = new RouteRequestTransitDataProviderFilter(
+ false,
+ true,
+ false,
+ DEFAULT_ACCESSIBILITY,
+ false,
+ false,
+ Set.of(),
+ List.of(AllowAllTransitFilter.of())
+ );
+
+ assertThat(filter.tripTimesPredicate(tripTimesCarsAllowed, false)).isTrue();
+ assertThat(filter.tripTimesPredicate(tripTimesCarsNotAllowed, false)).isFalse();
+ assertThat(filter.tripTimesPredicate(tripTimesCarsUnknown, false)).isFalse();
+ }
+
@Test
void multipleFilteringTest() {
TripTimes matchingTripTimes = createTestTripTimes(
TRIP_ID,
ROUTE,
BikeAccess.ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.POSSIBLE,
@@ -727,6 +838,7 @@ void multipleFilteringTest() {
TRIP_ID,
ROUTE,
BikeAccess.ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.RAIL,
null,
Accessibility.POSSIBLE,
@@ -736,6 +848,7 @@ void multipleFilteringTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.RAIL,
null,
Accessibility.POSSIBLE,
@@ -745,6 +858,7 @@ void multipleFilteringTest() {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.RAIL,
null,
Accessibility.NOT_POSSIBLE,
@@ -754,6 +868,7 @@ void multipleFilteringTest() {
TRIP_ID,
ROUTE,
BikeAccess.ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.NOT_POSSIBLE,
@@ -763,6 +878,7 @@ void multipleFilteringTest() {
TRIP_ID,
ROUTE,
BikeAccess.ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
null,
Accessibility.POSSIBLE,
@@ -771,6 +887,7 @@ void multipleFilteringTest() {
var filter = new RouteRequestTransitDataProviderFilter(
true,
+ false,
true,
DEFAULT_ACCESSIBILITY,
false,
@@ -793,6 +910,7 @@ private boolean validateModesOnTripTimes(
TripTimes tripTimes
) {
var filter = new RouteRequestTransitDataProviderFilter(
+ false,
false,
false,
DEFAULT_ACCESSIBILITY,
@@ -870,6 +988,7 @@ private RealTimeTripTimes createTestTripTimes(
FeedScopedId tripId,
Route route,
BikeAccess bikeAccess,
+ CarAccess carAccess,
TransitMode mode,
String submode,
Accessibility wheelchairBoarding,
@@ -881,6 +1000,7 @@ private RealTimeTripTimes createTestTripTimes(
.withMode(mode)
.withNetexSubmode(submode)
.withBikesAllowed(bikeAccess)
+ .withCarsAllowed(carAccess)
.withWheelchairBoarding(wheelchairBoarding)
.withNetexAlteration(tripAlteration)
.build();
@@ -899,6 +1019,7 @@ private TripTimes createTestTripTimesWithSubmode(String submode) {
TRIP_ID,
ROUTE,
BikeAccess.NOT_ALLOWED,
+ CarAccess.NOT_ALLOWED,
TransitMode.BUS,
submode,
Accessibility.NOT_POSSIBLE,
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TestRouteData.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TestRouteData.java
index 1d266ce9953..5c345e55931 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TestRouteData.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TestRouteData.java
@@ -12,7 +12,6 @@
import java.util.Map;
import java.util.stream.Collectors;
import org.opentripplanner.framework.i18n.NonLocalizedString;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.StopTime;
import org.opentripplanner.raptor.spi.RaptorTimeTable;
import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripPatternForDate;
@@ -29,6 +28,7 @@
import org.opentripplanner.transit.model.timetable.Trip;
import org.opentripplanner.transit.model.timetable.TripTimes;
import org.opentripplanner.transit.model.timetable.TripTimesFactory;
+import org.opentripplanner.utils.time.TimeUtils;
public class TestRouteData {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripPatternForDatesTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripPatternForDatesTest.java
new file mode 100644
index 00000000000..9189a5b932a
--- /dev/null
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/request/TripPatternForDatesTest.java
@@ -0,0 +1,119 @@
+package org.opentripplanner.routing.algorithm.raptoradapter.transit.request;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.time.LocalDate;
+import java.util.BitSet;
+import java.util.List;
+import org.junit.jupiter.api.Test;
+import org.opentripplanner.model.Frequency;
+import org.opentripplanner.model.StopTime;
+import org.opentripplanner.raptor.api.model.SearchDirection;
+import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripPatternForDate;
+import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
+import org.opentripplanner.transit.model.framework.Deduplicator;
+import org.opentripplanner.transit.model.network.Route;
+import org.opentripplanner.transit.model.network.RoutingTripPattern;
+import org.opentripplanner.transit.model.network.StopPattern;
+import org.opentripplanner.transit.model.network.TripPattern;
+import org.opentripplanner.transit.model.timetable.FrequencyEntry;
+import org.opentripplanner.transit.model.timetable.TripTimes;
+import org.opentripplanner.transit.model.timetable.TripTimesFactory;
+
+class TripPatternForDatesTest {
+
+ private static final int FREQUENCY_START = 7 * 60 * 60;
+ private static final int FREQUENCY_END = 23 * 60 * 60;
+ private static final int HEADWAY = 300;
+ private static final Route ROUTE = TimetableRepositoryForTest.route("1").build();
+ private static final LocalDate SERVICE_DATE = LocalDate.of(2024, 11, 1);
+
+ @Test
+ void forwardSearchInRange() {
+ var result = getTestSubjectWithExactFrequency()
+ .createCustomizedTripSearch(SearchDirection.FORWARD)
+ .search(FREQUENCY_END - HEADWAY, 0);
+ assertTrue(result.time() >= FREQUENCY_END - HEADWAY);
+ assertTrue(result.time() < FREQUENCY_END);
+ }
+
+ @Test
+ void forwardSearchOutOfRange() {
+ var result = getTestSubjectWithExactFrequency()
+ .createCustomizedTripSearch(SearchDirection.FORWARD)
+ .search(FREQUENCY_END, 0);
+ assertTrue(result.empty());
+ }
+
+ @Test
+ void reverseSearchInRange() {
+ var result = getTestSubjectWithExactFrequency()
+ .createCustomizedTripSearch(SearchDirection.REVERSE)
+ .search(FREQUENCY_START, 0);
+ assertEquals(FREQUENCY_START, result.time());
+ }
+
+ @Test
+ void reverseSearchOutOfRange() {
+ var result = getTestSubjectWithExactFrequency()
+ .createCustomizedTripSearch(SearchDirection.REVERSE)
+ .search(FREQUENCY_START - 1, 0);
+ assertTrue(result.empty());
+ }
+
+ private static TripPatternForDates getTestSubjectWithExactFrequency() {
+ var testModel = TimetableRepositoryForTest.of();
+ var stop1 = testModel.stop("FEED:STOP1", 0, 0).build();
+ var stop2 = testModel.stop("FEED:STOP2", 0, 0).build();
+
+ var stopTime1 = new StopTime();
+ stopTime1.setStop(stop1);
+ stopTime1.setArrivalTime(0);
+ stopTime1.setDepartureTime(0);
+ stopTime1.setStopSequence(0);
+ var stopTime2 = new StopTime();
+ stopTime2.setStop(stop2);
+ stopTime2.setArrivalTime(300);
+ stopTime2.setDepartureTime(300);
+ stopTime2.setStopSequence(1);
+ StopPattern stopPattern = new StopPattern(List.of(stopTime1, stopTime2));
+ RoutingTripPattern tripPattern = TripPattern
+ .of(TimetableRepositoryForTest.id("P1"))
+ .withRoute(ROUTE)
+ .withStopPattern(stopPattern)
+ .build()
+ .getRoutingTripPattern();
+
+ final TripTimes tripTimes = TripTimesFactory.tripTimes(
+ TimetableRepositoryForTest.trip("1").withRoute(ROUTE).build(),
+ List.of(stopTime1, stopTime2),
+ new Deduplicator()
+ );
+
+ var frequency = new Frequency();
+ frequency.setStartTime(FREQUENCY_START);
+ frequency.setEndTime(FREQUENCY_END);
+ frequency.setHeadwaySecs(HEADWAY);
+ frequency.setExactTimes(1);
+
+ var boardingAndAlightingPossible = new BitSet(2);
+ boardingAndAlightingPossible.set(0);
+ boardingAndAlightingPossible.set(1);
+
+ return new TripPatternForDates(
+ tripPattern,
+ new TripPatternForDate[] {
+ new TripPatternForDate(
+ tripPattern,
+ List.of(tripTimes),
+ List.of(new FrequencyEntry(frequency, tripTimes)),
+ SERVICE_DATE
+ ),
+ },
+ new int[] { 0 },
+ boardingAndAlightingPossible,
+ boardingAndAlightingPossible,
+ 0
+ );
+ }
+}
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/MinSafeTransferTimeCalculatorTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/MinSafeTransferTimeCalculatorTest.java
index ae10dd0d03e..9b0cf342c0b 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/MinSafeTransferTimeCalculatorTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/MinSafeTransferTimeCalculatorTest.java
@@ -1,18 +1,18 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.raptor._data.stoparrival.BasicPathTestCase.C1_CALCULATOR;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.MinSafeTransferTimeCalculator.bound;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.util.List;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.raptor._data.RaptorTestConstants;
import org.opentripplanner.raptor._data.api.TestPathBuilder;
import org.opentripplanner.raptor._data.stoparrival.BasicPathTestCase;
import org.opentripplanner.raptor._data.transit.TestTripSchedule;
import org.opentripplanner.raptor.api.path.RaptorPath;
+import org.opentripplanner.utils.time.DurationUtils;
public class MinSafeTransferTimeCalculatorTest implements RaptorTestConstants {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TransferWaitTimeCostCalculatorTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TransferWaitTimeCostCalculatorTest.java
index 3d5ae037428..3a375f7968a 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TransferWaitTimeCostCalculatorTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TransferWaitTimeCostCalculatorTest.java
@@ -2,7 +2,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.opentripplanner.framework.time.DurationUtils.durationInSeconds;
+import static org.opentripplanner.utils.time.DurationUtils.durationInSeconds;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripStopTimeTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripStopTimeTest.java
index 0c0d50dfe74..e81b51c4eaa 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripStopTimeTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/TripStopTimeTest.java
@@ -1,13 +1,13 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.StopTime.stopTime;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor._data.transit.TestTripPattern;
import org.opentripplanner.raptor._data.transit.TestTripSchedule;
+import org.opentripplanner.utils.time.TimeUtils;
public class TripStopTimeTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughNoTransfersTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughNoTransfersTest.java
index 926e6ebe15c..11552ea3d1e 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughNoTransfersTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughNoTransfersTest.java
@@ -1,11 +1,11 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestCase.testCase;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.domainService;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.first;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.pathBuilder;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.util.List;
import org.junit.jupiter.params.ParameterizedTest;
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughOneTransferTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughOneTransferTest.java
index ad41f43a586..acd99ab4bef 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughOneTransferTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughOneTransferTest.java
@@ -1,12 +1,12 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestCase.testCase;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.domainService;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.pathBuilder;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.pathFocus;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.tx;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.util.List;
import java.util.stream.Collectors;
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughTwoTransfersTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughTwoTransfersTest.java
index e92e0ba0b3b..05da490c857 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughTwoTransfersTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/PassThroughTwoTransfersTest.java
@@ -1,11 +1,11 @@
package org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestCase.testCase;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.domainService;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.pathBuilder;
import static org.opentripplanner.routing.algorithm.transferoptimization.model.passthrough.TestUtils.tx;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.util.List;
import org.junit.jupiter.params.ParameterizedTest;
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/WalkDurationForStopCombinations.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/WalkDurationForStopCombinations.java
index cfd8f6c4e53..66bb1e02c17 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/WalkDurationForStopCombinations.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/model/passthrough/WalkDurationForStopCombinations.java
@@ -4,8 +4,8 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.raptor.api.request.PassThroughPoint;
+import org.opentripplanner.utils.lang.IntUtils;
/**
* This class is used to adjust the walk time - giving each path an unique generalized-cost. We want
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/OptimizePathDomainServiceConstrainedTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/OptimizePathDomainServiceConstrainedTest.java
index a040da1d23f..109032a0110 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/OptimizePathDomainServiceConstrainedTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/OptimizePathDomainServiceConstrainedTest.java
@@ -2,12 +2,12 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.model.transfer.TransferPriority.ALLOWED;
import static org.opentripplanner.model.transfer.TransferPriority.NOT_ALLOWED;
import static org.opentripplanner.model.transfer.TransferPriority.PREFERRED;
import static org.opentripplanner.model.transfer.TransferPriority.RECOMMENDED;
import static org.opentripplanner.routing.algorithm.transferoptimization.services.TransferGeneratorDummy.dummyTransferGenerator;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.util.List;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/OptimizePathDomainServiceTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/OptimizePathDomainServiceTest.java
index be927046c43..54c45b8a76b 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/OptimizePathDomainServiceTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/OptimizePathDomainServiceTest.java
@@ -1,9 +1,9 @@
package org.opentripplanner.routing.algorithm.transferoptimization.services;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.time.TimeUtils.time;
import static org.opentripplanner.routing.algorithm.transferoptimization.services.TestTransferBuilder.tx;
import static org.opentripplanner.routing.algorithm.transferoptimization.services.TransferGeneratorDummy.dummyTransferGenerator;
+import static org.opentripplanner.utils.time.TimeUtils.time;
import java.util.List;
import javax.annotation.Nullable;
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TestTransferBuilder.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TestTransferBuilder.java
index 90dd9e5915e..d553bac75eb 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TestTransferBuilder.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TestTransferBuilder.java
@@ -1,7 +1,6 @@
package org.opentripplanner.routing.algorithm.transferoptimization.services;
import java.util.Objects;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.transfer.ConstrainedTransfer;
import org.opentripplanner.model.transfer.TransferConstraint;
import org.opentripplanner.model.transfer.TransferPriority;
@@ -13,6 +12,7 @@
import org.opentripplanner.routing.algorithm.transferoptimization.model.TripToTripTransfer;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
import org.opentripplanner.transit.model.timetable.Trip;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This builder is used to create a {@link ConstrainedTransfer} for use in unit-tests. It build a
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransferGeneratorTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransferGeneratorTest.java
index 4283e5cca62..acaefbcf1d9 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransferGeneratorTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransferGeneratorTest.java
@@ -16,7 +16,6 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.transfer.TransferConstraint;
import org.opentripplanner.raptor._data.RaptorTestConstants;
import org.opentripplanner.raptor._data.api.TestPathBuilder;
@@ -29,6 +28,7 @@
import org.opentripplanner.raptor.api.path.TransitPathLeg;
import org.opentripplanner.raptor.spi.DefaultSlackProvider;
import org.opentripplanner.raptor.spi.RaptorSlackProvider;
+import org.opentripplanner.utils.time.TimeUtils;
public class TransferGeneratorTest implements RaptorTestConstants {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransitPathLegSelectorTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransitPathLegSelectorTest.java
index d62f123e7d6..5ce84b4a00d 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransitPathLegSelectorTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/transferoptimization/services/TransitPathLegSelectorTest.java
@@ -8,7 +8,6 @@
import java.util.Set;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.raptor._data.RaptorTestConstants;
import org.opentripplanner.raptor._data.transit.TestAccessEgress;
import org.opentripplanner.raptor._data.transit.TestTripSchedule;
@@ -21,6 +20,7 @@
import org.opentripplanner.routing.algorithm.transferoptimization.model.OptimizedPathTail;
import org.opentripplanner.routing.algorithm.transferoptimization.model.PathTailFilter;
import org.opentripplanner.routing.algorithm.transferoptimization.model.costfilter.MinCostPathTailFilterFactory;
+import org.opentripplanner.utils.time.TimeUtils;
public class TransitPathLegSelectorTest implements RaptorTestConstants {
diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/via/ViaRoutingWorkerTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/via/ViaRoutingWorkerTest.java
index 7b2a4d7e7a6..c11b25d4ac3 100644
--- a/application/src/test/java/org/opentripplanner/routing/algorithm/via/ViaRoutingWorkerTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/algorithm/via/ViaRoutingWorkerTest.java
@@ -10,7 +10,6 @@
import java.time.ZonedDateTime;
import java.util.List;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.GenericLocation;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.Place;
@@ -22,6 +21,7 @@
import org.opentripplanner.routing.api.response.RoutingResponse;
import org.opentripplanner.routing.api.response.ViaRoutingResponseConnection;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* Create search from point A to point B via point C. Search will start at 12:00 and will find two
diff --git a/application/src/test/java/org/opentripplanner/routing/api/request/framework/CostLinearFunctionTest.java b/application/src/test/java/org/opentripplanner/routing/api/request/framework/CostLinearFunctionTest.java
index e4f42fcd409..8d972896878 100644
--- a/application/src/test/java/org/opentripplanner/routing/api/request/framework/CostLinearFunctionTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/api/request/framework/CostLinearFunctionTest.java
@@ -13,8 +13,8 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.opentripplanner.framework.model.Cost;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.test.support.TestTableParser;
+import org.opentripplanner.utils.time.DurationUtils;
class CostLinearFunctionTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/api/request/framework/LinearFunctionSerializationTest.java b/application/src/test/java/org/opentripplanner/routing/api/request/framework/LinearFunctionSerializationTest.java
index 46ef4b50e77..dbb33e1f97b 100644
--- a/application/src/test/java/org/opentripplanner/routing/api/request/framework/LinearFunctionSerializationTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/api/request/framework/LinearFunctionSerializationTest.java
@@ -12,8 +12,8 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.test.support.TestTableParser;
+import org.opentripplanner.utils.time.DurationUtils;
class LinearFunctionSerializationTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/api/request/framework/TimeAndCostPenaltyTest.java b/application/src/test/java/org/opentripplanner/routing/api/request/framework/TimeAndCostPenaltyTest.java
index 58370722e7c..c13fb0e8c63 100644
--- a/application/src/test/java/org/opentripplanner/routing/api/request/framework/TimeAndCostPenaltyTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/api/request/framework/TimeAndCostPenaltyTest.java
@@ -8,7 +8,7 @@
import org.junit.jupiter.api.Test;
import org.opentripplanner.framework.model.Cost;
import org.opentripplanner.framework.model.TimeAndCost;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.time.DurationUtils;
class TimeAndCostPenaltyTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/api/request/framework/TimePenaltyTest.java b/application/src/test/java/org/opentripplanner/routing/api/request/framework/TimePenaltyTest.java
index 087ffa1d637..7321653192e 100644
--- a/application/src/test/java/org/opentripplanner/routing/api/request/framework/TimePenaltyTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/api/request/framework/TimePenaltyTest.java
@@ -7,7 +7,7 @@
import java.time.Duration;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.time.DurationUtils;
class TimePenaltyTest {
diff --git a/application/src/test/java/org/opentripplanner/routing/core/RouteRequestTest.java b/application/src/test/java/org/opentripplanner/routing/core/RouteRequestTest.java
index b18c12e0485..15960c44122 100644
--- a/application/src/test/java/org/opentripplanner/routing/core/RouteRequestTest.java
+++ b/application/src/test/java/org/opentripplanner/routing/core/RouteRequestTest.java
@@ -133,7 +133,7 @@ void testZeroSearchWindow() {
@Test
void testTooLongSearchWindow() {
RouteRequest request = new RouteRequest();
- request.setMaxSearchWindow(DURATION_24_HOURS);
+ request.initMaxSearchWindow(DURATION_24_HOURS);
assertThrows(
IllegalArgumentException.class,
() -> request.setSearchWindow(DURATION_24_HOURS_AND_ONE_MINUTE)
diff --git a/application/src/test/java/org/opentripplanner/service/paging/PS1_LegacyMetaDataTest.java b/application/src/test/java/org/opentripplanner/service/paging/PS1_LegacyMetaDataTest.java
index 609607d84ff..e87e2a5e406 100644
--- a/application/src/test/java/org/opentripplanner/service/paging/PS1_LegacyMetaDataTest.java
+++ b/application/src/test/java/org/opentripplanner/service/paging/PS1_LegacyMetaDataTest.java
@@ -5,7 +5,7 @@
import java.time.Duration;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This tests the entire paging service module.
diff --git a/application/src/test/java/org/opentripplanner/service/paging/PS3_FewItinerariesOnSearchWindowLimitTest.java b/application/src/test/java/org/opentripplanner/service/paging/PS3_FewItinerariesOnSearchWindowLimitTest.java
index 4db61579a47..fffcf93e5fb 100644
--- a/application/src/test/java/org/opentripplanner/service/paging/PS3_FewItinerariesOnSearchWindowLimitTest.java
+++ b/application/src/test/java/org/opentripplanner/service/paging/PS3_FewItinerariesOnSearchWindowLimitTest.java
@@ -11,12 +11,12 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.ItinerarySortKey;
import org.opentripplanner.model.plan.SortOrder;
import org.opentripplanner.model.plan.paging.cursor.PageCursor;
import org.opentripplanner.model.plan.paging.cursor.PageType;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This test focus on testing the paging with few itineraries. There should be no page-cuts. The
diff --git a/application/src/test/java/org/opentripplanner/service/paging/TestDriver.java b/application/src/test/java/org/opentripplanner/service/paging/TestDriver.java
index 928fbaaf01d..e5cbb02012d 100644
--- a/application/src/test/java/org/opentripplanner/service/paging/TestDriver.java
+++ b/application/src/test/java/org/opentripplanner/service/paging/TestDriver.java
@@ -5,8 +5,6 @@
import java.util.List;
import javax.annotation.Nullable;
import org.opentripplanner._support.debug.TestDebug;
-import org.opentripplanner.framework.collection.ListSection;
-import org.opentripplanner.framework.lang.Box;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.ItinerarySortKey;
import org.opentripplanner.model.plan.SortOrder;
@@ -15,6 +13,8 @@
import org.opentripplanner.routing.algorithm.filterchain.filters.system.NumItinerariesFilter;
import org.opentripplanner.routing.algorithm.filterchain.filters.system.OutsideSearchWindowFilter;
import org.opentripplanner.routing.algorithm.filterchain.filters.system.PagingFilter;
+import org.opentripplanner.utils.collection.ListSection;
+import org.opentripplanner.utils.lang.Box;
/**
* This class simulate/mock the context the paging is operating in.
diff --git a/application/src/test/java/org/opentripplanner/service/paging/TestPagingModel.java b/application/src/test/java/org/opentripplanner/service/paging/TestPagingModel.java
index c4db100b56f..9a30b5e8a90 100644
--- a/application/src/test/java/org/opentripplanner/service/paging/TestPagingModel.java
+++ b/application/src/test/java/org/opentripplanner/service/paging/TestPagingModel.java
@@ -1,13 +1,12 @@
package org.opentripplanner.service.paging;
-import static org.opentripplanner.framework.time.TimeUtils.hm2time;
import static org.opentripplanner.model.plan.SortOrder.STREET_AND_ARRIVAL_TIME;
import static org.opentripplanner.model.plan.SortOrder.STREET_AND_DEPARTURE_TIME;
+import static org.opentripplanner.utils.time.TimeUtils.hm2time;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.Place;
import org.opentripplanner.model.plan.SortOrder;
@@ -15,6 +14,7 @@
import org.opentripplanner.model.plan.paging.cursor.PageCursor;
import org.opentripplanner.routing.algorithm.filterchain.framework.sort.SortOrderComparator;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
+import org.opentripplanner.utils.time.TimeUtils;
class TestPagingModel {
diff --git a/application/src/test/java/org/opentripplanner/standalone/config/OtpConfigLoaderTest.java b/application/src/test/java/org/opentripplanner/standalone/config/OtpConfigLoaderTest.java
index c67983355e1..8dae448e2c6 100644
--- a/application/src/test/java/org/opentripplanner/standalone/config/OtpConfigLoaderTest.java
+++ b/application/src/test/java/org/opentripplanner/standalone/config/OtpConfigLoaderTest.java
@@ -15,8 +15,8 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.lang.StringUtils;
import org.opentripplanner.standalone.config.framework.file.ConfigFileLoader;
+import org.opentripplanner.utils.lang.StringUtils;
public class OtpConfigLoaderTest {
diff --git a/application/src/test/java/org/opentripplanner/standalone/config/framework/file/ConfigFileLoaderTest.java b/application/src/test/java/org/opentripplanner/standalone/config/framework/file/ConfigFileLoaderTest.java
index 6cdba6e4b51..2e698efb64d 100644
--- a/application/src/test/java/org/opentripplanner/standalone/config/framework/file/ConfigFileLoaderTest.java
+++ b/application/src/test/java/org/opentripplanner/standalone/config/framework/file/ConfigFileLoaderTest.java
@@ -14,8 +14,8 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.opentripplanner.framework.application.OtpAppException;
-import org.opentripplanner.framework.lang.StringUtils;
import org.opentripplanner.standalone.config.OtpConfigLoader;
+import org.opentripplanner.utils.lang.StringUtils;
class ConfigFileLoaderTest {
diff --git a/application/src/test/java/org/opentripplanner/standalone/config/framework/file/IncludeFileDirectiveTest.java b/application/src/test/java/org/opentripplanner/standalone/config/framework/file/IncludeFileDirectiveTest.java
index cfdda47c160..0fc1199236d 100644
--- a/application/src/test/java/org/opentripplanner/standalone/config/framework/file/IncludeFileDirectiveTest.java
+++ b/application/src/test/java/org/opentripplanner/standalone/config/framework/file/IncludeFileDirectiveTest.java
@@ -8,7 +8,7 @@
import java.nio.file.Files;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.lang.StringUtils;
+import org.opentripplanner.utils.lang.StringUtils;
public class IncludeFileDirectiveTest {
diff --git a/application/src/test/java/org/opentripplanner/street/integration/BikeWalkingTest.java b/application/src/test/java/org/opentripplanner/street/integration/BikeWalkingTest.java
index 1d4ec2f3f79..41ec677b3bb 100644
--- a/application/src/test/java/org/opentripplanner/street/integration/BikeWalkingTest.java
+++ b/application/src/test/java/org/opentripplanner/street/integration/BikeWalkingTest.java
@@ -295,75 +295,6 @@ public void testElevatorBiking() {
);
}
- @Test
- public void testBicycleBicycleNoThruTrafficStart() {
- CD.setBicycleNoThruTraffic(true);
-
- assertPath(
- C,
- F,
- StreetMode.BIKE,
- List.of(
- "null - 0 / 0.0 - null",
- "BICYCLE - 5 / 10.0 - CD street",
- "BICYCLE - 5 / 10.0 - DE street",
- "BICYCLE - 5 / 10.0 - EF street"
- ),
- List.of(
- "null - 0 / 0.0 - null",
- "BICYCLE - 5 / 10.0 - CD street",
- "BICYCLE - 5 / 10.0 - DE street",
- "BICYCLE - 5 / 10.0 - EF street"
- )
- );
- }
-
- @Test
- public void testBicycleBicycleNoThruTrafficMiddle() {
- DE.setBicycleNoThruTraffic(true);
-
- assertPath(
- C,
- F,
- StreetMode.BIKE,
- List.of(
- "null - 0 / 0.0 - null",
- "BICYCLE - 5 / 10.0 - CD street",
- "🚲WALK - 120 / 1100.0 - DE street",
- "BICYCLE - 105 / 1010.0 - EF street"
- ),
- List.of(
- "null - 0 / 0.0 - null",
- "BICYCLE - 105 / 1010.0 - CD street",
- "🚲WALK - 120 / 1100.0 - DE street",
- "BICYCLE - 5 / 10.0 - EF street"
- )
- );
- }
-
- @Test
- public void testBicycleBicycleNoThruTrafficEnd() {
- EF.setBicycleNoThruTraffic(true);
-
- assertPath(
- C,
- F,
- StreetMode.BIKE,
- List.of(
- "null - 0 / 0.0 - null",
- "BICYCLE - 5 / 10.0 - CD street",
- "BICYCLE - 5 / 10.0 - DE street",
- "BICYCLE - 5 / 10.0 - EF street"
- ),
- List.of(
- "null - 0 / 0.0 - null",
- "BICYCLE - 5 / 10.0 - CD street",
- "BICYCLE - 5 / 10.0 - DE street",
- "BICYCLE - 5 / 10.0 - EF street"
- )
- );
- }
-
@BeforeEach
protected void setUp() throws Exception {
// Generate a very simple graph
diff --git a/application/src/test/java/org/opentripplanner/transit/model/organization/AgencyTest.java b/application/src/test/java/org/opentripplanner/transit/model/organization/AgencyTest.java
index d5b0bff33a3..2eff9b5d112 100644
--- a/application/src/test/java/org/opentripplanner/transit/model/organization/AgencyTest.java
+++ b/application/src/test/java/org/opentripplanner/transit/model/organization/AgencyTest.java
@@ -12,7 +12,6 @@
class AgencyTest {
private static final String ID = "1";
- private static final String BRANDING_URL = "http://branding.aaa.com";
private static final String NAME = "name";
private static final String URL = "http://info.aaa.com";
private static final String TIMEZONE = "Europe/Oslo";
@@ -26,7 +25,6 @@ class AgencyTest {
.withUrl(URL)
.withTimezone(TIMEZONE)
.withPhone(PHONE)
- .withBrandingUrl(BRANDING_URL)
.withFareUrl(FARE_URL)
.withLang(LANG)
.build();
@@ -52,7 +50,6 @@ void copy() {
assertEquals(URL, copy.getUrl());
assertEquals(TIMEZONE, copy.getTimezone().getId());
assertEquals(PHONE, copy.getPhone());
- assertEquals(BRANDING_URL, copy.getBrandingUrl());
assertEquals(FARE_URL, copy.getFareUrl());
assertEquals(LANG, copy.getLang());
}
@@ -65,7 +62,6 @@ void sameAs() {
assertFalse(subject.sameAs(subject.copy().withUrl("X").build()));
assertFalse(subject.sameAs(subject.copy().withTimezone("CET").build()));
assertFalse(subject.sameAs(subject.copy().withPhone("X").build()));
- assertFalse(subject.sameAs(subject.copy().withBrandingUrl("X").build()));
assertFalse(subject.sameAs(subject.copy().withFareUrl("X").build()));
assertFalse(subject.sameAs(subject.copy().withLang("X").build()));
}
diff --git a/application/src/test/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimesTest.java b/application/src/test/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimesTest.java
index 75bf99a3fcc..06469a34b2a 100644
--- a/application/src/test/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimesTest.java
+++ b/application/src/test/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimesTest.java
@@ -10,11 +10,11 @@
import java.util.BitSet;
import java.util.List;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
import org.opentripplanner.transit.model.basic.Accessibility;
import org.opentripplanner.transit.model.framework.DataValidationException;
import org.opentripplanner.transit.model.framework.FeedScopedId;
+import org.opentripplanner.utils.time.TimeUtils;
class ScheduledTripTimesTest {
diff --git a/application/src/test/java/org/opentripplanner/transit/model/timetable/TripTest.java b/application/src/test/java/org/opentripplanner/transit/model/timetable/TripTest.java
index 5d50548564a..441ce74927a 100644
--- a/application/src/test/java/org/opentripplanner/transit/model/timetable/TripTest.java
+++ b/application/src/test/java/org/opentripplanner/transit/model/timetable/TripTest.java
@@ -12,6 +12,7 @@
import org.opentripplanner.transit.model.basic.TransitMode;
import org.opentripplanner.transit.model.framework.FeedScopedId;
import org.opentripplanner.transit.model.network.BikeAccess;
+import org.opentripplanner.transit.model.network.CarAccess;
import org.opentripplanner.transit.model.network.Route;
import org.opentripplanner.transit.model.organization.Operator;
@@ -24,6 +25,7 @@ class TripTest {
private static final Direction DIRECTION = Direction.INBOUND;
public static final NonLocalizedString HEAD_SIGN = new NonLocalizedString("head sign");
private static final BikeAccess BIKE_ACCESS = BikeAccess.ALLOWED;
+ private static final CarAccess CAR_ACCESS = CarAccess.ALLOWED;
private static final TransitMode TRANSIT_MODE = TransitMode.BUS;
private static final String BLOCK_ID = "blockId";
private static final TripAlteration TRIP_ALTERATION = TripAlteration.CANCELLATION;
@@ -43,6 +45,7 @@ class TripTest {
.withDirection(DIRECTION)
.withHeadsign(HEAD_SIGN)
.withBikesAllowed(BIKE_ACCESS)
+ .withCarsAllowed(CAR_ACCESS)
.withMode(TRANSIT_MODE)
.withGtfsBlockId(BLOCK_ID)
.withNetexAlteration(TRIP_ALTERATION)
@@ -84,6 +87,7 @@ void copy() {
assertEquals(DIRECTION, copy.getDirection());
assertEquals(HEAD_SIGN, copy.getHeadsign());
assertEquals(BIKE_ACCESS, copy.getBikesAllowed());
+ assertEquals(CAR_ACCESS, copy.getCarsAllowed());
assertEquals(TRANSIT_MODE, copy.getMode());
assertEquals(BLOCK_ID, copy.getGtfsBlockId());
assertEquals(TRIP_ALTERATION, copy.getNetexAlteration());
@@ -110,6 +114,7 @@ void sameAs() {
assertFalse(subject.sameAs(subject.copy().withDirection(Direction.OUTBOUND).build()));
assertFalse(subject.sameAs(subject.copy().withHeadsign(new NonLocalizedString("X")).build()));
assertFalse(subject.sameAs(subject.copy().withBikesAllowed(BikeAccess.NOT_ALLOWED).build()));
+ assertFalse(subject.sameAs(subject.copy().withCarsAllowed(CarAccess.NOT_ALLOWED).build()));
assertFalse(subject.sameAs(subject.copy().withMode(TransitMode.RAIL).build()));
assertFalse(subject.sameAs(subject.copy().withGtfsBlockId("X").build()));
assertFalse(
diff --git a/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/BookingTimeTest.java b/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/BookingTimeTest.java
index 5036defdb88..88b113aec53 100644
--- a/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/BookingTimeTest.java
+++ b/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/BookingTimeTest.java
@@ -5,7 +5,7 @@
import java.time.LocalTime;
import org.junit.jupiter.api.Test;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.time.TimeUtils;
class BookingTimeTest {
diff --git a/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfoTest.java b/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfoTest.java
index e0f507a7983..2b9dfaface8 100644
--- a/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfoTest.java
+++ b/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfoTest.java
@@ -13,7 +13,7 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.time.TimeUtils;
class RoutingBookingInfoTest {
diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/ResultPrinter.java b/application/src/test/java/org/opentripplanner/transit/speed_test/ResultPrinter.java
index 29348a7e911..1d34c88f08e 100644
--- a/application/src/test/java/org/opentripplanner/transit/speed_test/ResultPrinter.java
+++ b/application/src/test/java/org/opentripplanner/transit/speed_test/ResultPrinter.java
@@ -1,17 +1,17 @@
package org.opentripplanner.transit.speed_test;
-import static org.opentripplanner.framework.time.DurationUtils.msToSecondsStr;
+import static org.opentripplanner.utils.time.DurationUtils.msToSecondsStr;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import org.opentripplanner.framework.lang.IntUtils;
-import org.opentripplanner.framework.text.Table;
import org.opentripplanner.transit.speed_test.model.SpeedTestProfile;
import org.opentripplanner.transit.speed_test.model.testcase.TestCase;
import org.opentripplanner.transit.speed_test.model.testcase.TestCaseFailedException;
import org.opentripplanner.transit.speed_test.model.testcase.TestCases;
import org.opentripplanner.transit.speed_test.model.timer.SpeedTestTimer;
+import org.opentripplanner.utils.lang.IntUtils;
+import org.opentripplanner.utils.text.Table;
/**
* Printing stuff clutters up the code, so it is convenient to put printing and formatting output
diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java
index b43adc178d5..f0e87b046c5 100644
--- a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java
+++ b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java
@@ -121,6 +121,7 @@ public SpeedTest(
TestServerContext.createRealtimeVehicleService(transitService),
TestServerContext.createVehicleRentalService(),
TestServerContext.createEmissionsService(),
+ null,
config.flexConfig,
List.of(),
null,
diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/ItineraryResultMapper.java b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/ItineraryResultMapper.java
index 24cbea4aaa0..18d742b895f 100644
--- a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/ItineraryResultMapper.java
+++ b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/ItineraryResultMapper.java
@@ -9,7 +9,6 @@
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.lang.IntUtils;
import org.opentripplanner.model.plan.Itinerary;
import org.opentripplanner.model.plan.Leg;
import org.opentripplanner.model.plan.StreetLeg;
@@ -19,6 +18,7 @@
import org.opentripplanner.transit.model.basic.TransitMode;
import org.opentripplanner.transit.model.organization.Agency;
import org.opentripplanner.transit.model.site.StopLocation;
+import org.opentripplanner.utils.lang.IntUtils;
/**
* Map an Itinerary to a result instance. We do this to normalize the Itinerary for the purpose of
diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/Result.java b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/Result.java
index d44c8e4d8cb..34c63d49dfb 100644
--- a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/Result.java
+++ b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/Result.java
@@ -4,10 +4,10 @@
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
-import org.opentripplanner.framework.collection.CompositeComparator;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.transit.model.basic.TransitMode;
+import org.opentripplanner.utils.collection.CompositeComparator;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This class is responsible for holding information about a test result - a single itinerary. The
diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/TableTestReport.java b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/TableTestReport.java
index 7534529492f..a746e744a96 100644
--- a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/TableTestReport.java
+++ b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/TableTestReport.java
@@ -1,16 +1,16 @@
package org.opentripplanner.transit.speed_test.model.testcase;
-import static org.opentripplanner.framework.text.Table.Align.Center;
-import static org.opentripplanner.framework.text.Table.Align.Left;
-import static org.opentripplanner.framework.text.Table.Align.Right;
+import static org.opentripplanner.utils.text.Table.Align.Center;
+import static org.opentripplanner.utils.text.Table.Align.Left;
+import static org.opentripplanner.utils.text.Table.Align.Right;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.text.Table;
-import org.opentripplanner.framework.text.TableBuilder;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.routing.util.DiffEntry;
+import org.opentripplanner.utils.text.Table;
+import org.opentripplanner.utils.text.TableBuilder;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This class is responsible for creating a test report as a table. The Table is easy to read and
diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/TestCaseDefinition.java b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/TestCaseDefinition.java
index 4a99798b10e..604a4bd1743 100644
--- a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/TestCaseDefinition.java
+++ b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/TestCaseDefinition.java
@@ -2,10 +2,10 @@
import java.time.Duration;
import org.opentripplanner.api.parameter.QualifiedModeSet;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
-import org.opentripplanner.framework.tostring.ValueObjectToStringBuilder;
import org.opentripplanner.model.GenericLocation;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
+import org.opentripplanner.utils.tostring.ValueObjectToStringBuilder;
public record TestCaseDefinition(
String id,
diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/io/AbstractCsvFile.java b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/io/AbstractCsvFile.java
index c703476290e..fe5287b13c3 100644
--- a/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/io/AbstractCsvFile.java
+++ b/application/src/test/java/org/opentripplanner/transit/speed_test/model/testcase/io/AbstractCsvFile.java
@@ -14,9 +14,9 @@
import java.util.function.Function;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.transit.speed_test.model.testcase.TestCase;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/application/src/test/java/org/opentripplanner/updater/trip/TimetableSnapshotSourceTest.java b/application/src/test/java/org/opentripplanner/updater/trip/TimetableSnapshotSourceTest.java
index e817c6e18bb..8e3c793666a 100644
--- a/application/src/test/java/org/opentripplanner/updater/trip/TimetableSnapshotSourceTest.java
+++ b/application/src/test/java/org/opentripplanner/updater/trip/TimetableSnapshotSourceTest.java
@@ -24,7 +24,6 @@
import org.opentripplanner.ConstantsForTests;
import org.opentripplanner.TestOtpModel;
import org.opentripplanner._support.time.ZoneIds;
-import org.opentripplanner.framework.time.ServiceDateUtils;
import org.opentripplanner.model.Timetable;
import org.opentripplanner.model.TimetableSnapshot;
import org.opentripplanner.transit.model.framework.FeedScopedId;
@@ -37,6 +36,7 @@
import org.opentripplanner.transit.service.TransitService;
import org.opentripplanner.updater.GtfsRealtimeFuzzyTripMatcher;
import org.opentripplanner.updater.TimetableSnapshotSourceParameters;
+import org.opentripplanner.utils.time.ServiceDateUtils;
public class TimetableSnapshotSourceTest {
diff --git a/application/src/test/java/org/opentripplanner/updater/trip/TripInput.java b/application/src/test/java/org/opentripplanner/updater/trip/TripInput.java
index e4d9309061a..eb4f3685659 100644
--- a/application/src/test/java/org/opentripplanner/updater/trip/TripInput.java
+++ b/application/src/test/java/org/opentripplanner/updater/trip/TripInput.java
@@ -2,9 +2,9 @@
import java.util.ArrayList;
import java.util.List;
-import org.opentripplanner.framework.time.TimeUtils;
import org.opentripplanner.transit.model.network.Route;
import org.opentripplanner.transit.model.site.RegularStop;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* A simple data structure that is used by the {@link RealtimeTestEnvironment} to create
diff --git a/application/src/test/java/org/opentripplanner/updater/trip/TripUpdateBuilder.java b/application/src/test/java/org/opentripplanner/updater/trip/TripUpdateBuilder.java
index 2960d92a9cd..e8218edfc1f 100644
--- a/application/src/test/java/org/opentripplanner/updater/trip/TripUpdateBuilder.java
+++ b/application/src/test/java/org/opentripplanner/updater/trip/TripUpdateBuilder.java
@@ -7,7 +7,7 @@
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.ZonedDateTime;
-import org.opentripplanner.framework.time.ServiceDateUtils;
+import org.opentripplanner.utils.time.ServiceDateUtils;
public class TripUpdateBuilder {
diff --git a/client/codegen.ts b/client/codegen.ts
index 60299a21a97..a8ad1e40c49 100644
--- a/client/codegen.ts
+++ b/client/codegen.ts
@@ -9,6 +9,9 @@ const config: CodegenConfig = {
preset: 'client',
plugins: [],
},
+ 'src/gql/types.generated.ts': {
+ plugins: ['typescript'],
+ },
},
};
diff --git a/client/package-lock.json b/client/package-lock.json
index c66bb81c6fd..a438e9403fd 100644
--- a/client/package-lock.json
+++ b/client/package-lock.json
@@ -12,7 +12,7 @@
"@js-temporal/polyfill": "0.4.4",
"bootstrap": "5.3.3",
"graphql": "16.9.0",
- "graphql-request": "7.1.0",
+ "graphql-request": "7.1.2",
"maplibre-gl": "4.7.1",
"react": "18.3.1",
"react-bootstrap": "2.10.5",
@@ -21,28 +21,28 @@
},
"devDependencies": {
"@graphql-codegen/cli": "5.0.3",
- "@graphql-codegen/client-preset": "4.3.3",
+ "@graphql-codegen/client-preset": "4.5.0",
"@graphql-codegen/introspection": "4.0.3",
"@parcel/watcher": "2.4.1",
"@testing-library/react": "16.0.1",
- "@types/react": "18.3.11",
+ "@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
- "@vitejs/plugin-react": "4.3.2",
- "@vitest/coverage-v8": "2.1.3",
+ "@vitejs/plugin-react": "4.3.3",
+ "@vitest/coverage-v8": "2.1.4",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.31.0",
- "eslint-plugin-jsx-a11y": "6.10.0",
- "eslint-plugin-react": "7.37.1",
+ "eslint-plugin-jsx-a11y": "6.10.2",
+ "eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "5.0.0",
- "eslint-plugin-react-refresh": "0.4.12",
+ "eslint-plugin-react-refresh": "0.4.14",
"jsdom": "25.0.1",
"prettier": "3.3.3",
"typescript": "5.6.3",
- "vite": "5.4.9",
- "vitest": "2.1.3"
+ "vite": "5.4.10",
+ "vitest": "2.1.4"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -1163,120 +1163,6 @@
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
"dev": true
},
- "node_modules/@dprint/darwin-arm64": {
- "version": "0.46.3",
- "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.46.3.tgz",
- "integrity": "sha512-1ycDpGvclGHF3UG5V6peymPDg6ouNTqM6BjhVELQ6zwr+X98AMhq/1slgO8hwHtPcaS5qhTAS+PkzOmBJRegow==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "peer": true
- },
- "node_modules/@dprint/darwin-x64": {
- "version": "0.46.3",
- "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.46.3.tgz",
- "integrity": "sha512-v5IpLmrY836Q5hJAxZuX097ZNQvoZgO6JKO4bK4l6XDhhHAw2XTIUr41+FM5r36ENxyASMk0NpHjhcHtih3o0g==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "peer": true
- },
- "node_modules/@dprint/formatter": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/@dprint/formatter/-/formatter-0.3.0.tgz",
- "integrity": "sha512-N9fxCxbaBOrDkteSOzaCqwWjso5iAe+WJPsHC021JfHNj2ThInPNEF13ORDKta3llq5D1TlclODCvOvipH7bWQ==",
- "license": "MIT",
- "optional": true,
- "peer": true
- },
- "node_modules/@dprint/linux-arm64-glibc": {
- "version": "0.46.3",
- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.46.3.tgz",
- "integrity": "sha512-9P13g1vgV8RfQH2qBGa8YAfaOeWA42RIhj7lmWRpkDFtwau96reMKwnBBn8bHUnc5e6bSsbPUOMb/X1KMUKz/g==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "peer": true
- },
- "node_modules/@dprint/linux-arm64-musl": {
- "version": "0.46.3",
- "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.46.3.tgz",
- "integrity": "sha512-AAcdcMSZ6DEIoY9E0xQHjkZP+THP7EWsQge4TWzglSIjzn31YltglHAGYFcLB4CTJYpF0NsFDNFktzgkO+s0og==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "peer": true
- },
- "node_modules/@dprint/linux-x64-glibc": {
- "version": "0.46.3",
- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.46.3.tgz",
- "integrity": "sha512-c5cQ3G1rC64nBZ8Pd2LGWwzkEk4D7Ax9NrBbwYmNPvs6mFbGlJPC1+RD95x2WwIrIlMIciLG+Kxmt25PzBphmg==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "peer": true
- },
- "node_modules/@dprint/linux-x64-musl": {
- "version": "0.46.3",
- "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.46.3.tgz",
- "integrity": "sha512-ONtk2QtLcV0TqWOCOqzUFQixgk3JC+vnJLB5L6tQwT7BX5LzeircfE/1f4dg459iqejNC9MBXZkHnXqabvWSow==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "peer": true
- },
- "node_modules/@dprint/typescript": {
- "version": "0.91.1",
- "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.91.1.tgz",
- "integrity": "sha512-BX3TneRLf3OuO/3tsxbseHqWbpCPOOb2vOm9OlKgSYIKqOsCHpz5kWx5iDuGrNwxWWMKife/1ccz87I5tBLaNA==",
- "license": "MIT",
- "optional": true,
- "peer": true
- },
- "node_modules/@dprint/win32-x64": {
- "version": "0.46.3",
- "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.46.3.tgz",
- "integrity": "sha512-xvj4DSEilf0gGdT7CqnwNEgfWNuWqT6eIBxHDEUbmcn1vZ7IwirtqRq/nm3lmYtQaJ4EbtMQZvACHZwxC7G96w==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "peer": true
- },
"node_modules/@esbuild/aix-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
@@ -1855,22 +1741,22 @@
}
}
},
- "node_modules/@graphql-codegen/cli/node_modules/@graphql-codegen/client-preset": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/client-preset/-/client-preset-4.4.0.tgz",
- "integrity": "sha512-Q0NHFK7KXLhEaRC/k82ge0dHDfeHJEvvDeV0vV3+oSurHNa/lpxQtbK2BqknZe+JDfZ1YOOvYT93XsAkYD+SQg==",
+ "node_modules/@graphql-codegen/client-preset": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/client-preset/-/client-preset-4.5.0.tgz",
+ "integrity": "sha512-0fFGSjpDhB7Jp6v+FQWDIeNJhL8VEiy3zeazyus3mGUELPaRQsoos2NczkDWnyMjSB1NHn4GrI53DB4TXkTAog==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-plugin-utils": "^7.20.2",
"@babel/template": "^7.20.7",
"@graphql-codegen/add": "^5.0.3",
- "@graphql-codegen/gql-tag-operations": "4.0.10",
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-codegen/typed-document-node": "^5.0.10",
- "@graphql-codegen/typescript": "^4.1.0",
- "@graphql-codegen/typescript-operations": "^4.3.0",
- "@graphql-codegen/visitor-plugin-common": "^5.4.0",
+ "@graphql-codegen/gql-tag-operations": "4.0.11",
+ "@graphql-codegen/plugin-helpers": "^5.1.0",
+ "@graphql-codegen/typed-document-node": "^5.0.11",
+ "@graphql-codegen/typescript": "^4.1.1",
+ "@graphql-codegen/typescript-operations": "^4.3.1",
+ "@graphql-codegen/visitor-plugin-common": "^5.5.0",
"@graphql-tools/documents": "^1.0.0",
"@graphql-tools/utils": "^10.0.0",
"@graphql-typed-document-node/core": "3.2.0",
@@ -1883,76 +1769,6 @@
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
}
},
- "node_modules/@graphql-codegen/cli/node_modules/@graphql-codegen/gql-tag-operations": {
- "version": "4.0.10",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/gql-tag-operations/-/gql-tag-operations-4.0.10.tgz",
- "integrity": "sha512-WsBEVL3XQdBboFJJL5WxrUjkuo3B7Sa51R9NbT7PKBe0HCNstoouGZIvQJRUubttFCqTTyoFtNsoRSKB+rsRug==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-codegen/visitor-plugin-common": "5.4.0",
- "@graphql-tools/utils": "^10.0.0",
- "auto-bind": "~4.0.0",
- "tslib": "~2.6.0"
- },
- "engines": {
- "node": ">=16"
- },
- "peerDependencies": {
- "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
- }
- },
- "node_modules/@graphql-codegen/cli/node_modules/@graphql-codegen/visitor-plugin-common": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.4.0.tgz",
- "integrity": "sha512-tL7hOrO+4MiNfDiHewhRQCiH9GTAh0M9Y/BZxYGGEdnrfGgqK5pCxtjq7EY/L19VGIyU7hhzYTQ0r1HzEbB4Jw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-tools/optimize": "^2.0.0",
- "@graphql-tools/relay-operation-optimizer": "^7.0.0",
- "@graphql-tools/utils": "^10.0.0",
- "auto-bind": "~4.0.0",
- "change-case-all": "1.0.15",
- "dependency-graph": "^0.11.0",
- "graphql-tag": "^2.11.0",
- "parse-filepath": "^1.0.2",
- "tslib": "~2.6.0"
- },
- "engines": {
- "node": ">=16"
- },
- "peerDependencies": {
- "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
- }
- },
- "node_modules/@graphql-codegen/client-preset": {
- "version": "4.3.3",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/client-preset/-/client-preset-4.3.3.tgz",
- "integrity": "sha512-IrDsSVe8bkKtxgVfKPHzjL9tYlv7KEpA59R4gZLqx/t2WIJncW1i0OMvoz9tgoZsFEs8OKKgXZbnwPZ/Qf1kEw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.20.2",
- "@babel/template": "^7.20.7",
- "@graphql-codegen/add": "^5.0.3",
- "@graphql-codegen/gql-tag-operations": "4.0.9",
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-codegen/typed-document-node": "^5.0.9",
- "@graphql-codegen/typescript": "^4.0.9",
- "@graphql-codegen/typescript-operations": "^4.2.3",
- "@graphql-codegen/visitor-plugin-common": "^5.3.1",
- "@graphql-tools/documents": "^1.0.0",
- "@graphql-tools/utils": "^10.0.0",
- "@graphql-typed-document-node/core": "3.2.0",
- "tslib": "~2.6.0"
- },
- "peerDependencies": {
- "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
- }
- },
"node_modules/@graphql-codegen/core": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@graphql-codegen/core/-/core-4.0.2.tgz",
@@ -1969,18 +1785,21 @@
}
},
"node_modules/@graphql-codegen/gql-tag-operations": {
- "version": "4.0.9",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/gql-tag-operations/-/gql-tag-operations-4.0.9.tgz",
- "integrity": "sha512-lVgu1HClel896HqZAEjynatlU6eJrYOw+rh05DPgM150xvmb7Gz5TnRHA2vfwlDNIXDaToAIpz5RFfkjjnYM1Q==",
+ "version": "4.0.11",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/gql-tag-operations/-/gql-tag-operations-4.0.11.tgz",
+ "integrity": "sha512-EUQuBsYB5RtNlzBb/O0nJvbWC8HvPRWwVTHRf0ElOoQlJfRgfDom2GWmEM5hXa2afzMqB7AWxOH24ibOqiYnMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-codegen/visitor-plugin-common": "5.3.1",
+ "@graphql-codegen/plugin-helpers": "^5.1.0",
+ "@graphql-codegen/visitor-plugin-common": "5.5.0",
"@graphql-tools/utils": "^10.0.0",
"auto-bind": "~4.0.0",
"tslib": "~2.6.0"
},
+ "engines": {
+ "node": ">=16"
+ },
"peerDependencies": {
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
}
@@ -2000,9 +1819,9 @@
}
},
"node_modules/@graphql-codegen/plugin-helpers": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.4.tgz",
- "integrity": "sha512-MOIuHFNWUnFnqVmiXtrI+4UziMTYrcquljaI5f/T/Bc7oO7sXcfkAvgkNWEEi9xWreYwvuer3VHCuPI/lAFWbw==",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.1.0.tgz",
+ "integrity": "sha512-Y7cwEAkprbTKzVIe436TIw4w03jorsMruvCvu0HJkavaKMQbWY+lQ1RIuROgszDbxAyM35twB5/sUvYG5oW+yg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2013,15 +1832,19 @@
"lodash": "~4.17.0",
"tslib": "~2.6.0"
},
+ "engines": {
+ "node": ">=16"
+ },
"peerDependencies": {
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
}
},
"node_modules/@graphql-codegen/schema-ast": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/schema-ast/-/schema-ast-4.0.2.tgz",
- "integrity": "sha512-5mVAOQQK3Oz7EtMl/l3vOQdc2aYClUzVDHHkMvZlunc+KlGgl81j8TLa+X7ANIllqU4fUEsQU3lJmk4hXP6K7Q==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/schema-ast/-/schema-ast-4.1.0.tgz",
+ "integrity": "sha512-kZVn0z+th9SvqxfKYgztA6PM7mhnSZaj4fiuBWvMTqA+QqQ9BBed6Pz41KuD/jr0gJtnlr2A4++/0VlpVbCTmQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@graphql-codegen/plugin-helpers": "^5.0.3",
"@graphql-tools/utils": "^10.0.0",
@@ -2032,41 +1855,16 @@
}
},
"node_modules/@graphql-codegen/typed-document-node": {
- "version": "5.0.10",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/typed-document-node/-/typed-document-node-5.0.10.tgz",
- "integrity": "sha512-YPDUNs6x0muoVWlbY2yEs0lGxFHMTszlGDh6klT/5rqiTDTZg3zz8Wd1ZTihkcH8+V6T0AT9qDWwcx9fcS2tvQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-codegen/visitor-plugin-common": "5.4.0",
- "auto-bind": "~4.0.0",
- "change-case-all": "1.0.15",
- "tslib": "~2.6.0"
- },
- "engines": {
- "node": ">=16"
- },
- "peerDependencies": {
- "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
- }
- },
- "node_modules/@graphql-codegen/typed-document-node/node_modules/@graphql-codegen/visitor-plugin-common": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.4.0.tgz",
- "integrity": "sha512-tL7hOrO+4MiNfDiHewhRQCiH9GTAh0M9Y/BZxYGGEdnrfGgqK5pCxtjq7EY/L19VGIyU7hhzYTQ0r1HzEbB4Jw==",
+ "version": "5.0.11",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/typed-document-node/-/typed-document-node-5.0.11.tgz",
+ "integrity": "sha512-btENKrSIUZ5UllS8sFhVZ+Y91VL0knK9gHxW/6/WzaCTxBQ+wOk07vQNeoWlvMrkl0QeUsGt6YvSo0SoPtsKdA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-tools/optimize": "^2.0.0",
- "@graphql-tools/relay-operation-optimizer": "^7.0.0",
- "@graphql-tools/utils": "^10.0.0",
+ "@graphql-codegen/plugin-helpers": "^5.1.0",
+ "@graphql-codegen/visitor-plugin-common": "5.5.0",
"auto-bind": "~4.0.0",
"change-case-all": "1.0.15",
- "dependency-graph": "^0.11.0",
- "graphql-tag": "^2.11.0",
- "parse-filepath": "^1.0.2",
"tslib": "~2.6.0"
},
"engines": {
@@ -2077,15 +1875,15 @@
}
},
"node_modules/@graphql-codegen/typescript": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-4.1.0.tgz",
- "integrity": "sha512-/fS53Nh6U6c58GTOxqfyKTLQfQv36P8II/vPw/fg0cdcWbALhRPls69P8vXUWjrElmLKzCrdusBWPp/r+AKUBQ==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-4.1.1.tgz",
+ "integrity": "sha512-+o5LOT71K9hdO4lDVnRGkkET5RdlKvxlQGug8dZgRGrhE2/xoPBsKfLhg9AoJGYMauNZxKj3blABQxHOKEku6Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
+ "@graphql-codegen/plugin-helpers": "^5.1.0",
"@graphql-codegen/schema-ast": "^4.0.2",
- "@graphql-codegen/visitor-plugin-common": "5.4.0",
+ "@graphql-codegen/visitor-plugin-common": "5.5.0",
"auto-bind": "~4.0.0",
"tslib": "~2.6.0"
},
@@ -2097,15 +1895,15 @@
}
},
"node_modules/@graphql-codegen/typescript-operations": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-4.3.0.tgz",
- "integrity": "sha512-ZORwMy8OgsiYd9EZUhTMd4/g5LvTFpx6Fh6dNN0cxFkqSc6KhjX0vhzWsyK8N9+ILaHSutT8UTrLMdJi35HzDQ==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-4.3.1.tgz",
+ "integrity": "sha512-yW5Iia6IK1VKiPm3oeukYMQN5pEBLwRlG8ZzQA9beeLQ8PskKyz6mjar6U7dJ2hc8pv/qT4R8kcJOQ2RloniAQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-codegen/typescript": "^4.1.0",
- "@graphql-codegen/visitor-plugin-common": "5.4.0",
+ "@graphql-codegen/plugin-helpers": "^5.1.0",
+ "@graphql-codegen/typescript": "^4.1.1",
+ "@graphql-codegen/visitor-plugin-common": "5.5.0",
"auto-bind": "~4.0.0",
"tslib": "~2.6.0"
},
@@ -2116,39 +1914,14 @@
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
}
},
- "node_modules/@graphql-codegen/typescript-operations/node_modules/@graphql-codegen/visitor-plugin-common": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.4.0.tgz",
- "integrity": "sha512-tL7hOrO+4MiNfDiHewhRQCiH9GTAh0M9Y/BZxYGGEdnrfGgqK5pCxtjq7EY/L19VGIyU7hhzYTQ0r1HzEbB4Jw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-tools/optimize": "^2.0.0",
- "@graphql-tools/relay-operation-optimizer": "^7.0.0",
- "@graphql-tools/utils": "^10.0.0",
- "auto-bind": "~4.0.0",
- "change-case-all": "1.0.15",
- "dependency-graph": "^0.11.0",
- "graphql-tag": "^2.11.0",
- "parse-filepath": "^1.0.2",
- "tslib": "~2.6.0"
- },
- "engines": {
- "node": ">=16"
- },
- "peerDependencies": {
- "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
- }
- },
- "node_modules/@graphql-codegen/typescript/node_modules/@graphql-codegen/visitor-plugin-common": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.4.0.tgz",
- "integrity": "sha512-tL7hOrO+4MiNfDiHewhRQCiH9GTAh0M9Y/BZxYGGEdnrfGgqK5pCxtjq7EY/L19VGIyU7hhzYTQ0r1HzEbB4Jw==",
+ "node_modules/@graphql-codegen/visitor-plugin-common": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.5.0.tgz",
+ "integrity": "sha512-FSkxe/o4qKbpK+ipIT/jxZLYH0+3+XdIrJWsKlCW9wwJMF9mEJLJtzZNcxHSjz7+Eny6SUElAT2dqZ5XByxkog==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
+ "@graphql-codegen/plugin-helpers": "^5.1.0",
"@graphql-tools/optimize": "^2.0.0",
"@graphql-tools/relay-operation-optimizer": "^7.0.0",
"@graphql-tools/utils": "^10.0.0",
@@ -2166,28 +1939,6 @@
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
}
},
- "node_modules/@graphql-codegen/visitor-plugin-common": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.3.1.tgz",
- "integrity": "sha512-MktoBdNZhSmugiDjmFl1z6rEUUaqyxtFJYWnDilE7onkPgyw//O0M+TuPBJPBWdyV6J2ond0Hdqtq+rkghgSIQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@graphql-codegen/plugin-helpers": "^5.0.4",
- "@graphql-tools/optimize": "^2.0.0",
- "@graphql-tools/relay-operation-optimizer": "^7.0.0",
- "@graphql-tools/utils": "^10.0.0",
- "auto-bind": "~4.0.0",
- "change-case-all": "1.0.15",
- "dependency-graph": "^0.11.0",
- "graphql-tag": "^2.11.0",
- "parse-filepath": "^1.0.2",
- "tslib": "~2.6.0"
- },
- "peerDependencies": {
- "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
- }
- },
"node_modules/@graphql-tools/apollo-engine-loader": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-8.0.1.tgz",
@@ -2980,85 +2731,6 @@
"gl-style-validate": "dist/gl-style-validate.mjs"
}
},
- "node_modules/@molt/command": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/@molt/command/-/command-0.9.0.tgz",
- "integrity": "sha512-1JI8dAlpqlZoXyKWVQggX7geFNPxBpocHIXQCsnxDjKy+3WX4SGyZVJXuLlqRRrX7FmQCuuMAfx642ovXmPA9g==",
- "license": "MIT",
- "dependencies": {
- "@molt/types": "0.2.0",
- "alge": "0.8.1",
- "chalk": "^5.3.0",
- "lodash.camelcase": "^4.3.0",
- "lodash.snakecase": "^4.1.1",
- "readline-sync": "^1.4.10",
- "string-length": "^6.0.0",
- "strip-ansi": "^7.1.0",
- "ts-toolbelt": "^9.6.0",
- "type-fest": "^4.3.1",
- "zod": "^3.22.2"
- }
- },
- "node_modules/@molt/command/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/@molt/command/node_modules/chalk": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
- "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
- "license": "MIT",
- "engines": {
- "node": "^12.17.0 || ^14.13 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/@molt/command/node_modules/strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "node_modules/@molt/command/node_modules/type-fest": {
- "version": "4.18.2",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.18.2.tgz",
- "integrity": "sha512-+suCYpfJLAe4OXS6+PPXjW3urOS4IoP9waSiLuXfLgqZODKw/aWwASvzqE886wA0kQgGy0mIWyhd87VpqIy6Xg==",
- "license": "(MIT OR CC0-1.0)",
- "engines": {
- "node": ">=16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@molt/types": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/@molt/types/-/types-0.2.0.tgz",
- "integrity": "sha512-p6ChnEZDGjg9PYPec9BK6Yp5/DdSrYQvXTBAtgrnqX6N36cZy37ql1c8Tc5LclfIYBNG7EZp8NBcRTYJwyi84g==",
- "license": "MIT",
- "dependencies": {
- "ts-toolbelt": "^9.6.0"
- }
- },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -3862,9 +3534,9 @@
"integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q=="
},
"node_modules/@types/react": {
- "version": "18.3.11",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.11.tgz",
- "integrity": "sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==",
+ "version": "18.3.12",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz",
+ "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==",
"license": "MIT",
"dependencies": {
"@types/prop-types": "*",
@@ -4124,9 +3796,9 @@
"dev": true
},
"node_modules/@vitejs/plugin-react": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.2.tgz",
- "integrity": "sha512-hieu+o05v4glEBucTcKMK3dlES0OeJlD9YVOAPraVMOInBCwzumaIFiUjr4bHK7NPgnAHgiskUoceKercrN8vg==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.3.tgz",
+ "integrity": "sha512-NooDe9GpHGqNns1i8XDERg0Vsg5SSYRhRxxyTGogUdkdNt47jal+fbuYi+Yfq6pzRCKXyoPcWisfxE6RIM3GKA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4144,21 +3816,21 @@
}
},
"node_modules/@vitest/coverage-v8": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.3.tgz",
- "integrity": "sha512-2OJ3c7UPoFSmBZwqD2VEkUw6A/tzPF0LmW0ZZhhB8PFxuc+9IBG/FaSM+RLEenc7ljzFvGN+G0nGQoZnh7sy2A==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.4.tgz",
+ "integrity": "sha512-FPKQuJfR6VTfcNMcGpqInmtJuVXFSCd9HQltYncfR01AzXhLucMEtQ5SinPdZxsT5x/5BK7I5qFJ5/ApGCmyTQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@ampproject/remapping": "^2.3.0",
"@bcoe/v8-coverage": "^0.2.3",
- "debug": "^4.3.6",
+ "debug": "^4.3.7",
"istanbul-lib-coverage": "^3.2.2",
"istanbul-lib-report": "^3.0.1",
"istanbul-lib-source-maps": "^5.0.6",
"istanbul-reports": "^3.1.7",
- "magic-string": "^0.30.11",
- "magicast": "^0.3.4",
+ "magic-string": "^0.30.12",
+ "magicast": "^0.3.5",
"std-env": "^3.7.0",
"test-exclude": "^7.0.1",
"tinyrainbow": "^1.2.0"
@@ -4167,8 +3839,8 @@
"url": "https://opencollective.com/vitest"
},
"peerDependencies": {
- "@vitest/browser": "2.1.3",
- "vitest": "2.1.3"
+ "@vitest/browser": "2.1.4",
+ "vitest": "2.1.4"
},
"peerDependenciesMeta": {
"@vitest/browser": {
@@ -4177,15 +3849,15 @@
}
},
"node_modules/@vitest/expect": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.3.tgz",
- "integrity": "sha512-SNBoPubeCJhZ48agjXruCI57DvxcsivVDdWz+SSsmjTT4QN/DfHk3zB/xKsJqMs26bLZ/pNRLnCf0j679i0uWQ==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.4.tgz",
+ "integrity": "sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/spy": "2.1.3",
- "@vitest/utils": "2.1.3",
- "chai": "^5.1.1",
+ "@vitest/spy": "2.1.4",
+ "@vitest/utils": "2.1.4",
+ "chai": "^5.1.2",
"tinyrainbow": "^1.2.0"
},
"funding": {
@@ -4193,22 +3865,21 @@
}
},
"node_modules/@vitest/mocker": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.3.tgz",
- "integrity": "sha512-eSpdY/eJDuOvuTA3ASzCjdithHa+GIF1L4PqtEELl6Qa3XafdMLBpBlZCIUCX2J+Q6sNmjmxtosAG62fK4BlqQ==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.4.tgz",
+ "integrity": "sha512-Ky/O1Lc0QBbutJdW0rqLeFNbuLEyS+mIPiNdlVlp2/yhJ0SbyYqObS5IHdhferJud8MbbwMnexg4jordE5cCoQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/spy": "2.1.3",
+ "@vitest/spy": "2.1.4",
"estree-walker": "^3.0.3",
- "magic-string": "^0.30.11"
+ "magic-string": "^0.30.12"
},
"funding": {
"url": "https://opencollective.com/vitest"
},
"peerDependencies": {
- "@vitest/spy": "2.1.3",
- "msw": "^2.3.5",
+ "msw": "^2.4.9",
"vite": "^5.0.0"
},
"peerDependenciesMeta": {
@@ -4221,9 +3892,9 @@
}
},
"node_modules/@vitest/pretty-format": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.3.tgz",
- "integrity": "sha512-XH1XdtoLZCpqV59KRbPrIhFCOO0hErxrQCMcvnQete3Vibb9UeIOX02uFPfVn3Z9ZXsq78etlfyhnkmIZSzIwQ==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.4.tgz",
+ "integrity": "sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4234,13 +3905,13 @@
}
},
"node_modules/@vitest/runner": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.3.tgz",
- "integrity": "sha512-JGzpWqmFJ4fq5ZKHtVO3Xuy1iF2rHGV4d/pdzgkYHm1+gOzNZtqjvyiaDGJytRyMU54qkxpNzCx+PErzJ1/JqQ==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.4.tgz",
+ "integrity": "sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/utils": "2.1.3",
+ "@vitest/utils": "2.1.4",
"pathe": "^1.1.2"
},
"funding": {
@@ -4248,14 +3919,14 @@
}
},
"node_modules/@vitest/snapshot": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.3.tgz",
- "integrity": "sha512-qWC2mWc7VAXmjAkEKxrScWHWFyCQx/cmiZtuGqMi+WwqQJ2iURsVY4ZfAK6dVo6K2smKRU6l3BPwqEBvhnpQGg==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.4.tgz",
+ "integrity": "sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "2.1.3",
- "magic-string": "^0.30.11",
+ "@vitest/pretty-format": "2.1.4",
+ "magic-string": "^0.30.12",
"pathe": "^1.1.2"
},
"funding": {
@@ -4263,27 +3934,27 @@
}
},
"node_modules/@vitest/spy": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.3.tgz",
- "integrity": "sha512-Nb2UzbcUswzeSP7JksMDaqsI43Sj5+Kry6ry6jQJT4b5gAK+NS9NED6mDb8FlMRCX8m5guaHCDZmqYMMWRy5nQ==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.4.tgz",
+ "integrity": "sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "tinyspy": "^3.0.0"
+ "tinyspy": "^3.0.2"
},
"funding": {
"url": "https://opencollective.com/vitest"
}
},
"node_modules/@vitest/utils": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.3.tgz",
- "integrity": "sha512-xpiVfDSg1RrYT0tX6czgerkpcKFmFOF/gCr30+Mve5V2kewCy4Prn1/NDMSRwaSmT7PRaOF83wu+bEtsY1wrvA==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.4.tgz",
+ "integrity": "sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "2.1.3",
- "loupe": "^3.1.1",
+ "@vitest/pretty-format": "2.1.4",
+ "loupe": "^3.1.2",
"tinyrainbow": "^1.2.0"
},
"funding": {
@@ -4389,18 +4060,6 @@
"url": "https://github.com/sponsors/epoberezkin"
}
},
- "node_modules/alge": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/alge/-/alge-0.8.1.tgz",
- "integrity": "sha512-kiV9nTt+XIauAXsowVygDxMZLplZxDWt0W8plE/nB32/V2ziM/P/TxDbSVK7FYIUt2Xo16h3/htDh199LNPCKQ==",
- "license": "MIT",
- "dependencies": {
- "lodash.ismatch": "^4.4.0",
- "remeda": "^1.0.0",
- "ts-toolbelt": "^9.6.0",
- "zod": "^3.17.3"
- }
- },
"node_modules/ansi-escapes": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -5021,9 +4680,9 @@
}
},
"node_modules/chai": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz",
- "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==",
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz",
+ "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5482,39 +5141,6 @@
"node": ">=6"
}
},
- "node_modules/deep-equal": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz",
- "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "array-buffer-byte-length": "^1.0.0",
- "call-bind": "^1.0.5",
- "es-get-iterator": "^1.1.3",
- "get-intrinsic": "^1.2.2",
- "is-arguments": "^1.1.1",
- "is-array-buffer": "^3.0.2",
- "is-date-object": "^1.0.5",
- "is-regex": "^1.1.4",
- "is-shared-array-buffer": "^1.0.2",
- "isarray": "^2.0.5",
- "object-is": "^1.1.5",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.4",
- "regexp.prototype.flags": "^1.5.1",
- "side-channel": "^1.0.4",
- "which-boxed-primitive": "^1.0.2",
- "which-collection": "^1.0.1",
- "which-typed-array": "^1.1.13"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/deep-is": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
@@ -5676,27 +5302,6 @@
"url": "https://dotenvx.com"
}
},
- "node_modules/dprint": {
- "version": "0.46.3",
- "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.46.3.tgz",
- "integrity": "sha512-ACEd7B7sO/uvPvV/nsHbtkIeMqeD2a8XGO1DokROtKDUmI5WbuflGZOwyjFCYwy4rkX6FXoYBzGdEQ6um7BjCA==",
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "peer": true,
- "bin": {
- "dprint": "bin.js"
- },
- "optionalDependencies": {
- "@dprint/darwin-arm64": "0.46.3",
- "@dprint/darwin-x64": "0.46.3",
- "@dprint/linux-arm64-glibc": "0.46.3",
- "@dprint/linux-arm64-musl": "0.46.3",
- "@dprint/linux-x64-glibc": "0.46.3",
- "@dprint/linux-x64-musl": "0.46.3",
- "@dprint/win32-x64": "0.46.3"
- }
- },
"node_modules/dset": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/dset/-/dset-3.1.3.tgz",
@@ -5835,31 +5440,10 @@
"node": ">= 0.4"
}
},
- "node_modules/es-get-iterator": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz",
- "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.2",
- "get-intrinsic": "^1.1.3",
- "has-symbols": "^1.0.3",
- "is-arguments": "^1.1.1",
- "is-map": "^2.0.2",
- "is-set": "^2.0.2",
- "is-string": "^1.0.7",
- "isarray": "^2.0.5",
- "stop-iteration-iterator": "^1.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/es-iterator-helpers": {
- "version": "1.0.19",
- "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz",
- "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.1.0.tgz",
+ "integrity": "sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5870,12 +5454,12 @@
"es-set-tostringtag": "^2.0.3",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
- "globalthis": "^1.0.3",
+ "globalthis": "^1.0.4",
"has-property-descriptors": "^1.0.2",
"has-proto": "^1.0.3",
"has-symbols": "^1.0.3",
"internal-slot": "^1.0.7",
- "iterator.prototype": "^1.1.2",
+ "iterator.prototype": "^1.1.3",
"safe-array-concat": "^1.1.2"
},
"engines": {
@@ -6192,13 +5776,13 @@
}
},
"node_modules/eslint-plugin-jsx-a11y": {
- "version": "6.10.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.0.tgz",
- "integrity": "sha512-ySOHvXX8eSN6zz8Bywacm7CvGNhUtdjvqfQDVe6020TUK34Cywkw7m0KsCCk1Qtm9G1FayfTN1/7mMYnYO2Bhg==",
+ "version": "6.10.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz",
+ "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "aria-query": "~5.1.3",
+ "aria-query": "^5.3.2",
"array-includes": "^3.1.8",
"array.prototype.flatmap": "^1.3.2",
"ast-types-flow": "^0.0.8",
@@ -6206,14 +5790,13 @@
"axobject-query": "^4.1.0",
"damerau-levenshtein": "^1.0.8",
"emoji-regex": "^9.2.2",
- "es-iterator-helpers": "^1.0.19",
"hasown": "^2.0.2",
"jsx-ast-utils": "^3.3.5",
"language-tags": "^1.0.9",
"minimatch": "^3.1.2",
"object.fromentries": "^2.0.8",
"safe-regex-test": "^1.0.3",
- "string.prototype.includes": "^2.0.0"
+ "string.prototype.includes": "^2.0.1"
},
"engines": {
"node": ">=4.0"
@@ -6223,13 +5806,13 @@
}
},
"node_modules/eslint-plugin-jsx-a11y/node_modules/aria-query": {
- "version": "5.1.3",
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz",
- "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz",
+ "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",
"dev": true,
"license": "Apache-2.0",
- "dependencies": {
- "deep-equal": "^2.0.5"
+ "engines": {
+ "node": ">= 0.4"
}
},
"node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": {
@@ -6257,9 +5840,9 @@
}
},
"node_modules/eslint-plugin-react": {
- "version": "7.37.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.1.tgz",
- "integrity": "sha512-xwTnwDqzbDRA8uJ7BMxPs/EXRB3i8ZfnOIp8BsxEQkT0nHPp+WWceqGgo6rKb9ctNi8GJLDT4Go5HAWELa/WMg==",
+ "version": "7.37.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz",
+ "integrity": "sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6268,7 +5851,7 @@
"array.prototype.flatmap": "^1.3.2",
"array.prototype.tosorted": "^1.1.4",
"doctrine": "^2.1.0",
- "es-iterator-helpers": "^1.0.19",
+ "es-iterator-helpers": "^1.1.0",
"estraverse": "^5.3.0",
"hasown": "^2.0.2",
"jsx-ast-utils": "^2.4.1 || ^3.0.0",
@@ -6303,9 +5886,9 @@
}
},
"node_modules/eslint-plugin-react-refresh": {
- "version": "0.4.12",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.12.tgz",
- "integrity": "sha512-9neVjoGv20FwYtCP6CB1dzR1vr57ZDNOXst21wd2xJ/cTlM2xLq0GWVlSNTdMn/4BtP6cHYBMCSp1wFBJ9jBsg==",
+ "version": "0.4.14",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.14.tgz",
+ "integrity": "sha512-aXvzCTK7ZBv1e7fahFuR3Z/fyQQSIQ711yPgYRj+Oj64tyTgO4iQIDmYXDBqvSWQ/FA4OSCsXOStlF+noU0/NA==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -6517,6 +6100,16 @@
"node": ">=0.10.0"
}
},
+ "node_modules/expect-type": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz",
+ "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
"node_modules/extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
@@ -6873,16 +6466,6 @@
"node": "6.* || 8.* || >= 10.*"
}
},
- "node_modules/get-func-name": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
- "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "*"
- }
- },
"node_modules/get-intrinsic": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
@@ -7045,12 +6628,14 @@
}
},
"node_modules/globalthis": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
- "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
+ "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "define-properties": "^1.1.3"
+ "define-properties": "^1.2.1",
+ "gopd": "^1.0.1"
},
"engines": {
"node": ">= 0.4"
@@ -7149,34 +6734,15 @@
}
},
"node_modules/graphql-request": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-7.1.0.tgz",
- "integrity": "sha512-Ouu/lYVFhARS1aXeZoVJWnGT6grFJXTLwXJuK4mUGGRo0EUk1JkyYp43mdGmRgUVezpRm6V5Sq3t8jBDQcajng==",
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-7.1.2.tgz",
+ "integrity": "sha512-+XE3iuC55C2di5ZUrB4pjgwe+nIQBuXVIK9J98wrVwojzDW3GMdSBZfxUk8l4j9TieIpjpggclxhNEU9ebGF8w==",
"license": "MIT",
"dependencies": {
- "@graphql-typed-document-node/core": "^3.2.0",
- "@molt/command": "^0.9.0",
- "zod": "^3.23.8"
- },
- "bin": {
- "graffle": "build/cli/generate.js"
+ "@graphql-typed-document-node/core": "^3.2.0"
},
"peerDependencies": {
- "@dprint/formatter": "^0.3.0",
- "@dprint/typescript": "^0.91.1",
- "dprint": "^0.46.2",
"graphql": "14 - 16"
- },
- "peerDependenciesMeta": {
- "@dprint/formatter": {
- "optional": true
- },
- "@dprint/typescript": {
- "optional": true
- },
- "dprint": {
- "optional": true
- }
}
},
"node_modules/graphql-tag": {
@@ -7532,23 +7098,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/is-arguments": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
- "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.2",
- "has-tostringtag": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/is-array-buffer": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz",
@@ -7576,6 +7125,7 @@
"resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz",
"integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"has-tostringtag": "^1.0.0"
},
@@ -7694,6 +7244,7 @@
"resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz",
"integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"call-bind": "^1.0.2"
},
@@ -7715,6 +7266,7 @@
"resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",
"integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"has-tostringtag": "^1.0.0"
},
@@ -8092,16 +7644,20 @@
}
},
"node_modules/iterator.prototype": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz",
- "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.3.tgz",
+ "integrity": "sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"define-properties": "^1.2.1",
"get-intrinsic": "^1.2.1",
"has-symbols": "^1.0.3",
"reflect.getprototypeof": "^1.0.4",
"set-function-name": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
}
},
"node_modules/jackspeak": {
@@ -8434,30 +7990,12 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
- "node_modules/lodash.camelcase": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
- "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
- "license": "MIT"
- },
- "node_modules/lodash.ismatch": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz",
- "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==",
- "license": "MIT"
- },
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true
},
- "node_modules/lodash.snakecase": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
- "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==",
- "license": "MIT"
- },
"node_modules/lodash.sortby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
@@ -8527,14 +8065,11 @@
}
},
"node_modules/loupe": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz",
- "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz",
+ "integrity": "sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==",
"dev": true,
- "license": "MIT",
- "dependencies": {
- "get-func-name": "^2.0.1"
- }
+ "license": "MIT"
},
"node_modules/lower-case": {
"version": "2.0.2",
@@ -8574,9 +8109,9 @@
}
},
"node_modules/magic-string": {
- "version": "0.30.11",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz",
- "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==",
+ "version": "0.30.12",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz",
+ "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8584,14 +8119,14 @@
}
},
"node_modules/magicast": {
- "version": "0.3.4",
- "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.4.tgz",
- "integrity": "sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==",
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz",
+ "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/parser": "^7.24.4",
- "@babel/types": "^7.24.0",
+ "@babel/parser": "^7.25.4",
+ "@babel/types": "^7.25.4",
"source-map-js": "^1.2.0"
}
},
@@ -8960,23 +8495,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/object-is": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz",
- "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.7",
- "define-properties": "^1.2.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/object-keys": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
@@ -9739,20 +9257,12 @@
"node": ">= 6"
}
},
- "node_modules/readline-sync": {
- "version": "1.4.10",
- "resolved": "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz",
- "integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8.0"
- }
- },
"node_modules/reflect.getprototypeof": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz",
"integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
@@ -9803,12 +9313,6 @@
"invariant": "^2.2.4"
}
},
- "node_modules/remeda": {
- "version": "1.61.0",
- "resolved": "https://registry.npmjs.org/remeda/-/remeda-1.61.0.tgz",
- "integrity": "sha512-caKfSz9rDeSKBQQnlJnVW3mbVdFgxgGWQKq1XlFokqjf+hQD5gxutLGTTY2A/x24UxVyJe9gH5fAkFI63ULw4A==",
- "license": "MIT"
- },
"node_modules/remedial": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/remedial/-/remedial-1.0.8.tgz",
@@ -10373,19 +9877,6 @@
"integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==",
"dev": true
},
- "node_modules/stop-iteration-iterator": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz",
- "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "internal-slot": "^1.0.4"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
"node_modules/streamsearch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
@@ -10410,48 +9901,6 @@
"integrity": "sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg==",
"dev": true
},
- "node_modules/string-length": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/string-length/-/string-length-6.0.0.tgz",
- "integrity": "sha512-1U361pxZHEQ+FeSjzqRpV+cu2vTzYeWeafXFLykiFlv4Vc0n3njgU8HrMbyik5uwm77naWMuVG8fhEF+Ovb1Kg==",
- "license": "MIT",
- "dependencies": {
- "strip-ansi": "^7.1.0"
- },
- "engines": {
- "node": ">=16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/string-length/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/string-length/node_modules/strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
@@ -10496,14 +9945,18 @@
"dev": true
},
"node_modules/string.prototype.includes": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.0.tgz",
- "integrity": "sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz",
+ "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.5"
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
}
},
"node_modules/string.prototype.matchall": {
@@ -10742,16 +10195,16 @@
"license": "MIT"
},
"node_modules/tinyexec": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz",
- "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==",
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz",
+ "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==",
"dev": true,
"license": "MIT"
},
"node_modules/tinypool": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.0.tgz",
- "integrity": "sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz",
+ "integrity": "sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -10898,12 +10351,6 @@
"integrity": "sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA==",
"dev": true
},
- "node_modules/ts-toolbelt": {
- "version": "9.6.0",
- "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz",
- "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==",
- "license": "Apache-2.0"
- },
"node_modules/tsconfig-paths": {
"version": "3.15.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
@@ -11240,9 +10687,9 @@
}
},
"node_modules/vite": {
- "version": "5.4.9",
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz",
- "integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==",
+ "version": "5.4.10",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz",
+ "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -11300,14 +10747,14 @@
}
},
"node_modules/vite-node": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.3.tgz",
- "integrity": "sha512-I1JadzO+xYX887S39Do+paRePCKoiDrWRRjp9kkG5he0t7RXNvPAJPCQSJqbGN4uCrFFeS3Kj3sLqY8NMYBEdA==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.4.tgz",
+ "integrity": "sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==",
"dev": true,
"license": "MIT",
"dependencies": {
"cac": "^6.7.14",
- "debug": "^4.3.6",
+ "debug": "^4.3.7",
"pathe": "^1.1.2",
"vite": "^5.0.0"
},
@@ -11322,30 +10769,31 @@
}
},
"node_modules/vitest": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.3.tgz",
- "integrity": "sha512-Zrxbg/WiIvUP2uEzelDNTXmEMJXuzJ1kCpbDvaKByFA9MNeO95V+7r/3ti0qzJzrxdyuUw5VduN7k+D3VmVOSA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/expect": "2.1.3",
- "@vitest/mocker": "2.1.3",
- "@vitest/pretty-format": "^2.1.3",
- "@vitest/runner": "2.1.3",
- "@vitest/snapshot": "2.1.3",
- "@vitest/spy": "2.1.3",
- "@vitest/utils": "2.1.3",
- "chai": "^5.1.1",
- "debug": "^4.3.6",
- "magic-string": "^0.30.11",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.4.tgz",
+ "integrity": "sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@vitest/expect": "2.1.4",
+ "@vitest/mocker": "2.1.4",
+ "@vitest/pretty-format": "^2.1.4",
+ "@vitest/runner": "2.1.4",
+ "@vitest/snapshot": "2.1.4",
+ "@vitest/spy": "2.1.4",
+ "@vitest/utils": "2.1.4",
+ "chai": "^5.1.2",
+ "debug": "^4.3.7",
+ "expect-type": "^1.1.0",
+ "magic-string": "^0.30.12",
"pathe": "^1.1.2",
"std-env": "^3.7.0",
"tinybench": "^2.9.0",
- "tinyexec": "^0.3.0",
- "tinypool": "^1.0.0",
+ "tinyexec": "^0.3.1",
+ "tinypool": "^1.0.1",
"tinyrainbow": "^1.2.0",
"vite": "^5.0.0",
- "vite-node": "2.1.3",
+ "vite-node": "2.1.4",
"why-is-node-running": "^2.3.0"
},
"bin": {
@@ -11360,8 +10808,8 @@
"peerDependencies": {
"@edge-runtime/vm": "*",
"@types/node": "^18.0.0 || >=20.0.0",
- "@vitest/browser": "2.1.3",
- "@vitest/ui": "2.1.3",
+ "@vitest/browser": "2.1.4",
+ "@vitest/ui": "2.1.4",
"happy-dom": "*",
"jsdom": "*"
},
@@ -11512,13 +10960,14 @@
}
},
"node_modules/which-builtin-type": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz",
- "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz",
+ "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "function.prototype.name": "^1.1.5",
- "has-tostringtag": "^1.0.0",
+ "function.prototype.name": "^1.1.6",
+ "has-tostringtag": "^1.0.2",
"is-async-function": "^2.0.0",
"is-date-object": "^1.0.5",
"is-finalizationregistry": "^1.0.2",
@@ -11527,8 +10976,8 @@
"is-weakref": "^1.0.2",
"isarray": "^2.0.5",
"which-boxed-primitive": "^1.0.2",
- "which-collection": "^1.0.1",
- "which-typed-array": "^1.1.9"
+ "which-collection": "^1.0.2",
+ "which-typed-array": "^1.1.15"
},
"engines": {
"node": ">= 0.4"
@@ -11744,15 +11193,6 @@
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
- },
- "node_modules/zod": {
- "version": "3.23.8",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
- "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/colinhacks"
- }
}
}
}
diff --git a/client/package.json b/client/package.json
index 8f133b3d4b0..9753fae9777 100644
--- a/client/package.json
+++ b/client/package.json
@@ -21,7 +21,7 @@
"@js-temporal/polyfill": "0.4.4",
"bootstrap": "5.3.3",
"graphql": "16.9.0",
- "graphql-request": "7.1.0",
+ "graphql-request": "7.1.2",
"maplibre-gl": "4.7.1",
"react": "18.3.1",
"react-bootstrap": "2.10.5",
@@ -30,27 +30,27 @@
},
"devDependencies": {
"@graphql-codegen/cli": "5.0.3",
- "@graphql-codegen/client-preset": "4.3.3",
+ "@graphql-codegen/client-preset": "4.5.0",
"@graphql-codegen/introspection": "4.0.3",
"@parcel/watcher": "2.4.1",
"@testing-library/react": "16.0.1",
- "@types/react": "18.3.11",
+ "@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
- "@vitejs/plugin-react": "4.3.2",
- "@vitest/coverage-v8": "2.1.3",
+ "@vitejs/plugin-react": "4.3.3",
+ "@vitest/coverage-v8": "2.1.4",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.31.0",
- "eslint-plugin-jsx-a11y": "6.10.0",
- "eslint-plugin-react": "7.37.1",
+ "eslint-plugin-jsx-a11y": "6.10.2",
+ "eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "5.0.0",
- "eslint-plugin-react-refresh": "0.4.12",
+ "eslint-plugin-react-refresh": "0.4.14",
"jsdom": "25.0.1",
"prettier": "3.3.3",
"typescript": "5.6.3",
- "vite": "5.4.9",
- "vitest": "2.1.3"
+ "vite": "5.4.10",
+ "vitest": "2.1.4"
}
}
diff --git a/client/src/hooks/useServerInfo.ts b/client/src/hooks/useServerInfo.ts
index 117c1357360..30107f336a5 100644
--- a/client/src/hooks/useServerInfo.ts
+++ b/client/src/hooks/useServerInfo.ts
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { graphql } from '../gql';
-import { request } from 'graphql-request'; // eslint-disable-line import/no-unresolved
+import { request } from 'graphql-request';
import { QueryType } from '../gql/graphql.ts';
import { getApiUrl } from '../util/getApiUrl.ts';
diff --git a/client/src/hooks/useTripQuery.ts b/client/src/hooks/useTripQuery.ts
index 5ff6fc80a1f..515cfae290a 100644
--- a/client/src/hooks/useTripQuery.ts
+++ b/client/src/hooks/useTripQuery.ts
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState } from 'react';
-import { request } from 'graphql-request'; // eslint-disable-line import/no-unresolved
+import { request } from 'graphql-request';
import { QueryType, TripQueryVariables } from '../gql/graphql.ts';
import { getApiUrl } from '../util/getApiUrl.ts';
import { query } from '../static/query/tripQuery.tsx';
diff --git a/doc/dev/decisionrecords/Codestyle.md b/doc/dev/decisionrecords/Codestyle.md
index 46e2062f41c..22f57eacbda 100644
--- a/doc/dev/decisionrecords/Codestyle.md
+++ b/doc/dev/decisionrecords/Codestyle.md
@@ -1,96 +1,96 @@
-# Codestyle
+# Code Style
We use the following code conventions for [Java](#Java) and [JavaScript](#JavaScript).
## Java
The OpenTripPlanner Java code style is revised in OTP v2.2. We use the
-[Prettier Java](https://github.com/jhipster/prettier-java) as is. Maven is setup to
+[Prettier Java](https://github.com/jhipster/prettier-java) as is. Maven is set up to
run `prettier-maven-plugin`. A check is run in the CI build, which fails the build preventing
-merging a PR if the code-style is incorrect.
+merging a PR if the code style is incorrect.
-There is two ways to format the code before checkin it in. You may run a normal build with maven -
-it takes a bit of time, but reformat the entire codebase. Only code you have changed should be
-formatted, since the existing code is already formatted. The second way is to set up prettier and
-run it manually or hick it into your IDE, so it runs every time a file is changed.
+There are two ways to format the code before checking it in. You may run a normal build with
+Maven; it takes a bit of time, but it reformats the entire codebase. Only code you have changed
+should be formatted, since the existing code is already formatted. The second way is to set up
+Prettier and run it manually or hick it into your IDE, so it runs every time a file is changed.
-### How to run Prettier with Maven
+### How to Run Prettier with Maven
-Prettier will automatically format all code in the Maven "validate" phase, which runs before the test, package, and install phases. So formatting will happen for example when you run:
+Prettier will automatically format all code in the Maven "validate" phase, which runs before the
+test, package, and install phases. So formatting will happen for example when you run:
-```
+```shell
% mvn test
```
You can manually run _only_ the formatting process with:
-```
+```shell
% mvn prettier:write
-
```
-To skip the prettier formating use profile `prettierSkip`:
+To skip the Prettier formating, use the profile `prettierSkip`:
-```
+```shell
% mvn test -P prettierSkip
```
-The check for formatting errors use profile `prettierCheck`:
+To check for formatting errors, use the profile `prettierCheck`:
-```
+```shell
% mvn test -P prettierCheck
```
The check is run by the CI server and will fail the build if the code is incorrectly formatted.
-### IntellJ and Code Style Formatting
+### IntelliJ and Code Style Formatting
-You should use the prettier Maven plugin to reformat the code or run prettier with Node(faster).
+You should use the Prettier Maven plugin to reformat the code or run Prettier with Node (faster).
-The prettier does NOT format the doc and markdown files, only Java code. So, for other files you should
-use the _project_ code-style. It is automatically imported when you first open the project. But, if
-you have set a custom code-style in your settings (as we used until OTP v2.1), then you need to
-change to the _Project_ Code Style. Open the `Preferences` from the menu and select _
-Editor > Code Style_. Then select **Project** in the \_Scheme drop down.
+Prettier does _not_ format the doc and Markdown files, only Java code. So, for other files you
+should use the _project_ code style. It is automatically imported when you first open the project.
+But, if you have set a custom code style in your settings (as we used until OTP v2.1), then you need
+to change to the _Project_ code style. Open the `Preferences` from the menu and select _Editor >
+Code Style_. Then select **Project** in the \_Scheme drop down.
-#### Run Prettier Maven Plugin as an external tool in IntelliJ
+#### Run Prettier Maven Plugin as an External Tool in IntelliJ
You can run the Prettier Maven plugin as an external tool in IntelliJ. Set it up as an
-`External tool` and assign a key-shortcut to the tool execution.
+`External tool` and assign a keyboard shortcut to the tool execution.
![External Tool Dialog](../images/ExternalToolDialog.png)
-```
+```text
Name: Prettier Format Current File
Program: mvn
Arguments: prettier:write -Dprettier.inputGlobs=$FilePathRelativeToProjectRoot$
Working Directory: $ProjectFileDir$
```
-> **Tip!** Add a unused key shortcut to execute the external tool, then you can use the old
-> short-cut to format other file types.
-
+> **Tip!** Add an unused key shortcut to execute the external tool. Then you can use the old
+> shortcut to format other file types.
#### Install File Watchers Plugin in IntelliJ
-You can also configure IntelliJ to run the prettier every time IntelliJ save a Java file. But,
-if you are editing the file at the same time you will get a warning that the file in memory and the
-file on disk both changed - and asked to select one of them.
+You can also configure IntelliJ to run Prettier every time IntelliJ saves a Java file. But if you
+are editing the file at the same time, you will get a warning that the file in memory and the file
+on disk both changed, and asked to select one of them.
-1. In the menyopen _Prefernces..._ and select _Plugins_.
-2. Search for "File Watchers" in Marketplace
-3. Run _Install_
+1. In the menu, open _Preferences..._ and select _Plugins_.
+2. Search for "File Watchers" in the Marketplace.
+3. Run _Install_.
-##### Configure File Watcher
+##### Configure File Watchers
-You can run Prettier on every file save in Intellij using the File Watcher plugin. There is several
-ways to set it up. Below is hwo to configure it using Maven to run the formatter. The Maven way work
-without any installation of other components, but might be a bit slow. So, you might want to install
-[prettier-java](https://github.com/jhipster/prettier-java/) in your shell and run it instead.
+You can run Prettier upon every file save in IntelliJ using the File Watchers plugin. There are
+several ways to set it up. Below is how to configure it using Maven to run the formatter. The Maven
+way works without any installation of other components but might be a bit slow. So you might want to
+install [prettier-java](https://github.com/jhipster/prettier-java/) in your shell and run it
+instead.
-```
+```text
Name: Format files with Prettier
-File type: Java
+File Type: Java
Scope: Project Files
Program: mvn
Arguments: prettier:write -Dprettier.inputGlobs=$FilePathRelativeToProjectRoot$
@@ -99,43 +99,43 @@ Working Directory: $ProjectFileDir$
### Other IDEs
-We do not have support for other IDEs at the moment. If you use another editor and make one please
+We do not have support for other IDEs at the moment. If you use another editor and make one, please
feel free to share it.
### Sorting Class Members
-Some of the classes in OTP have a lot of fields and methods. Keeping members sorted reduce the merge
+Some of the classes in OTP have a lot of fields and methods. Keeping members sorted reduces merge
conflicts. Adding fields and methods to the end of the list will cause merge conflicts more often
than inserting methods and fields in an ordered list. Fields and methods can be sorted in "feature"
sections or alphabetically, but stick to it and respect it when adding new methods and fields.
The provided formatter will group class members in this order:
-1. Getter and Setter methods are kept together
-2. Overridden methods are kept together
-3. Dependent methods are sorted in a breadth-first order.
+1. Getter and setter methods are kept together.
+2. Overridden methods are kept together.
+3. Dependent methods are sorted in breadth-first order.
4. Members are sorted like this:
- 1. `static` `final` fields (constants)
+ 1. `static final` fields (constants)
2. `static` fields (avoid)
- 3. instance fields
- 4. static initializer
- 5. class initializer
- 6. constructor
+ 3. Instance fields
+ 4. Static initializers
+ 5. Class initializers
+ 6. Constructors
7. `static` factory methods
8. `public` methods
- 9. getter and setters
- 8. `private`/package methods
- 10. `private` enums (avoid `public`)
- 11. interfaces
- 12. `private static` classes (avoid `public`)
- 13. instance classes (avoid)
+ 9. Getter and setters
+ 10. `private`/package methods
+ 11. `private` enums (avoid `public`)
+ 12. Interfaces
+ 13. `private static` classes (avoid `public`)
+ 14. Instance classes (avoid)
-### JavaDoc Guidlines
+### Javadoc Guidelines
As a matter of [policy](http://github.com/opentripplanner/OpenTripPlanner/issues/93), all new
methods, classes, and fields should include comments explaining what they are for and any other
pertinent information. For Java code, the comments should follow industry standards. It is best to
-provide comments that not only explain *what* you did but also *why you did it* while providing some
+provide comments that explain not only *what* you did but also *why you did it* while providing some
context. Please avoid including trivial Javadoc or the empty Javadoc stubs added by IDEs, such as
`@param` annotations with no description.
@@ -144,41 +144,41 @@ context. Please avoid including trivial Javadoc or the empty Javadoc stubs added
- Contract of the method
- Input domain for which the logic is designed
- Range of outputs produced from valid inputs
- - Is behavior undefined or will fail when conditions are not met
- - Are null values allowed as inputs
- - Will null values occur as outputs (what do they mean)
+ - Is behavior undefined or will the method fail when conditions are not met?
+ - Are null values allowed as inputs?
+ - Will null values occur as outputs (and what do they mean)?
- Invariants that hold if the preconditions are met
- Concurrency
- - Is method thread-safe
+ - Is the method thread-safe?
- Usage constraints for multi-threaded use
- On classes:
- Initialization and teardown process
- - Can instance be reused for multiple operations, or should it be discarded
- - Is it immutable or should anything be treated as immutable
- - Is it a utility class of static methods that should not be instantiated
+ - Can an instance be reused for multiple operations, or should it be discarded?
+ - Is it immutable, or should anything be treated as immutable?
+ - Is it a utility class of static methods that should not be instantiated?
### Annotations
- On methods:
- - Method should be marked as `@Nullable` if they can return null values
+ - Method should be marked as `@Nullable` if they can return null values.
- Method parameters should be marked as `@Nullable` if they can take null values.
- On fields:
- Fields should be marked as `@Nullable` if they are nullable.
-Use of `@Nonnull` annotation is not allowed. It should be assumed methods/parameters/fields
-are non-null if they are not marked as `@Nullable`. However, there are places where the
-`@Nullable` annotation is missing even if it should have been used. Those can be updated
-to use the `@Nullable` annotation.
+Use of `@Nonnull` annotation is not allowed. It should be assumed methods/parameters/fields are
+non-null if they are not marked as `@Nullable`. However, there are places where the `@Nullable`
+annotation is missing even if it should have been used. Those can be updated to use the `@Nullable`
+annotation.
## JavaScript
-As of #206, we
-follow [Crockford's JavaScript code conventions](http://javascript.crockford.com/code.html). Further
+As of [#206](https://github.com/opentripplanner/OpenTripPlanner/issues/206), we follow
+[Crockford's JavaScript code conventions](http://javascript.crockford.com/code.html). Further
guidelines include:
* All .js source files should contain one class only
-* Capitalize the class name, as well as the source file name (a la Java)
-* Include the namespace definition in each and every file: `otp.namespace("otp.configure");`
+* Capitalize the class name, as well as the source file name (a la Java).
+* Include the namespace definition in each and every file: `otp.namespace("otp.configure");`.
* Include a class comment. For example,
```javascript
@@ -187,8 +187,8 @@ guidelines include:
*
* Purpose is to allow a generic configuration object to be read via AJAX/JSON, and inserted into an
* Ext Store
- * The implementation is TriMet route map specific...but replacing ConfigureStore object (or member
- * variables) with another implementation, will give this widget flexibility for other uses beyond
+ * The implementation is TriMet route map-specific...but replacing ConfigureStore object (or member
+ * variables) with another implementation will give this widget flexibility for other uses beyond
* the iMap.
*
* @class
diff --git a/doc/dev/decisionrecords/NamingConventions.md b/doc/dev/decisionrecords/NamingConventions.md
index ed6175f4f4c..16b37a799bf 100644
--- a/doc/dev/decisionrecords/NamingConventions.md
+++ b/doc/dev/decisionrecords/NamingConventions.md
@@ -1,74 +1,71 @@
# Naming Conventions
-In general, we use American English. We use the GTFS terminology inside OTP as the transit domain
-specific language. In cases where GTFS does not provide an alternative we use NeTEx. The naming
-should follow the Java standard naming conventions. For example a "real-time updater" class
-is named `RealTimeUpdater`. If in doubt check the Oxford Dictionary(American).
-
+In general, we use American English. We use the GTFS terminology inside OTP as the transit
+domain-specific language. In cases where GTFS does not provide an alternative, we use NeTEx. The
+naming should follow the Java standard naming conventions. For example, a "real-time updater" class
+is named `RealTimeUpdater`. If in doubt, check the Oxford Dictionary (American).
## Packages
Try to arrange code by domain functionality, not technology. The main structure of a package should
be `org.opentripplanner...`.
-| Package | Description |
-| ------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `o.o.` | At the top level we should divide OTP into "domain"s like `apis`, `framework`, `transit`, `street`, `astar`, `raptor`, `feeds`, `updaters`, and `application`. |
-| `component` and `sub-component` | A group of packages/classes which naturally belong together, think aggregate as in Domain Driven Design. |
-| `component.api` | Used for components to define the programing interface for the component. If present, (see Raptor) all outside dependencies to the component should be through the `api`. |
-| `component.model` | Used to create a model of a Entites, ValueObjects, ++. If exposed outside the component you should include an entry point like `xyz.model.XyzModel` and/or a Service (in api or component root package). |
-| `component.service` | Implementation of the service like `DefaultTransitService`, may also contain use-case specific code. Note, the Service interface goes into the component root or `api`, not in the service package. |
-| `component.configure` | Component creation/orchestration. Put Dependency Injection code here, like the Dagger Module. |
-| `support` | Sometimes domain logic get complicated, then extracting/isolating it helps. `support` is used internally in a component, not outside. |
-| `framework` | (Abstract) building blocks internal to a domain/parent package. In some cases accessed outside the component, e.g. `OptAppException`, `TransitEntity`. |
-| `mapping` | Map between two domains/components. |
-| `util` | General "util" functionality, often characterized by `static` methods. Dependencies to other OTP packages is NOT allowed, only 3rd party utils libs. |
-| `o.o.apis` | OTP external endpoints. Note! Many apis are in the Sandbox where they are in the `o.o.ext` package. |
-
-> **Note!** The above is the goal, the current package structure needs cleanup.
-
-> **Note!** Util methods depending on an OTP type/component should go into that type/component, not in the
-utils class. E.g. static factory methods. Warning the "pure" utilities right now are placed into
-sub-packages of `o.o.util`, the root package needs cleanup.
-
+| Package | Description |
+| ------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `o.o.` | At the top level, we should divide OTP into "domains" like `apis`, `framework`, `transit`, `street`, `astar`, `raptor`, `feeds`, `updaters`, and `application`. |
+| `component` and `sub-component` | A group of packages/classes that naturally belong together; think aggregate as in Domain-Driven Design. |
+| `component.api` | Used for components to define the programing interface for the component. If present, (see Raptor) all outside dependencies to the component should be through the `api`. |
+| `component.model` | Used to create a model of Entities, ValueObjects, etc. If exposed outside the component, you should include an entry point like `xyz.model.XyzModel` and/or a Service (in `api` or component root package). |
+| `component.service` | Implementation of a service like `DefaultTransitService`; may also contain use case-specific code. Note: The Service interface goes into the component root or `api`, not in the service package. |
+| `component.configure` | Component creation/orchestration. Put dependency injection code here, like the Dagger module. |
+| `support` | Sometimes domain logic gets complicated; then extracting/isolating it helps. `support` is used internally in a component, not outside. |
+| `framework` | (Abstract) building blocks internal to a domain/parent package. In some cases accessed outside the component; e.g., `OptAppException`, `TransitEntity`. |
+| `mapping` | Map between two domains/components. |
+| `util` | General "util" functionality, often characterized by `static` methods. Dependencies to other OTP packages are NOT allowed; only third-party utils libraries. |
+| `o.o.apis` | OTP external endpoints. Note! Many APIs are in the Sandbox where they are in the `o.o.ext` package. |
+
+> **Note!** The above is the goal. The current package structure needs cleanup.
+
+> **Note!** Util methods depending on an OTP type/component should go into that type/component, not
+> in the utils class; e.g., static factory methods. Warning: The "pure" utilities right now are
+> placed into subpackages of `o.o.util`. The root package needs cleanup.
## Methods
-Here are a list of common prefixes used, and what to expect.
-
-| Good method prefixes | Description |
-|-------------------------------------------------------|-----------------------------------------------------------------------------|
-| `stop() : Stop` | Field accessor, equivalent to `getStop` as in the Java Bean standard |
-| `getStop(ID id) : Stop` | Get Stop by ID, throws exception if not found |
-| `getStops(Collection id) : List/Collection` | Get ALL Stops by set of IDs, throws exception if not found |
-| `findStop(Criteria criteria) : Optional` | Find one or zero stops, return `Optional` |
-| `findStops(Criteria criteria) : List/Stream` | Find 0, 1 or many stops, return a collection or stream(List is preferred) |
-| `listStops() : List/Stream` | List ALL stops in context, return a collection or stream(List is preferred) |
-| `withStop(Stop stop) : Builder` | Set stop in builder, replacing existing value and return `this` builder |
-| `initStop(Stop stop) : void` | Set property ONCE, a second call throws an exception |
-| `addStop(Stop stop) : void/Builder` | Add a stop to a collection of stops. |
-| `addStops(Collection stops) : void/Builder` | Add set of stops to existing set. |
-| `withBike(Consumer body) : Builder` | For nested builders use lambdas. |
-
-These prefixes are also "allowed", but not preferred - they have some kind of negative "force" to them.
-
-| Ok method prefixes, but ... | Description |
-| ------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
-| `withStops(Collection stops) : this`) | Replace all stops in builder with new set, consider using `addStops(...)` instead |
-| `setStop(Stop stop)` | Set a mutable stop reference. Avoid if not part of natural lifecycle. Use `initStop(...)` if possible |
-| `getStop() : Stop` | Old style accessor, use the shorter form `stop() : Stop` |
+Here is a list of common prefixes used and what to expect.
+
+| Good method prefixes | Description |
+|-------------------------------------------------------|-------------------------------------------------------------------------------|
+| `stop() : Stop` | Field accessor, equivalent to `getStop` as in the Java Bean standard. |
+| `getStop(ID id) : Stop` | Get Stop by ID; throws exception if not found. |
+| `getStops(Collection id) : List/Collection` | Get _all_ Stops by set of IDs; throws exception if not found. |
+| `findStop(Criteria criteria) : Optional` | Find one or zero stops; return `Optional`. |
+| `findStops(Criteria criteria) : List/Stream` | Find 0, 1, or many stops; return a Collection or Stream (List is preferred). |
+| `listStops() : List/Stream` | List ALL stops in context; return a Collection or Stream (List is preferred). |
+| `withStop(Stop stop) : Builder` | Set Stop in builder, replacing existing value; return `this` builder. |
+| `initStop(Stop stop) : void` | Set property _once_; a second call throws an exception. |
+| `addStop(Stop stop) : void/Builder` | Add a Stop to a collection of Stops. |
+| `addStops(Collection stops) : void/Builder` | Add set of Stops to existing set. |
+| `withBike(Consumer body) : Builder` | For nested builders, use lambdas. |
+
+These prefixes are also "allowed" but not preferred; they have some kind of negative "force" to
+them.
+
+| Okay method prefixes, but ... | Description |
+|---------------------------------------------|--------------------------------------------------------------------------------------------------------|
+| `withStops(Collection stops) : this`) | Replace all Stops in builder with new set. Consider using `addStops(...)` instead. |
+| `setStop(Stop stop)` | Set a mutable Stop reference. Avoid if not part of natural lifecycle. Use `initStop(...)` if possible. |
+| `getStop() : Stop` | Old style accessor. Use the shorter form `stop() : Stop`. |
## Service, Model and Repository
![MainModelOverview](../images/ServiceModelOverview.png)
-
-
Naming convention for builders with and without a context.
-#### Graph Build and tests run without a context
+#### Graph Builds and Tests Run Without a Context
-```Java
+```java
// Create a new Stop
trip = Trip.of(id).withName("The Express").build();
diff --git a/doc/dev/decisionrecords/RecordsPOJOsBuilders.md b/doc/dev/decisionrecords/RecordsPOJOsBuilders.md
index e0752fc70b0..d34fd3ab6b7 100644
--- a/doc/dev/decisionrecords/RecordsPOJOsBuilders.md
+++ b/doc/dev/decisionrecords/RecordsPOJOsBuilders.md
@@ -1,8 +1,8 @@
## Records, POJOs and Builders
-We prefer immutable typesafe types over flexibility and "short" class definitions. This makes
-the code more robust and less error-prone. References to other entities might need to be mutable,
-if so try to init them once, and throw an exception if set again. Example:
+We prefer immutable typesafe types over flexibility and "short" class definitions. This makes the
+code more robust and less error-prone. References to other entities might need to be mutable; if so,
+try to init them once and throw an exception if set again. Example:
```java
Builder initStop(Stop stop) {
@@ -10,37 +10,46 @@ Builder initStop(Stop stop) {
}
```
-
### Records
-You may use records, but avoid using records if you cannot encapsulate them properly. Generally, records are considered appropriate and useful for throw-away compound types private to an implementation, such as hash table keys or compound values in a temporary list or set. On the other hand, records are generally not appropriate in the domain model where we insist on full encapsulation, which records cannot readily provide. Be especially
-aware of array fields (which can not be protected) and collections (remember to make a defensive copy). Consider overriding `toString`. But if you need to override `equals` and `hashCode`, then it is probably not worth using a record. The implicit `equals()` and `hashCode()` implementations for records behave as if they call `equals` and `hashCode` on each field of the record, so their behavior will depend heavily on the types of these fields.
+You may use records, but avoid using records if you cannot encapsulate them properly. Generally,
+records are considered appropriate and useful for throwaway compound types private to an
+implementation, such as hash table keys or compound values in a temporary list or set. On the other
+hand, records are generally not appropriate in the domain model where we insist on full
+encapsulation, which records cannot readily provide. Be especially aware of array fields (which
+cannot be protected) and collections (remember to make a defensive copy). Consider overriding
+`toString`. But if you need to override `equals` and `hashCode`, then it is probably not worth using
+a record. The implicit `equals` and `hashCode` implementations for records behave as if they call
+`equals` and `hashCode` on each field of the record, so their behavior will depend heavily on the
+types of these fields.
### Builders
OTP used a simple builder pattern in many places, especially when creating immutable types.
-#### Builder conventions
-- Use factory methods to create builder, either `of()` or `copyOf()`. The _copyOf_ uses an existing
- instance as its base. The `of()` creates a builder with all default values set. All constructors
- should be private (or package local) to enforce the use of the factory methods.
-- If the class has more than 5 fields, then avoid using an inner class builder, instead create a
+#### Builder Conventions
+
+- Use factory methods to create builder—either `of` or `copyOf`. The `copyOf` uses an existing
+ instance as its base. The `of` creates a builder with all default values set. All constructors
+ should be private (or package-local) to enforce use of the factory methods.
+- If the class has more than 5 fields, then avoid using an inner class builder. Instead, create a
builder in the same package.
- Make all fields in the main class final to enforce immutability.
- Consider using utility methods for parameter checking, like `Objects#requireNonNull` and
- `ObjectUtils.ifNotNull`.
-- Validate all fields in the main type constructor(i.e. not in the builder), especially null checks.
- Prefer default values over null-checks. All business logic using the type can rely on its validity.
+ `ObjectUtils#ifNotNull`.
+- Validate all fields in the main type constructor (i.e., not in the builder), especially null
+ checks. Prefer default values over null checks. All business logic using the type can rely on its
+ validity.
- You may keep the original instance in the builder to avoid creating a new object if nothing
- changed. This prevents polluting the heap for long-lived objects and make comparison very fast.
-- There is no need to provide all get accessors in the Builder if not needed.
+ changed. This prevents polluting the heap for long-lived objects and makes comparison very fast.
+- There is no need to provide all get accessors in the builder if not needed.
- Unit-test builders and verify all fields are copied over.
-- For nested builders see the field `nested` in the example.
+- For nested builders, see the field `nested` in the example.
- Builder example
+ Builder Example
-```Java
+```java
/**
* THIS CLASS IS IMMUTABLE AND THREAD-SAFE
*/
diff --git a/doc/dev/decisionrecords/UseDecisionRecords.md b/doc/dev/decisionrecords/UseDecisionRecords.md
index a3520ea5133..0cdca42e16d 100644
--- a/doc/dev/decisionrecords/UseDecisionRecords.md
+++ b/doc/dev/decisionrecords/UseDecisionRecords.md
@@ -1,37 +1,36 @@
# Decision Records
-An OTP Decision Record is a justified software design choice that addresses a significant
-functional or non-functional requirement. [Architectural Decision Records](https://adr.github.io/) is a similar
-concept, but we have widened the scope to include any relevant decision about OTP development.
-
+An OTP Decision Record is a justified software design choice that addresses a significant
+functional or non-functional requirement. [Architectural Decision Records](https://adr.github.io/)
+is a similar concept, but we have widened the scope to include any relevant decision about OTP
+development.
## Process
Decisions we make in the developer meetings are recorded in the [Developer Decision Records](/DEVELOPMENT_DECISION_RECORDS.md)
-list. If the decision is small and uncontroversial, but yet important and can be expressed in
+list. If the decision is small and uncontroversial, yet is important and can be expressed in
maximum 2 sentences, we will list it here without any more documentation. If the decision requires
-a bit more discussion and explanations, then we will create a PR with a document for it.
-
-Use the **[template](/doc/dev/decisionrecords/_TEMPLATE.md) as a starting point for documenting
-the decision.
+a bit more discussion and explanation, then we will create a PR with a document for it.
+Use the [template](/doc/dev/decisionrecords/_TEMPLATE.md) as a starting point for documenting the
+decision.
-### How to discuss and document a Decision Record
+### How to Discuss and Document a Decision Record
-- Create a new pull-request and describe the decision record by adding a document to the
+- Create a new pull request and describe the decision record by adding a document to the
`/doc/dev/decisionrecords` folder. Use the [template](/doc/dev/decisionrecords/_TEMPLATE.md).
- template.
-- Present the decision record in a developer meeting. Make sure to update the main description
- based on the feedback/discussion and decisions in the developer meeting.
-- The final approval is done in the developer meeting, at least 3 developers representing 3
+- Present the decision record in a developer meeting. Make sure to update the main description based
+ on the feedback/discussion and decisions in the developer meeting.
+- The final approval is done in the developer meeting. At least 3 developers representing 3
different organisations should approve it. No vote against the proposal. If the developers
are not able to agree, the PLC can decide.
- References to Development Decision Records in reviews can be done by linking or just typing.
- For example `Use-Dependency-Injection` or [Use-Dependency-Injection](../../../DEVELOPMENT_DECISION_RECORDS.md#use-dependency-injection)
+ For example, `Use-Dependency-Injection` or [Use-Dependency-Injection](../../../DEVELOPMENT_DECISION_RECORDS.md#use-dependency-injection).
### Checklist
+
- [ ] Give it a meaningful title that quickly lets the reader understand what it is all about.
- [ ] Get it approved in a developer meeting with 3 votes in favor (3 organisations).
-- [ ] Add the name and description to the list in the [Development Decision Records](../../../DEVELOPMENT_DECISION_RECORDS.md) list.
- Maximum two sentences should be used. Try to keep it as short as possible.
+- [ ] Add the name and description to the list in the [Development Decision Records](../../../DEVELOPMENT_DECISION_RECORDS.md)
+ list. Maximum two sentences should be used. Try to keep it as short as possible.
- [ ] Remember to link to the PR.
diff --git a/doc/dev/decisionrecords/_TEMPLATE.md b/doc/dev/decisionrecords/_TEMPLATE.md
index 45bb3b11d34..88c492ca2df 100644
--- a/doc/dev/decisionrecords/_TEMPLATE.md
+++ b/doc/dev/decisionrecords/_TEMPLATE.md
@@ -2,32 +2,32 @@
{DESCRIPTION}
-Original pull-request: {#NNNN}
+Original pull request: {#NNNN}
### Context and Problem Statement
### Other options
- -
+-
-### Decision & Consequences
+### Decision and Consequences
#### Positive Consequences
- -
+-
#### Negative Consequences
- -
+-
diff --git a/doc/dev/onboarding-checklist.md b/doc/dev/onboarding-checklist.md
index 201238a7fd4..4e39e887175 100644
--- a/doc/dev/onboarding-checklist.md
+++ b/doc/dev/onboarding-checklist.md
@@ -1,4 +1,5 @@
# Onboarding Checklist
+
* What is OTP?
* [Website](https://www.opentripplanner.org/)
* History
diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md
index 37646716f66..6f4b3f9d8b4 100644
--- a/doc/user/Changelog.md
+++ b/doc/user/Changelog.md
@@ -24,6 +24,13 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle
- Change GraphQL tooltip for searchWindowUsed to say minutes, instead of seconds [#6185](https://github.com/opentripplanner/OpenTripPlanner/pull/6185)
- Interpret GTFS extended route types 801-899 also as trolleybus service [#6170](https://github.com/opentripplanner/OpenTripPlanner/pull/6170)
- Disable protocol upgrades for the HTTP client by default. [#6194](https://github.com/opentripplanner/OpenTripPlanner/pull/6194)
+- Fix max search-window when paging [#6189](https://github.com/opentripplanner/OpenTripPlanner/pull/6189)
+- Add car ferry functionality [#5966](https://github.com/opentripplanner/OpenTripPlanner/pull/5966)
+- Make indoor=area and indoor=corridor routable for UK OSM tag mapper [#6119](https://github.com/opentripplanner/OpenTripPlanner/pull/6119)
+- Revert [#6214](https://github.com/opentripplanner/OpenTripPlanner/pull/6214)
+- Remove reading agency and route brandingUrl from GTFS data [#6183](https://github.com/opentripplanner/OpenTripPlanner/pull/6183)
+- Fix NullPointerException when searching backwards with a frequency-based trip [#6211](https://github.com/opentripplanner/OpenTripPlanner/pull/6211)
+- Combine two multi-criteria searches in Raptor [#6182](https://github.com/opentripplanner/OpenTripPlanner/pull/6182)
[](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE)
## 2.6.0 (2024-09-18)
diff --git a/doc/user/Configuration.md b/doc/user/Configuration.md
index bca974f8617..8d94e332e40 100644
--- a/doc/user/Configuration.md
+++ b/doc/user/Configuration.md
@@ -250,6 +250,7 @@ Here is a list of all features which can be toggled on/off and their default val
| `SandboxAPIGeocoder` | Enable the Geocoder API. | | ✓️ |
| `SandboxAPIMapboxVectorTilesApi` | Enable Mapbox vector tiles API. | | ✓️ |
| `SandboxAPIParkAndRideApi` | Enable park-and-ride endpoint. | | ✓️ |
+| `Sorlandsbanen` | Include train Sørlandsbanen in results when searching in south of Norway. Only relevant in Norway. | | ✓️ |
| `TransferAnalyzer` | Analyze transfers during graph build. | | ✓️ |
diff --git a/doc/user/RouterConfiguration.md b/doc/user/RouterConfiguration.md
index 766ad0de4ef..6dbd1174397 100644
--- a/doc/user/RouterConfiguration.md
+++ b/doc/user/RouterConfiguration.md
@@ -237,7 +237,7 @@ few percents.
Split a travel search in smaller jobs and run them in parallel to improve performance.
Use this parameter to set the total number of executable threads available across all searches.
-Multiple searches can run in parallel - this parameter have no effect with regard to that. If 0,
+Multiple searches can run in parallel - this parameter has no effect with regard to that. If 0,
no extra threads are started and the search is done in one thread.
@@ -295,7 +295,7 @@ In addition there is an upper bound on the calculation of the search window:
Upper limit for the search-window calculation.
-Long search windows consumes a lot of resources and may take a long time. Use this parameter to
+Long search windows consume a lot of resources and may take a long time. Use this parameter to
tune the desired maximum search time.
This is the parameter that affects the response time most, the downside is that a search is only
diff --git a/doc/user/osm/UK.md b/doc/user/osm/UK.md
index 4a640caf95c..34c4d1c1778 100644
--- a/doc/user/osm/UK.md
+++ b/doc/user/osm/UK.md
@@ -38,6 +38,8 @@ Lower safety values make an OSM way more desirable and higher values less desira
| `highway=trunk_link; cycleway=opposite_track` | `ALL` | forward: 2.06
back: 0.85 | |
| `highway=trunk; bicycle=designated` | `ALL` | 7.25 | |
| `highway=trunk_link; bicycle=designated` | `ALL` | 2.0 | |
+| `indoor=area` | `PEDESTRIAN` | | |
+| `indoor=corridor` | `PEDESTRIAN` | | |
| `mtb:scale=3` | `NONE` | | |
| `mtb:scale=4` | `NONE` | | |
| `mtb:scale=5` | `NONE` | | |
diff --git a/doc/user/sandbox/Sorlandsbanen.md b/doc/user/sandbox/Sorlandsbanen.md
new file mode 100644
index 00000000000..13bc9163456
--- /dev/null
+++ b/doc/user/sandbox/Sorlandsbanen.md
@@ -0,0 +1,47 @@
+# Sørlandsbanen - The southern railroad in Norway
+
+**This sandbox module is only working in Norway**, in particular only in the south of Norway. The
+feature flag to turn it *on* should only be enabled if you are routing using the norwegian data set.
+
+The railroad in southern Norway is very slow and does not go by the coast where most people live. It
+is easily beaten by coaches in the area. Despite this, we need to include it in results where it is
+relevant.
+
+When the feature flag is enabled, two Raptor searches are performed. The first is the regular
+search - unmodified, as requested by the user. The second search is modified to include train
+results with Sørlandsbanen. This is achieved by setting a high COACH reluctance. We then take any
+rail results(if they exist) from the second search and add it two to the results from the first
+search. The new set of results will contain everything we found in the first search, plus the train
+results in the second results.
+
+Note! This looks at origin and destination coordinates in addition to the feature flag to enable
+the second search. It is automatically enabled if:
+ - the `OTPFeature.Sorlandsbanen` is on.
+ - the origin and/or destination is in the south of Norway.
+ - the search is a long-distance search, origin and destination are fare apart from each other.
+
+
+## Contact Info
+
+- Entur, Norway
+
+## Changelog
+
+- 2024-10-14: We have used this feature for some time, but now want it in the Sandbox so we do not
+ need to merge it everytime we create a new Entur release.
+
+
+### Configuration
+
+This is turned _off_ by default. To turn it on enable the `Sorlandsbanen` feature.
+
+```json
+// otp-config.json
+{
+ "otpFeatures": {
+ "Sorlandsbanen": true
+ }
+}
+```
+
+
diff --git a/mkdocs.yml b/mkdocs.yml
index dd060c3ffd1..15e73773d78 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -121,3 +121,4 @@ nav:
- Ride Hailing: 'sandbox/RideHailing.md'
- Emissions: 'sandbox/Emissions.md'
- Stop Consolidation: 'sandbox/StopConsolidation.md'
+ - Sørlandsbanen: 'sandbox/Sorlandsbanen.md'
diff --git a/pom.xml b/pom.xml
index e590501e6c4..284153b6486 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,16 +58,16 @@
- 167
+ 170
32.0
2.52
- 2.18.0
+ 2.18.1
3.1.9
5.11.2
1.13.5
5.6.0
- 1.5.8
+ 1.5.12
9.12.0
2.0.16
2.0.15
@@ -96,6 +96,7 @@
application
gtfs-realtime-protobuf
+ utils
diff --git a/renovate.json5 b/renovate.json5
index 3514f3d9aff..b46a098392a 100644
--- a/renovate.json5
+++ b/renovate.json5
@@ -26,11 +26,7 @@
"com.azure.resourcemanager:azure-resourcemanager-servicebus",
"com.azure:azure-core",
"com.azure:azure-messaging-servicebus",
- "com.azure:azure-identity",
- // there is a breaking change in this package which is breaking our workflow, that cannot
- // be reverted: https://github.com/dotansimha/graphql-code-generator/issues/10167
- // once that is resolved, we can remove this line
- "@graphql-codegen/client-preset"
+ "com.azure:azure-identity"
],
"enabled": false
},
@@ -58,10 +54,8 @@
"me.fabriciorby:maven-surefire-junit5-tree-reporter",
"com.google.truth:truth",
"org.jacoco:jacoco-maven-plugin", // coverage plugin
- "org.apache.commons:commons-compress" // only used by tests
- ],
- "matchPackagePrefixes": [
- "org.junit.jupiter:",
+ "org.apache.commons:commons-compress", // only used by tests
+ "org.junit.jupiter:{/,}**"
],
"automerge": true,
"schedule": "on the 17th day of the month"
@@ -95,8 +89,8 @@
{
// https://github.com/graphql-java-kickstart/renovate-config/blob/main/default.json
"description": "GraphQL Java (ignoring snapshot builds)",
- "matchPackagePrefixes": [
- "com.graphql-java:"
+ "matchPackageNames": [
+ "com.graphql-java:{/,}**"
],
"allowedVersions": "/^[0-9]+\\.[0-9]+(\\.[0-9]+)?$/"
},
@@ -119,8 +113,8 @@
},
{
"description": "in order to keep review burden low, don't update these quite so frequently",
- "matchPackagePrefixes": [
- "org.apache.lucene:",
+ "matchPackageNames": [
+ "org.apache.lucene:{/,}**",
],
"extends": [
"schedule:quarterly"
@@ -141,16 +135,16 @@
{
"description": "Automerge logging dependencies in a single PR",
"groupName": "logging dependencies",
- "matchPackagePrefixes": [
- "org.slf4j:",
- "ch.qos.logback:"
+ "matchPackageNames": [
+ "org.slf4j:{/,}**",
+ "ch.qos.logback:{/,}**"
],
"automerge": true,
"schedule": "on the 4th day of the month"
},
{
"description": "give some projects time to publish a changelog before opening the PR",
- "matchPackagePrefixes": [
+ "matchPackageNames": [
"com.google.dagger:",
"com.fasterxml.jackson"
],
@@ -158,8 +152,8 @@
},
{
"description": "Geotools takes a while to publish a changelog and since it pulls in JTS it can change the serialization of the graph",
- "matchPackagePrefixes": [
- "org.geotools:"
+ "matchPackageNames": [
+ "org.geotools:{/,}**"
],
"minimumReleaseAge": "1 week",
"labels": ["skip changelog", "bump serialization id"]
diff --git a/utils/pom.xml b/utils/pom.xml
new file mode 100644
index 00000000000..7a223488dd0
--- /dev/null
+++ b/utils/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+ org.opentripplanner
+ otp-root
+ 2.7.0-SNAPSHOT
+
+
+ otp-utils
+ OpenTripPlanner - Utils
+
+
+
+
+ com.google.code.findbugs
+ jsr305
+
+
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-params
+ test
+
+
+
diff --git a/application/src/main/java/org/opentripplanner/framework/collection/CollectionUtils.java b/utils/src/main/java/org/opentripplanner/utils/collection/CollectionUtils.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/collection/CollectionUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/collection/CollectionUtils.java
index 27473dd1383..bb53ec11037 100644
--- a/application/src/main/java/org/opentripplanner/framework/collection/CollectionUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/collection/CollectionUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import java.util.Collection;
import java.util.Map;
diff --git a/application/src/main/java/org/opentripplanner/framework/collection/CollectionsView.java b/utils/src/main/java/org/opentripplanner/utils/collection/CollectionsView.java
similarity index 97%
rename from application/src/main/java/org/opentripplanner/framework/collection/CollectionsView.java
rename to utils/src/main/java/org/opentripplanner/utils/collection/CollectionsView.java
index 4ca6ae5f555..599846f9d86 100644
--- a/application/src/main/java/org/opentripplanner/framework/collection/CollectionsView.java
+++ b/utils/src/main/java/org/opentripplanner/utils/collection/CollectionsView.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import java.io.Serializable;
import java.util.AbstractCollection;
diff --git a/application/src/main/java/org/opentripplanner/framework/collection/CompositeComparator.java b/utils/src/main/java/org/opentripplanner/utils/collection/CompositeComparator.java
similarity index 93%
rename from application/src/main/java/org/opentripplanner/framework/collection/CompositeComparator.java
rename to utils/src/main/java/org/opentripplanner/utils/collection/CompositeComparator.java
index 286df07370a..0c2cf445504 100644
--- a/application/src/main/java/org/opentripplanner/framework/collection/CompositeComparator.java
+++ b/utils/src/main/java/org/opentripplanner/utils/collection/CompositeComparator.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import java.util.Comparator;
diff --git a/application/src/main/java/org/opentripplanner/framework/collection/ListSection.java b/utils/src/main/java/org/opentripplanner/utils/collection/ListSection.java
similarity index 90%
rename from application/src/main/java/org/opentripplanner/framework/collection/ListSection.java
rename to utils/src/main/java/org/opentripplanner/utils/collection/ListSection.java
index d9878aa34b1..ce582f32e65 100644
--- a/application/src/main/java/org/opentripplanner/framework/collection/ListSection.java
+++ b/utils/src/main/java/org/opentripplanner/utils/collection/ListSection.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
/**
* This enum is used to signal which part of a list an operation apply to. You may remove elements
diff --git a/application/src/main/java/org/opentripplanner/framework/collection/ListUtils.java b/utils/src/main/java/org/opentripplanner/utils/collection/ListUtils.java
similarity index 97%
rename from application/src/main/java/org/opentripplanner/framework/collection/ListUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/collection/ListUtils.java
index 35b7e083695..c2f263d0044 100644
--- a/application/src/main/java/org/opentripplanner/framework/collection/ListUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/collection/ListUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/application/src/main/java/org/opentripplanner/framework/collection/MapUtils.java b/utils/src/main/java/org/opentripplanner/utils/collection/MapUtils.java
similarity index 74%
rename from application/src/main/java/org/opentripplanner/framework/collection/MapUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/collection/MapUtils.java
index c68527b6d0e..0a67e01b9fb 100644
--- a/application/src/main/java/org/opentripplanner/framework/collection/MapUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/collection/MapUtils.java
@@ -1,27 +1,15 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
-import gnu.trove.map.TLongObjectMap;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
public class MapUtils {
- public static void addToMapSet(TLongObjectMap> mapSet, long key, U value) {
- Set set = mapSet.get(key);
- if (set == null) {
- set = new HashSet<>();
- mapSet.put(key, set);
- }
- set.add(value);
- }
-
/**
* Map a collection of objects of type S to a list of type T using the provided
* mapping function.
diff --git a/application/src/main/java/org/opentripplanner/framework/collection/SetUtils.java b/utils/src/main/java/org/opentripplanner/utils/collection/SetUtils.java
similarity index 88%
rename from application/src/main/java/org/opentripplanner/framework/collection/SetUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/collection/SetUtils.java
index b8f773aab72..fec99c8b28c 100644
--- a/application/src/main/java/org/opentripplanner/framework/collection/SetUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/collection/SetUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import java.util.Arrays;
import java.util.Collection;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/ArrayUtils.java b/utils/src/main/java/org/opentripplanner/utils/lang/ArrayUtils.java
similarity index 87%
rename from application/src/main/java/org/opentripplanner/framework/lang/ArrayUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/ArrayUtils.java
index a3a67cb67cd..afd8e59ec0b 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/ArrayUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/ArrayUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import javax.annotation.Nullable;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/BitSetUtils.java b/utils/src/main/java/org/opentripplanner/utils/lang/BitSetUtils.java
similarity index 97%
rename from application/src/main/java/org/opentripplanner/framework/lang/BitSetUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/BitSetUtils.java
index 1f5bdb91fab..afb9654e56e 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/BitSetUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/BitSetUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
/**
* A compact bit set utility class. It rely on the client to store the bit set himself (either as a
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/Box.java b/utils/src/main/java/org/opentripplanner/utils/lang/Box.java
similarity index 95%
rename from application/src/main/java/org/opentripplanner/framework/lang/Box.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/Box.java
index ae54a3c5b7f..e7d32acdbe9 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/Box.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/Box.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import java.util.Objects;
import javax.annotation.Nullable;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/DoubleUtils.java b/utils/src/main/java/org/opentripplanner/utils/lang/DoubleUtils.java
similarity index 95%
rename from application/src/main/java/org/opentripplanner/framework/lang/DoubleUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/DoubleUtils.java
index 0267e9e3b5d..a285ade8ad5 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/DoubleUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/DoubleUtils.java
@@ -1,6 +1,6 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
-import static org.opentripplanner.framework.lang.OtpNumberFormat.formatTwoDecimals;
+import static org.opentripplanner.utils.lang.OtpNumberFormat.formatTwoDecimals;
import java.math.BigDecimal;
import java.math.RoundingMode;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/IntBox.java b/utils/src/main/java/org/opentripplanner/utils/lang/IntBox.java
similarity index 95%
rename from application/src/main/java/org/opentripplanner/framework/lang/IntBox.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/IntBox.java
index 3e7a828a526..c564f6f8e25 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/IntBox.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/IntBox.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
/**
* An IntBox is a writable container for an int. The most common use-case for this class is to
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/IntRange.java b/utils/src/main/java/org/opentripplanner/utils/lang/IntRange.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/lang/IntRange.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/IntRange.java
index c8ff5b45d46..88477cbce27 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/IntRange.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/IntRange.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import java.util.Objects;
import java.util.Optional;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/IntUtils.java b/utils/src/main/java/org/opentripplanner/utils/lang/IntUtils.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/lang/IntUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/IntUtils.java
index de4904dcd7c..31dbd9fa72b 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/IntUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/IntUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/MemEfficientArrayBuilder.java b/utils/src/main/java/org/opentripplanner/utils/lang/MemEfficientArrayBuilder.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/lang/MemEfficientArrayBuilder.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/MemEfficientArrayBuilder.java
index 7bf36dd5b86..740cfa2e60c 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/MemEfficientArrayBuilder.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/MemEfficientArrayBuilder.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import java.util.Arrays;
import java.util.Objects;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/ObjectUtils.java b/utils/src/main/java/org/opentripplanner/utils/lang/ObjectUtils.java
similarity index 97%
rename from application/src/main/java/org/opentripplanner/framework/lang/ObjectUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/ObjectUtils.java
index a3f18748987..da619cdeb79 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/ObjectUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/ObjectUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import java.util.function.Function;
import java.util.function.Supplier;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/OtpNumberFormat.java b/utils/src/main/java/org/opentripplanner/utils/lang/OtpNumberFormat.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/lang/OtpNumberFormat.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/OtpNumberFormat.java
index 1ff2aca37a3..3dd1e0d76e7 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/OtpNumberFormat.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/OtpNumberFormat.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import java.math.BigInteger;
import java.text.DecimalFormat;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/Sandbox.java b/utils/src/main/java/org/opentripplanner/utils/lang/Sandbox.java
similarity index 93%
rename from application/src/main/java/org/opentripplanner/framework/lang/Sandbox.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/Sandbox.java
index 67c9644fc0f..5b4d83e7772 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/Sandbox.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/Sandbox.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
diff --git a/application/src/main/java/org/opentripplanner/framework/lang/StringUtils.java b/utils/src/main/java/org/opentripplanner/utils/lang/StringUtils.java
similarity index 99%
rename from application/src/main/java/org/opentripplanner/framework/lang/StringUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/lang/StringUtils.java
index 5d18981e0e3..72eb2638c13 100644
--- a/application/src/main/java/org/opentripplanner/framework/lang/StringUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/lang/StringUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import java.util.regex.Pattern;
diff --git a/application/src/main/java/org/opentripplanner/framework/logging/ProgressTracker.java b/utils/src/main/java/org/opentripplanner/utils/logging/ProgressTracker.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/logging/ProgressTracker.java
rename to utils/src/main/java/org/opentripplanner/utils/logging/ProgressTracker.java
index 4be70e2abdf..4922186bfc6 100644
--- a/application/src/main/java/org/opentripplanner/framework/logging/ProgressTracker.java
+++ b/utils/src/main/java/org/opentripplanner/utils/logging/ProgressTracker.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.logging;
+package org.opentripplanner.utils.logging;
import java.io.InputStream;
import java.io.OutputStream;
@@ -7,8 +7,8 @@
import java.time.Instant;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Consumer;
-import org.opentripplanner.framework.text.FileSizeToTextConverter;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.text.FileSizeToTextConverter;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* The progress tracker notify the caller based a time interval.
diff --git a/application/src/main/java/org/opentripplanner/framework/logging/ProgressTrackerInputStream.java b/utils/src/main/java/org/opentripplanner/utils/logging/ProgressTrackerInputStream.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/logging/ProgressTrackerInputStream.java
rename to utils/src/main/java/org/opentripplanner/utils/logging/ProgressTrackerInputStream.java
index 1e5a5386275..6e3b71bfe66 100644
--- a/application/src/main/java/org/opentripplanner/framework/logging/ProgressTrackerInputStream.java
+++ b/utils/src/main/java/org/opentripplanner/utils/logging/ProgressTrackerInputStream.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.logging;
+package org.opentripplanner.utils.logging;
import java.io.IOException;
import java.io.InputStream;
diff --git a/application/src/main/java/org/opentripplanner/framework/logging/ProgressTrackerOutputStream.java b/utils/src/main/java/org/opentripplanner/utils/logging/ProgressTrackerOutputStream.java
similarity index 96%
rename from application/src/main/java/org/opentripplanner/framework/logging/ProgressTrackerOutputStream.java
rename to utils/src/main/java/org/opentripplanner/utils/logging/ProgressTrackerOutputStream.java
index 38095634bdd..5f4583b8ed7 100644
--- a/application/src/main/java/org/opentripplanner/framework/logging/ProgressTrackerOutputStream.java
+++ b/utils/src/main/java/org/opentripplanner/utils/logging/ProgressTrackerOutputStream.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.logging;
+package org.opentripplanner.utils.logging;
import java.io.IOException;
import java.io.OutputStream;
diff --git a/application/src/main/java/org/opentripplanner/framework/logging/Throttle.java b/utils/src/main/java/org/opentripplanner/utils/logging/Throttle.java
similarity index 96%
rename from application/src/main/java/org/opentripplanner/framework/logging/Throttle.java
rename to utils/src/main/java/org/opentripplanner/utils/logging/Throttle.java
index ed8a2c1bef4..393bef0c19a 100644
--- a/application/src/main/java/org/opentripplanner/framework/logging/Throttle.java
+++ b/utils/src/main/java/org/opentripplanner/utils/logging/Throttle.java
@@ -1,7 +1,7 @@
-package org.opentripplanner.framework.logging;
+package org.opentripplanner.utils.logging;
import java.time.Duration;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This class can be used to throttle (logging) events.
diff --git a/application/src/main/java/org/opentripplanner/framework/text/CharacterEscapeFormatter.java b/utils/src/main/java/org/opentripplanner/utils/text/CharacterEscapeFormatter.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/text/CharacterEscapeFormatter.java
rename to utils/src/main/java/org/opentripplanner/utils/text/CharacterEscapeFormatter.java
index 2bd5bf14b71..46faba6e806 100644
--- a/application/src/main/java/org/opentripplanner/framework/text/CharacterEscapeFormatter.java
+++ b/utils/src/main/java/org/opentripplanner/utils/text/CharacterEscapeFormatter.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
/**
* This class is used to escape characters in a string, removing a special character from
diff --git a/application/src/main/java/org/opentripplanner/framework/text/FileSizeToTextConverter.java b/utils/src/main/java/org/opentripplanner/utils/text/FileSizeToTextConverter.java
similarity index 93%
rename from application/src/main/java/org/opentripplanner/framework/text/FileSizeToTextConverter.java
rename to utils/src/main/java/org/opentripplanner/utils/text/FileSizeToTextConverter.java
index e110d626480..41b04fd3194 100644
--- a/application/src/main/java/org/opentripplanner/framework/text/FileSizeToTextConverter.java
+++ b/utils/src/main/java/org/opentripplanner/utils/text/FileSizeToTextConverter.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import java.util.Locale;
diff --git a/application/src/main/java/org/opentripplanner/framework/text/HexString.java b/utils/src/main/java/org/opentripplanner/utils/text/HexString.java
similarity index 91%
rename from application/src/main/java/org/opentripplanner/framework/text/HexString.java
rename to utils/src/main/java/org/opentripplanner/utils/text/HexString.java
index e85a139b624..16d5c56c58b 100644
--- a/application/src/main/java/org/opentripplanner/framework/text/HexString.java
+++ b/utils/src/main/java/org/opentripplanner/utils/text/HexString.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
/**
* Converts a byte array to its hexadecimal representation
diff --git a/application/src/main/java/org/opentripplanner/framework/text/MarkdownFormatter.java b/utils/src/main/java/org/opentripplanner/utils/text/MarkdownFormatter.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/text/MarkdownFormatter.java
rename to utils/src/main/java/org/opentripplanner/utils/text/MarkdownFormatter.java
index 6fdb495a0d5..95e54a1bb3f 100644
--- a/application/src/main/java/org/opentripplanner/framework/text/MarkdownFormatter.java
+++ b/utils/src/main/java/org/opentripplanner/utils/text/MarkdownFormatter.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import javax.annotation.Nullable;
diff --git a/application/src/main/java/org/opentripplanner/framework/text/Table.java b/utils/src/main/java/org/opentripplanner/utils/text/Table.java
similarity index 96%
rename from application/src/main/java/org/opentripplanner/framework/text/Table.java
rename to utils/src/main/java/org/opentripplanner/utils/text/Table.java
index 940868b82e2..bf13c23bcf5 100644
--- a/application/src/main/java/org/opentripplanner/framework/text/Table.java
+++ b/utils/src/main/java/org/opentripplanner/utils/text/Table.java
@@ -1,11 +1,11 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-import org.opentripplanner.framework.lang.ObjectUtils;
-import org.opentripplanner.framework.lang.StringUtils;
+import org.opentripplanner.utils.lang.ObjectUtils;
+import org.opentripplanner.utils.lang.StringUtils;
/**
* This class is responsible for creating a pretty table that can be printed to a terminal window.
diff --git a/application/src/main/java/org/opentripplanner/framework/text/TableBuilder.java b/utils/src/main/java/org/opentripplanner/utils/text/TableBuilder.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/text/TableBuilder.java
rename to utils/src/main/java/org/opentripplanner/utils/text/TableBuilder.java
index 12e80fd62a8..e573cce6c37 100644
--- a/application/src/main/java/org/opentripplanner/framework/text/TableBuilder.java
+++ b/utils/src/main/java/org/opentripplanner/utils/text/TableBuilder.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/application/src/main/java/org/opentripplanner/framework/text/TableRowFormatter.java b/utils/src/main/java/org/opentripplanner/utils/text/TableRowFormatter.java
similarity index 93%
rename from application/src/main/java/org/opentripplanner/framework/text/TableRowFormatter.java
rename to utils/src/main/java/org/opentripplanner/utils/text/TableRowFormatter.java
index 3e7e3c727f9..9db03403a0a 100644
--- a/application/src/main/java/org/opentripplanner/framework/text/TableRowFormatter.java
+++ b/utils/src/main/java/org/opentripplanner/utils/text/TableRowFormatter.java
@@ -1,9 +1,9 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import java.util.List;
import java.util.function.Function;
-import org.opentripplanner.framework.lang.ObjectUtils;
-import org.opentripplanner.framework.lang.StringUtils;
+import org.opentripplanner.utils.lang.ObjectUtils;
+import org.opentripplanner.utils.lang.StringUtils;
class TableRowFormatter {
diff --git a/application/src/main/java/org/opentripplanner/framework/time/CountdownTimer.java b/utils/src/main/java/org/opentripplanner/utils/time/CountdownTimer.java
similarity index 97%
rename from application/src/main/java/org/opentripplanner/framework/time/CountdownTimer.java
rename to utils/src/main/java/org/opentripplanner/utils/time/CountdownTimer.java
index 5d6d89147a8..674e512c535 100644
--- a/application/src/main/java/org/opentripplanner/framework/time/CountdownTimer.java
+++ b/utils/src/main/java/org/opentripplanner/utils/time/CountdownTimer.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import java.time.Duration;
import java.util.function.LongSupplier;
diff --git a/application/src/main/java/org/opentripplanner/framework/time/DateUtils.java b/utils/src/main/java/org/opentripplanner/utils/time/DateUtils.java
similarity index 85%
rename from application/src/main/java/org/opentripplanner/framework/time/DateUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/time/DateUtils.java
index 36f62fb0448..e773b4e89ea 100644
--- a/application/src/main/java/org/opentripplanner/framework/time/DateUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/time/DateUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import java.time.Duration;
import java.time.Instant;
@@ -11,16 +11,12 @@
import java.time.format.DateTimeParseException;
import java.util.List;
import javax.annotation.Nullable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* @author Frank Purcell (p u r c e l l f @ t r i m e t . o r g) October 20, 2009
*/
public class DateUtils {
- private static final Logger LOG = LoggerFactory.getLogger(DateUtils.class);
-
private static final int SANITY_CHECK_CUTOFF_YEAR = 1000;
// NOTE: don't change the order of these strings...the simplest should be on the
@@ -53,9 +49,6 @@ public class DateUtils {
*/
@Nullable
public static ZonedDateTime toZonedDateTime(String date, String time, ZoneId tz) {
- //LOG.debug("JVM default timezone is {}", TimeZone.getDefault());
- LOG.debug("Parsing date {} and time {}", date, time);
- LOG.debug("using timezone {}", tz);
ZonedDateTime retVal = ZonedDateTime.ofInstant(Instant.now(), tz);
if (date != null) {
LocalDate localDate = parseDate(date);
@@ -80,7 +73,6 @@ public static ZonedDateTime toZonedDateTime(String date, String time, ZoneId tz)
retVal = LocalDateTime.of(retVal.toLocalDate(), localTime).atZone(tz);
}
}
- LOG.debug("resulting date is {}", retVal);
return retVal;
}
@@ -138,30 +130,6 @@ public static int getIntegerFromString(String input) {
}
}
- /**
- * Converts the given time in seconds to a String
in the format h:mm.
- *
- * @param seconds the time in seconds.
- * @return a String
representing the time in the format h:mm
- */
- public static String secToHHMM(int seconds) {
- int min;
- String sign = "";
-
- if (seconds >= 0) {
- min = seconds / 60;
- sign = "";
- } else {
- min = -seconds / 60;
- sign = "-";
- }
-
- int mm = min % 60;
- int hh = min / 60;
-
- return String.format("%s%d:%02d", sign, hh, mm);
- }
-
public static String trim(String str) {
String retVal = str;
try {
@@ -227,11 +195,9 @@ public static LocalTime parseTime(String time) {
if (hms.length > 2) {
sec = Integer.parseInt(trim(hms[2]));
}
-
return LocalTime.of(hour, min, sec);
- } catch (Exception ignore) {
- LOG.info("Time '{}' didn't parse", time);
- return null;
+ } catch (Exception e) {
+ throw new RuntimeException("Could not parse time: " + time, e);
}
}
}
diff --git a/application/src/main/java/org/opentripplanner/framework/time/DurationUtils.java b/utils/src/main/java/org/opentripplanner/utils/time/DurationUtils.java
similarity index 99%
rename from application/src/main/java/org/opentripplanner/framework/time/DurationUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/time/DurationUtils.java
index 362fe17410e..d73faecee03 100644
--- a/application/src/main/java/org/opentripplanner/framework/time/DurationUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/time/DurationUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import static java.util.Locale.ROOT;
diff --git a/application/src/main/java/org/opentripplanner/framework/time/LocalDateUtils.java b/utils/src/main/java/org/opentripplanner/utils/time/LocalDateUtils.java
similarity index 95%
rename from application/src/main/java/org/opentripplanner/framework/time/LocalDateUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/time/LocalDateUtils.java
index dd11065bb12..6b5bf1f8f2f 100644
--- a/application/src/main/java/org/opentripplanner/framework/time/LocalDateUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/time/LocalDateUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import java.time.LocalDate;
import java.time.Period;
diff --git a/application/src/main/java/org/opentripplanner/framework/time/OffsetDateTimeParser.java b/utils/src/main/java/org/opentripplanner/utils/time/OffsetDateTimeParser.java
similarity index 97%
rename from application/src/main/java/org/opentripplanner/framework/time/OffsetDateTimeParser.java
rename to utils/src/main/java/org/opentripplanner/utils/time/OffsetDateTimeParser.java
index 8b40697977a..1bf33c2959f 100644
--- a/application/src/main/java/org/opentripplanner/framework/time/OffsetDateTimeParser.java
+++ b/utils/src/main/java/org/opentripplanner/utils/time/OffsetDateTimeParser.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import java.text.ParseException;
import java.time.OffsetDateTime;
diff --git a/application/src/main/java/org/opentripplanner/framework/time/RelativeTime.java b/utils/src/main/java/org/opentripplanner/utils/time/RelativeTime.java
similarity index 98%
rename from application/src/main/java/org/opentripplanner/framework/time/RelativeTime.java
rename to utils/src/main/java/org/opentripplanner/utils/time/RelativeTime.java
index b01486f8d7f..b4b13a7c68b 100644
--- a/application/src/main/java/org/opentripplanner/framework/time/RelativeTime.java
+++ b/utils/src/main/java/org/opentripplanner/utils/time/RelativeTime.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import java.time.LocalDate;
import java.time.LocalTime;
diff --git a/application/src/main/java/org/opentripplanner/framework/time/ServiceDateUtils.java b/utils/src/main/java/org/opentripplanner/utils/time/ServiceDateUtils.java
similarity index 99%
rename from application/src/main/java/org/opentripplanner/framework/time/ServiceDateUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/time/ServiceDateUtils.java
index a2652015155..e8243ec6355 100644
--- a/application/src/main/java/org/opentripplanner/framework/time/ServiceDateUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/time/ServiceDateUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import java.text.ParseException;
import java.time.Duration;
diff --git a/application/src/main/java/org/opentripplanner/framework/time/TimeUtils.java b/utils/src/main/java/org/opentripplanner/utils/time/TimeUtils.java
similarity index 99%
rename from application/src/main/java/org/opentripplanner/framework/time/TimeUtils.java
rename to utils/src/main/java/org/opentripplanner/utils/time/TimeUtils.java
index f2d2cf5de41..2c1bde17f1b 100644
--- a/application/src/main/java/org/opentripplanner/framework/time/TimeUtils.java
+++ b/utils/src/main/java/org/opentripplanner/utils/time/TimeUtils.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import java.security.SecureRandom;
import java.time.Duration;
diff --git a/application/src/main/java/org/opentripplanner/framework/tostring/MultiLineToStringBuilder.java b/utils/src/main/java/org/opentripplanner/utils/tostring/MultiLineToStringBuilder.java
similarity index 96%
rename from application/src/main/java/org/opentripplanner/framework/tostring/MultiLineToStringBuilder.java
rename to utils/src/main/java/org/opentripplanner/utils/tostring/MultiLineToStringBuilder.java
index 32f5762843a..a3d794aef63 100644
--- a/application/src/main/java/org/opentripplanner/framework/tostring/MultiLineToStringBuilder.java
+++ b/utils/src/main/java/org/opentripplanner/utils/tostring/MultiLineToStringBuilder.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.tostring;
+package org.opentripplanner.utils.tostring;
import java.time.Duration;
import java.util.ArrayList;
@@ -8,7 +8,7 @@
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
-import org.opentripplanner.framework.time.DurationUtils;
+import org.opentripplanner.utils.time.DurationUtils;
/**
* When debug logging it is much more readable if the logging is nicely formatted with line-breaks.
diff --git a/application/src/main/java/org/opentripplanner/framework/tostring/ToStringBuilder.java b/utils/src/main/java/org/opentripplanner/utils/tostring/ToStringBuilder.java
similarity index 97%
rename from application/src/main/java/org/opentripplanner/framework/tostring/ToStringBuilder.java
rename to utils/src/main/java/org/opentripplanner/utils/tostring/ToStringBuilder.java
index f600a2a31bc..de40951ff75 100644
--- a/application/src/main/java/org/opentripplanner/framework/tostring/ToStringBuilder.java
+++ b/utils/src/main/java/org/opentripplanner/utils/tostring/ToStringBuilder.java
@@ -1,7 +1,7 @@
-package org.opentripplanner.framework.tostring;
+package org.opentripplanner.utils.tostring;
import static java.lang.Boolean.TRUE;
-import static org.opentripplanner.framework.time.DurationUtils.durationToStr;
+import static org.opentripplanner.utils.time.DurationUtils.durationToStr;
import java.time.Duration;
import java.time.Instant;
@@ -16,10 +16,10 @@
import java.util.function.Supplier;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
-import org.opentripplanner.framework.lang.ObjectUtils;
-import org.opentripplanner.framework.lang.OtpNumberFormat;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.lang.ObjectUtils;
+import org.opentripplanner.utils.lang.OtpNumberFormat;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* This toString builder which add elements to a compact string of the form:
diff --git a/application/src/main/java/org/opentripplanner/framework/tostring/ValueObjectToStringBuilder.java b/utils/src/main/java/org/opentripplanner/utils/tostring/ValueObjectToStringBuilder.java
similarity index 96%
rename from application/src/main/java/org/opentripplanner/framework/tostring/ValueObjectToStringBuilder.java
rename to utils/src/main/java/org/opentripplanner/utils/tostring/ValueObjectToStringBuilder.java
index 14584a8dd4a..e80323ee0fb 100644
--- a/application/src/main/java/org/opentripplanner/framework/tostring/ValueObjectToStringBuilder.java
+++ b/utils/src/main/java/org/opentripplanner/utils/tostring/ValueObjectToStringBuilder.java
@@ -1,11 +1,11 @@
-package org.opentripplanner.framework.tostring;
+package org.opentripplanner.utils.tostring;
import java.time.Duration;
import java.time.Instant;
import java.util.function.Function;
-import org.opentripplanner.framework.lang.OtpNumberFormat;
-import org.opentripplanner.framework.time.DurationUtils;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.lang.OtpNumberFormat;
+import org.opentripplanner.utils.time.DurationUtils;
+import org.opentripplanner.utils.time.TimeUtils;
/**
* Use this to-string-builder to build value objects. A [ValueObject](http://wiki.c2.com/?ValueObject)
diff --git a/application/src/test/java/org/opentripplanner/framework/collection/CollectionUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/collection/CollectionUtilsTest.java
similarity index 96%
rename from application/src/test/java/org/opentripplanner/framework/collection/CollectionUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/collection/CollectionUtilsTest.java
index 6686ac8e0d9..a79f91e3464 100644
--- a/application/src/test/java/org/opentripplanner/framework/collection/CollectionUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/collection/CollectionUtilsTest.java
@@ -1,11 +1,11 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import com.google.type.Month;
import java.time.Duration;
+import java.time.Month;
import java.util.ArrayList;
import java.util.Collection;
import java.util.EnumSet;
diff --git a/application/src/test/java/org/opentripplanner/framework/collection/CollectionsViewTest.java b/utils/src/test/java/org/opentripplanner/utils/collection/CollectionsViewTest.java
similarity index 97%
rename from application/src/test/java/org/opentripplanner/framework/collection/CollectionsViewTest.java
rename to utils/src/test/java/org/opentripplanner/utils/collection/CollectionsViewTest.java
index 4196ff98e08..191540f3876 100644
--- a/application/src/test/java/org/opentripplanner/framework/collection/CollectionsViewTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/collection/CollectionsViewTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
diff --git a/application/src/test/java/org/opentripplanner/framework/collection/CompositeComparatorTest.java b/utils/src/test/java/org/opentripplanner/utils/collection/CompositeComparatorTest.java
similarity index 94%
rename from application/src/test/java/org/opentripplanner/framework/collection/CompositeComparatorTest.java
rename to utils/src/test/java/org/opentripplanner/utils/collection/CompositeComparatorTest.java
index 5329683d336..03dbb7d1c71 100644
--- a/application/src/test/java/org/opentripplanner/framework/collection/CompositeComparatorTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/collection/CompositeComparatorTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/application/src/test/java/org/opentripplanner/framework/collection/ListSectionTest.java b/utils/src/test/java/org/opentripplanner/utils/collection/ListSectionTest.java
similarity index 91%
rename from application/src/test/java/org/opentripplanner/framework/collection/ListSectionTest.java
rename to utils/src/test/java/org/opentripplanner/utils/collection/ListSectionTest.java
index 199804e4881..01ce5a2d336 100644
--- a/application/src/test/java/org/opentripplanner/framework/collection/ListSectionTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/collection/ListSectionTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
diff --git a/application/src/test/java/org/opentripplanner/framework/collection/ListUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/collection/ListUtilsTest.java
similarity index 90%
rename from application/src/test/java/org/opentripplanner/framework/collection/ListUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/collection/ListUtilsTest.java
index 33dce1f5574..602182a64b4 100644
--- a/application/src/test/java/org/opentripplanner/framework/collection/ListUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/collection/ListUtilsTest.java
@@ -1,9 +1,9 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.opentripplanner.framework.collection.ListUtils.first;
-import static org.opentripplanner.framework.collection.ListUtils.last;
+import static org.opentripplanner.utils.collection.ListUtils.first;
+import static org.opentripplanner.utils.collection.ListUtils.last;
import java.util.List;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/framework/collection/MapUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/collection/MapUtilsTest.java
similarity index 91%
rename from application/src/test/java/org/opentripplanner/framework/collection/MapUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/collection/MapUtilsTest.java
index 047a8e61d6b..100e56fec03 100644
--- a/application/src/test/java/org/opentripplanner/framework/collection/MapUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/collection/MapUtilsTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import static java.util.Collections.singleton;
import static java.util.Collections.singletonList;
@@ -6,7 +6,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.opentripplanner.framework.collection.MapUtils.mapToList;
+import static org.opentripplanner.utils.collection.MapUtils.mapToList;
import java.util.Collections;
import java.util.Map;
diff --git a/application/src/test/java/org/opentripplanner/framework/collection/SetUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/collection/SetUtilsTest.java
similarity index 86%
rename from application/src/test/java/org/opentripplanner/framework/collection/SetUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/collection/SetUtilsTest.java
index 8e55e27e79b..e1c8d84eca3 100644
--- a/application/src/test/java/org/opentripplanner/framework/collection/SetUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/collection/SetUtilsTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.collection;
+package org.opentripplanner.utils.collection;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/ArrayUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/ArrayUtilsTest.java
similarity index 75%
rename from application/src/test/java/org/opentripplanner/framework/lang/ArrayUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/ArrayUtilsTest.java
index 8933555e75c..9d512af5770 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/ArrayUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/ArrayUtilsTest.java
@@ -1,8 +1,8 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.opentripplanner.framework.lang.ArrayUtils.hasContent;
+import static org.opentripplanner.utils.lang.ArrayUtils.hasContent;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/BitSetUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/BitSetUtilsTest.java
similarity index 97%
rename from application/src/test/java/org/opentripplanner/framework/lang/BitSetUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/BitSetUtilsTest.java
index 83da400f69c..6327da849b4 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/BitSetUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/BitSetUtilsTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/BoxTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/BoxTest.java
similarity index 96%
rename from application/src/test/java/org/opentripplanner/framework/lang/BoxTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/BoxTest.java
index 7e072fd2f5a..b9f9218fe07 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/BoxTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/BoxTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/DoubleUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/DoubleUtilsTest.java
similarity index 83%
rename from application/src/test/java/org/opentripplanner/framework/lang/DoubleUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/DoubleUtilsTest.java
index cb3b0e8b1d6..415b5e939b9 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/DoubleUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/DoubleUtilsTest.java
@@ -1,15 +1,15 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.opentripplanner.framework.lang.DoubleUtils.requireInRange;
-import static org.opentripplanner.framework.lang.DoubleUtils.roundTo1Decimal;
-import static org.opentripplanner.framework.lang.DoubleUtils.roundTo2Decimals;
-import static org.opentripplanner.framework.lang.DoubleUtils.roundTo3Decimals;
-import static org.opentripplanner.framework.lang.DoubleUtils.roundTo4Decimals;
-import static org.opentripplanner.framework.lang.DoubleUtils.roundToZeroDecimals;
+import static org.opentripplanner.utils.lang.DoubleUtils.requireInRange;
+import static org.opentripplanner.utils.lang.DoubleUtils.roundTo1Decimal;
+import static org.opentripplanner.utils.lang.DoubleUtils.roundTo2Decimals;
+import static org.opentripplanner.utils.lang.DoubleUtils.roundTo3Decimals;
+import static org.opentripplanner.utils.lang.DoubleUtils.roundTo4Decimals;
+import static org.opentripplanner.utils.lang.DoubleUtils.roundToZeroDecimals;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/IntBoxTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/IntBoxTest.java
similarity index 96%
rename from application/src/test/java/org/opentripplanner/framework/lang/IntBoxTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/IntBoxTest.java
index d2151b4bea7..1dea3cb7d79 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/IntBoxTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/IntBoxTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/IntRangeTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/IntRangeTest.java
similarity index 98%
rename from application/src/test/java/org/opentripplanner/framework/lang/IntRangeTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/IntRangeTest.java
index da6300b3953..f568cd5df36 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/IntRangeTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/IntRangeTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/IntUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/IntUtilsTest.java
similarity index 84%
rename from application/src/test/java/org/opentripplanner/framework/lang/IntUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/IntUtilsTest.java
index 3d5c92c9258..99b32f47f0a 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/IntUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/IntUtilsTest.java
@@ -1,18 +1,18 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.opentripplanner.framework.lang.IntUtils.concat;
-import static org.opentripplanner.framework.lang.IntUtils.intArray;
-import static org.opentripplanner.framework.lang.IntUtils.intArrayToString;
-import static org.opentripplanner.framework.lang.IntUtils.intToString;
-import static org.opentripplanner.framework.lang.IntUtils.requireInRange;
-import static org.opentripplanner.framework.lang.IntUtils.requireNotNegative;
-import static org.opentripplanner.framework.lang.IntUtils.requireNullOrNotNegative;
-import static org.opentripplanner.framework.lang.IntUtils.shiftArray;
-import static org.opentripplanner.framework.lang.IntUtils.standardDeviation;
+import static org.opentripplanner.utils.lang.IntUtils.concat;
+import static org.opentripplanner.utils.lang.IntUtils.intArray;
+import static org.opentripplanner.utils.lang.IntUtils.intArrayToString;
+import static org.opentripplanner.utils.lang.IntUtils.intToString;
+import static org.opentripplanner.utils.lang.IntUtils.requireInRange;
+import static org.opentripplanner.utils.lang.IntUtils.requireNotNegative;
+import static org.opentripplanner.utils.lang.IntUtils.requireNullOrNotNegative;
+import static org.opentripplanner.utils.lang.IntUtils.shiftArray;
+import static org.opentripplanner.utils.lang.IntUtils.standardDeviation;
import java.util.List;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/MemEfficientArrayBuilderTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/MemEfficientArrayBuilderTest.java
similarity index 98%
rename from application/src/test/java/org/opentripplanner/framework/lang/MemEfficientArrayBuilderTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/MemEfficientArrayBuilderTest.java
index 16468868fe7..99297b29f1d 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/MemEfficientArrayBuilderTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/MemEfficientArrayBuilderTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static java.time.DayOfWeek.MONDAY;
import static java.time.DayOfWeek.SATURDAY;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/ObjectUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/ObjectUtilsTest.java
similarity index 98%
rename from application/src/test/java/org/opentripplanner/framework/lang/ObjectUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/ObjectUtilsTest.java
index 274fb3e8700..3f6283543fc 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/ObjectUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/ObjectUtilsTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/OtpNumberFormatTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/OtpNumberFormatTest.java
similarity index 96%
rename from application/src/test/java/org/opentripplanner/framework/lang/OtpNumberFormatTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/OtpNumberFormatTest.java
index af5d28af94b..b8cfe684692 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/OtpNumberFormatTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/OtpNumberFormatTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/application/src/test/java/org/opentripplanner/framework/lang/StringUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/lang/StringUtilsTest.java
similarity index 98%
rename from application/src/test/java/org/opentripplanner/framework/lang/StringUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/lang/StringUtilsTest.java
index 0e67344b2bb..7e8f0a6217b 100644
--- a/application/src/test/java/org/opentripplanner/framework/lang/StringUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/lang/StringUtilsTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.lang;
+package org.opentripplanner.utils.lang;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
diff --git a/application/src/test/java/org/opentripplanner/framework/logging/ProgressTrackerTest.java b/utils/src/test/java/org/opentripplanner/utils/logging/ProgressTrackerTest.java
similarity index 97%
rename from application/src/test/java/org/opentripplanner/framework/logging/ProgressTrackerTest.java
rename to utils/src/test/java/org/opentripplanner/utils/logging/ProgressTrackerTest.java
index fbbc7b9a7a6..c297aac136f 100644
--- a/application/src/test/java/org/opentripplanner/framework/logging/ProgressTrackerTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/logging/ProgressTrackerTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.logging;
+package org.opentripplanner.utils.logging;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
diff --git a/application/src/test/java/org/opentripplanner/framework/logging/ThrottleTest.java b/utils/src/test/java/org/opentripplanner/utils/logging/ThrottleTest.java
similarity index 97%
rename from application/src/test/java/org/opentripplanner/framework/logging/ThrottleTest.java
rename to utils/src/test/java/org/opentripplanner/utils/logging/ThrottleTest.java
index c9155992daa..eec907588c6 100644
--- a/application/src/test/java/org/opentripplanner/framework/logging/ThrottleTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/logging/ThrottleTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.logging;
+package org.opentripplanner.utils.logging;
import java.time.Duration;
import java.util.ArrayList;
diff --git a/application/src/test/java/org/opentripplanner/framework/text/CharacterEscapeFormatterTest.java b/utils/src/test/java/org/opentripplanner/utils/text/CharacterEscapeFormatterTest.java
similarity index 95%
rename from application/src/test/java/org/opentripplanner/framework/text/CharacterEscapeFormatterTest.java
rename to utils/src/test/java/org/opentripplanner/utils/text/CharacterEscapeFormatterTest.java
index b33b06babb6..15dc7139f30 100644
--- a/application/src/test/java/org/opentripplanner/framework/text/CharacterEscapeFormatterTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/text/CharacterEscapeFormatterTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
diff --git a/application/src/test/java/org/opentripplanner/framework/text/FileSizeToTextConverterTest.java b/utils/src/test/java/org/opentripplanner/utils/text/FileSizeToTextConverterTest.java
similarity index 87%
rename from application/src/test/java/org/opentripplanner/framework/text/FileSizeToTextConverterTest.java
rename to utils/src/test/java/org/opentripplanner/utils/text/FileSizeToTextConverterTest.java
index 0d91792423b..b860ff3f09d 100644
--- a/application/src/test/java/org/opentripplanner/framework/text/FileSizeToTextConverterTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/text/FileSizeToTextConverterTest.java
@@ -1,7 +1,7 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.opentripplanner.framework.text.FileSizeToTextConverter.fileSizeToString;
+import static org.opentripplanner.utils.text.FileSizeToTextConverter.fileSizeToString;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/framework/text/HexStringTest.java b/utils/src/test/java/org/opentripplanner/utils/text/HexStringTest.java
similarity index 94%
rename from application/src/test/java/org/opentripplanner/framework/text/HexStringTest.java
rename to utils/src/test/java/org/opentripplanner/utils/text/HexStringTest.java
index 2a565857155..7efc4e3fa61 100644
--- a/application/src/test/java/org/opentripplanner/framework/text/HexStringTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/text/HexStringTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/application/src/test/java/org/opentripplanner/framework/text/MarkdownFormatterTest.java b/utils/src/test/java/org/opentripplanner/utils/text/MarkdownFormatterTest.java
similarity index 96%
rename from application/src/test/java/org/opentripplanner/framework/text/MarkdownFormatterTest.java
rename to utils/src/test/java/org/opentripplanner/utils/text/MarkdownFormatterTest.java
index b31f7fd8a26..602d9e3b6c5 100644
--- a/application/src/test/java/org/opentripplanner/framework/text/MarkdownFormatterTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/text/MarkdownFormatterTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/application/src/test/java/org/opentripplanner/framework/text/TableTest.java b/utils/src/test/java/org/opentripplanner/utils/text/TableTest.java
similarity index 90%
rename from application/src/test/java/org/opentripplanner/framework/text/TableTest.java
rename to utils/src/test/java/org/opentripplanner/utils/text/TableTest.java
index f79a766c80c..98915faebb1 100644
--- a/application/src/test/java/org/opentripplanner/framework/text/TableTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/text/TableTest.java
@@ -1,10 +1,10 @@
-package org.opentripplanner.framework.text;
+package org.opentripplanner.utils.text;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.opentripplanner.framework.text.Table.Align.Center;
-import static org.opentripplanner.framework.text.Table.Align.Left;
-import static org.opentripplanner.framework.text.Table.Align.Right;
+import static org.opentripplanner.utils.text.Table.Align.Center;
+import static org.opentripplanner.utils.text.Table.Align.Left;
+import static org.opentripplanner.utils.text.Table.Align.Right;
import org.junit.jupiter.api.Test;
diff --git a/application/src/test/java/org/opentripplanner/framework/time/CountdownTimerTest.java b/utils/src/test/java/org/opentripplanner/utils/time/CountdownTimerTest.java
similarity index 96%
rename from application/src/test/java/org/opentripplanner/framework/time/CountdownTimerTest.java
rename to utils/src/test/java/org/opentripplanner/utils/time/CountdownTimerTest.java
index 4d5bdd6fe1d..a30be79cbf9 100644
--- a/application/src/test/java/org/opentripplanner/framework/time/CountdownTimerTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/time/CountdownTimerTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
diff --git a/utils/src/test/java/org/opentripplanner/utils/time/DateUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/time/DateUtilsTest.java
new file mode 100644
index 00000000000..75621b8fadb
--- /dev/null
+++ b/utils/src/test/java/org/opentripplanner/utils/time/DateUtilsTest.java
@@ -0,0 +1,24 @@
+package org.opentripplanner.utils.time;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import org.junit.jupiter.api.Test;
+
+public class DateUtilsTest {
+
+ public static final ZoneId UTC = ZoneIds.UTC;
+
+ @Test
+ public final void testToDate() {
+ ZonedDateTime date = DateUtils.toZonedDateTime("1970-01-01", "00:00", UTC);
+ assertEquals("1970-01-01", date.toLocalDate().toString());
+ assertEquals(0, date.toEpochSecond());
+
+ date = DateUtils.toZonedDateTime(null, "00:00", UTC);
+ assertEquals(LocalDate.now(UTC).toString(), date.toLocalDate().toString());
+ assertEquals(0, date.toEpochSecond() % TimeUtils.ONE_DAY_SECONDS);
+ }
+}
diff --git a/application/src/test/java/org/opentripplanner/framework/time/DurationUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/time/DurationUtilsTest.java
similarity index 95%
rename from application/src/test/java/org/opentripplanner/framework/time/DurationUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/time/DurationUtilsTest.java
index de6ac046310..ef2e0f50901 100644
--- a/application/src/test/java/org/opentripplanner/framework/time/DurationUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/time/DurationUtilsTest.java
@@ -1,13 +1,13 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.params.provider.Arguments.of;
-import static org.opentripplanner.framework.time.DurationUtils.requireNonNegative;
-import static org.opentripplanner.framework.time.DurationUtils.requireNonNegativeMax2days;
-import static org.opentripplanner.framework.time.DurationUtils.requireNonNegativeMax2hours;
-import static org.opentripplanner.framework.time.DurationUtils.requireNonNegativeMax30minutes;
-import static org.opentripplanner.framework.time.DurationUtils.toIntMilliseconds;
+import static org.opentripplanner.utils.time.DurationUtils.requireNonNegative;
+import static org.opentripplanner.utils.time.DurationUtils.requireNonNegativeMax2days;
+import static org.opentripplanner.utils.time.DurationUtils.requireNonNegativeMax2hours;
+import static org.opentripplanner.utils.time.DurationUtils.requireNonNegativeMax30minutes;
+import static org.opentripplanner.utils.time.DurationUtils.toIntMilliseconds;
import java.time.Duration;
import java.time.format.DateTimeParseException;
diff --git a/application/src/test/java/org/opentripplanner/framework/time/LocalDateUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/time/LocalDateUtilsTest.java
similarity index 94%
rename from application/src/test/java/org/opentripplanner/framework/time/LocalDateUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/time/LocalDateUtilsTest.java
index fa6a25ab3d7..4a0ae7e37d9 100644
--- a/application/src/test/java/org/opentripplanner/framework/time/LocalDateUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/time/LocalDateUtilsTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/application/src/test/java/org/opentripplanner/framework/time/OffsetDateTimeParserTest.java b/utils/src/test/java/org/opentripplanner/utils/time/OffsetDateTimeParserTest.java
similarity index 96%
rename from application/src/test/java/org/opentripplanner/framework/time/OffsetDateTimeParserTest.java
rename to utils/src/test/java/org/opentripplanner/utils/time/OffsetDateTimeParserTest.java
index d8944b9a5f0..a114cc96788 100644
--- a/application/src/test/java/org/opentripplanner/framework/time/OffsetDateTimeParserTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/time/OffsetDateTimeParserTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import static org.junit.jupiter.api.Assertions.assertTrue;
diff --git a/application/src/test/java/org/opentripplanner/framework/time/ServiceDateUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/time/ServiceDateUtilsTest.java
similarity index 97%
rename from application/src/test/java/org/opentripplanner/framework/time/ServiceDateUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/time/ServiceDateUtilsTest.java
index 4c22b414537..028b53b064a 100644
--- a/application/src/test/java/org/opentripplanner/framework/time/ServiceDateUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/time/ServiceDateUtilsTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -6,7 +6,7 @@
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.opentripplanner.framework.time.ServiceDateUtils.asStartOfService;
+import static org.opentripplanner.utils.time.ServiceDateUtils.asStartOfService;
import java.text.ParseException;
import java.time.Duration;
@@ -17,7 +17,6 @@
import java.time.ZoneId;
import java.time.ZonedDateTime;
import org.junit.jupiter.api.Test;
-import org.opentripplanner._support.time.ZoneIds;
public class ServiceDateUtilsTest {
diff --git a/application/src/test/java/org/opentripplanner/framework/time/TimeUtilsTest.java b/utils/src/test/java/org/opentripplanner/utils/time/TimeUtilsTest.java
similarity index 98%
rename from application/src/test/java/org/opentripplanner/framework/time/TimeUtilsTest.java
rename to utils/src/test/java/org/opentripplanner/utils/time/TimeUtilsTest.java
index c2eb828cc21..d5c0e519742 100644
--- a/application/src/test/java/org/opentripplanner/framework/time/TimeUtilsTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/time/TimeUtilsTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.time;
+package org.opentripplanner.utils.time;
import static java.time.ZoneOffset.UTC;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -11,7 +11,6 @@
import java.time.ZonedDateTime;
import java.util.Arrays;
import org.junit.jupiter.api.Test;
-import org.opentripplanner._support.time.ZoneIds;
public class TimeUtilsTest {
diff --git a/utils/src/test/java/org/opentripplanner/utils/time/ZoneIds.java b/utils/src/test/java/org/opentripplanner/utils/time/ZoneIds.java
new file mode 100644
index 00000000000..0e3244dcd36
--- /dev/null
+++ b/utils/src/test/java/org/opentripplanner/utils/time/ZoneIds.java
@@ -0,0 +1,11 @@
+package org.opentripplanner.utils.time;
+
+import java.time.ZoneId;
+
+public class ZoneIds {
+
+ public static final ZoneId UTC = ZoneId.of("UTC");
+ public static final ZoneId CET = ZoneId.of("CET");
+ public static final ZoneId OSLO = ZoneId.of("Europe/Oslo");
+ public static final ZoneId PARIS = ZoneId.of("Europe/Paris");
+}
diff --git a/application/src/test/java/org/opentripplanner/framework/tostring/MultiLineToStringBuilderTest.java b/utils/src/test/java/org/opentripplanner/utils/tostring/MultiLineToStringBuilderTest.java
similarity index 96%
rename from application/src/test/java/org/opentripplanner/framework/tostring/MultiLineToStringBuilderTest.java
rename to utils/src/test/java/org/opentripplanner/utils/tostring/MultiLineToStringBuilderTest.java
index 495a8649cef..55b43517e18 100644
--- a/application/src/test/java/org/opentripplanner/framework/tostring/MultiLineToStringBuilderTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/tostring/MultiLineToStringBuilderTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.tostring;
+package org.opentripplanner.utils.tostring;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/application/src/test/java/org/opentripplanner/framework/tostring/ToStringBuilderTest.java b/utils/src/test/java/org/opentripplanner/utils/tostring/ToStringBuilderTest.java
similarity index 98%
rename from application/src/test/java/org/opentripplanner/framework/tostring/ToStringBuilderTest.java
rename to utils/src/test/java/org/opentripplanner/utils/tostring/ToStringBuilderTest.java
index 90254c321a1..477f48e7c63 100644
--- a/application/src/test/java/org/opentripplanner/framework/tostring/ToStringBuilderTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/tostring/ToStringBuilderTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.tostring;
+package org.opentripplanner.utils.tostring;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -13,8 +13,8 @@
import java.util.Objects;
import java.util.function.Function;
import org.junit.jupiter.api.Test;
-import org.opentripplanner._support.time.ZoneIds;
-import org.opentripplanner.framework.time.TimeUtils;
+import org.opentripplanner.utils.time.TimeUtils;
+import org.opentripplanner.utils.time.ZoneIds;
public class ToStringBuilderTest {
diff --git a/application/src/test/java/org/opentripplanner/framework/tostring/ValueObjectToStringBuilderTest.java b/utils/src/test/java/org/opentripplanner/utils/tostring/ValueObjectToStringBuilderTest.java
similarity index 99%
rename from application/src/test/java/org/opentripplanner/framework/tostring/ValueObjectToStringBuilderTest.java
rename to utils/src/test/java/org/opentripplanner/utils/tostring/ValueObjectToStringBuilderTest.java
index a59a0bf9b90..01a9beac141 100644
--- a/application/src/test/java/org/opentripplanner/framework/tostring/ValueObjectToStringBuilderTest.java
+++ b/utils/src/test/java/org/opentripplanner/utils/tostring/ValueObjectToStringBuilderTest.java
@@ -1,4 +1,4 @@
-package org.opentripplanner.framework.tostring;
+package org.opentripplanner.utils.tostring;
import static org.junit.jupiter.api.Assertions.assertEquals;