WheelchairParameters.java

  1. /*  This file is part of Openrouteservice.
  2.  *
  3.  *  Openrouteservice is free software; you can redistribute it and/or modify it under the terms of the
  4.  *  GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1
  5.  *  of the License, or (at your option) any later version.

  6.  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  7.  *  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8.  *  See the GNU Lesser General Public License for more details.

  9.  *  You should have received a copy of the GNU Lesser General Public License along with this library;
  10.  *  if not, see <https://www.gnu.org/licenses/>.
  11.  */
  12. package org.heigit.ors.routing.parameters;

  13. import java.util.List;

  14. public class WheelchairParameters extends ProfileParameters {
  15.     private float maxIncline = Float.MAX_VALUE * -1.0f;
  16.     private float maxSlopedKerb = -1.0F;
  17.     private int surfaceType;
  18.     private int trackType;
  19.     private int smoothnessType;
  20.     private float minWidth = 0.0f;
  21.     private boolean surfaceQualityKnown = false;
  22.     private boolean allowUnsuitable = false;

  23.     public float getMaximumIncline() {
  24.         return maxIncline;
  25.     }

  26.     public void setMaximumIncline(float maxIncline) {
  27.         this.maxIncline = maxIncline;
  28.     }

  29.     public int getSurfaceType() {
  30.         return surfaceType;
  31.     }

  32.     public void setSurfaceType(int surfaceType) {
  33.         this.surfaceType = surfaceType;
  34.     }

  35.     public float getMaximumSlopedKerb() {
  36.         return maxSlopedKerb;
  37.     }

  38.     public void setMaximumSlopedKerb(float maxSlopedKerb) {
  39.         this.maxSlopedKerb = maxSlopedKerb;
  40.     }

  41.     public int getTrackType() {
  42.         return trackType;
  43.     }

  44.     public void setTrackType(int trackType) {
  45.         this.trackType = trackType;
  46.     }

  47.     public int getSmoothnessType() {
  48.         return smoothnessType;
  49.     }

  50.     public void setSmoothnessType(int smoothnessType) {
  51.         this.smoothnessType = smoothnessType;
  52.     }

  53.     public float getMinimumWidth() {
  54.         return minWidth;
  55.     }

  56.     public void setMinimumWidth(float width) {
  57.         minWidth = width;
  58.     }

  59.     public boolean isRequireSurfaceQualityKnown() {
  60.         return surfaceQualityKnown;
  61.     }

  62.     public void setSurfaceQualityKnown(boolean surfaceQualityKnown) {
  63.         this.surfaceQualityKnown = surfaceQualityKnown;
  64.     }

  65.     public boolean allowUnsuitable() {
  66.         return allowUnsuitable;
  67.     }

  68.     public void setAllowUnsuitable(boolean allowUnsuitable) {
  69.         this.allowUnsuitable = allowUnsuitable;
  70.     }

  71.     @Override
  72.     public List<String> getValidRestrictions() {
  73.         List<String> valid = super.getValidRestrictions();
  74.         valid.add("surface_type");
  75.         valid.add("track_type");
  76.         valid.add("smoothness_type");
  77.         valid.add("maximum_sloped_kerb");
  78.         valid.add("maximum_incline");
  79.         valid.add("minimum_width");
  80.         return valid;
  81.     }
  82. }