Skip to content

Conversation

@VikiPeeva
Copy link
Collaborator

  • Added multiple decorator providers as static methods in PlacesProvider
  • The current problem is that the providers sometimes need to be called in a specific order, and this is not something that is restricted by the current implementation
  • Before the pull request is closed, PlaceChooser, PlaceChooserBuilder, and PlaceChooserDecorator should be made obsolete

@VikiPeeva VikiPeeva requested a review from alkuzman October 28, 2025 11:21
@VikiPeeva VikiPeeva self-assigned this Oct 28, 2025

static PlacesProvider onlyForActivities(PlacesProvider baseProvider, Set<String> activities) {
return () -> baseProvider.provide().stream()
.map(new IncludedActivitiesPlaceTransformer(activities))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this filter out transitions from places that are not in the list?


static PlacesProvider noEmptyIOPlaces(PlacesProvider baseProvider) {
return () -> baseProvider.provide().stream()
.filter(new NonSelfLoopPlacePredicate())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the wrong predicate.


static PlacesProvider onlyOccurringInProximity(PlacesProvider baseProvider, int proximity, XLog log) {
return () -> baseProvider.provide().stream()
.map(new PassageUsagePlaceTransformer(LogUtils.getFollowRelations(log, proximity)))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't understand this. Maybe it would be nice if you document what these decorators actually are supposed to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants