Skip to content

Commit

Permalink
Removing unused OperatingDayCalculator
Browse files Browse the repository at this point in the history
  • Loading branch information
mansoor-sajjad committed Nov 25, 2024
1 parent 7ad5246 commit a68967b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 211 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
import no.entur.antu.validation.validator.servicejourney.passingtime.NonIncreasingPassingTimeValidator;
import no.entur.antu.validation.validator.servicejourney.servicealteration.InvalidServiceAlterationValidator;
import no.entur.antu.validation.validator.servicejourney.servicealteration.MissingReplacementValidator;
import no.entur.antu.validation.validator.servicejourney.speed.UnexpectedSpeedValidator;
import no.entur.antu.validation.validator.servicelink.distance.UnexpectedDistanceInServiceLinkValidator;
import no.entur.antu.validation.validator.servicelink.stoppoints.MismatchedStopPointsValidator;
import no.entur.antu.validation.validator.servicejourney.speed.UnexpectedSpeedValidator;
import no.entur.antu.validation.validator.xpath.EnturTimetableDataValidationTreeFactory;
import org.entur.netex.validation.validator.DatasetValidator;
import org.entur.netex.validation.validator.NetexValidatorsRunner;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ public Map<ServiceJourneyId, List<DayTypeId>> serviceJourneyDayTypes(
Collectors.toMap(
entry -> ServiceJourneyId.ofValidId(entry.getKey()),
entry ->
Stream
.of(entry.getValue().split(","))
.map(DayTypeId::new)
.toList(),
Stream.of(entry.getValue().split(",")).map(DayTypeId::new).toList(),
(p, n) -> n
)
);
Expand Down
75 changes: 0 additions & 75 deletions src/main/java/no/entur/antu/validation/OperatingDayCalculator.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,16 @@ private List<LocalDate> activeDatesForServiceJourney(
)
.orElse(List.of());


List<LocalDate> activeDateOfDatedServiceJourneys = Optional
.ofNullable(serviceJourneyId)
.map(serviceJourneyOperatingDaysMap::get)
.map(dayTypeIds ->
dayTypeIds
.stream()
.map(activeDatesMap::get)
.map(ActiveDates::dates)
.flatMap(List::stream)
.toList()
dayTypeIds
.stream()
.map(activeDatesMap::get)
.map(ActiveDates::dates)
.flatMap(List::stream)
.toList()
)
.orElse(List.of());

Expand Down
124 changes: 0 additions & 124 deletions src/test/java/no/entur/antu/OperatingDaysCalculatorTest.java

This file was deleted.

0 comments on commit a68967b

Please sign in to comment.