-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OTP-888 Refactor mobilityProfile into its own object
- Loading branch information
1 parent
e91b138
commit b145e75
Showing
4 changed files
with
87 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/org/opentripplanner/middleware/models/MobilityProfile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.opentripplanner.middleware.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.io.Serializable; | ||
import java.util.Collection; | ||
|
||
/** | ||
* Mobility profile data | ||
*/ | ||
public class MobilityProfile implements Serializable { | ||
public enum VisionLimitation { | ||
@JsonProperty("legally blind") LEGALLY_BLIND, | ||
@JsonProperty("low-vision") LOW_VISION, | ||
@JsonProperty("none") NONE | ||
} | ||
|
||
/** Whether the user indicates that their mobility is limited (slower). */ | ||
public boolean isMobilityLimited; | ||
|
||
/** User may indicate zero or more mobility devices. */ | ||
public Collection<String> mobilityDevices; | ||
|
||
/** Compound keyword that controller calculates from mobility and vision values. */ | ||
@JsonIgnore | ||
public String mobilityMode; | ||
|
||
/** User may indicate levels of vision limitation. */ | ||
public VisionLimitation visionLimitation; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters