├── .dockerignore ├── .gitignore ├── .idea ├── .gitignore ├── .name ├── ClojureProjectResolveSettings.xml ├── codeStyleSettings.xml ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── compiler.xml ├── copyright │ ├── HSL.xml │ └── profiles_settings.xml ├── encodings.xml ├── inspectionProfiles │ ├── Project_Default.xml │ └── profiles_settings.xml ├── libraries │ ├── Maven__aopalliance_aopalliance_1_0.xml │ ├── Maven__asm_asm_3_3_1.xml │ ├── Maven__ch_qos_logback_logback_classic_1_1_3.xml │ ├── Maven__ch_qos_logback_logback_core_1_1_3.xml │ ├── Maven__com_fasterxml_classmate_1_0_0.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_4_5.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_4_5.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_4_5.xml │ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_joda_2_4_5.xml │ ├── Maven__com_google_code_findbugs_annotations_2_0_1.xml │ ├── Maven__com_google_code_findbugs_jsr305_1_3_9.xml │ ├── Maven__com_google_guava_guava_18_0.xml │ ├── Maven__com_googlecode_json_simple_json_simple_1_1_1.xml │ ├── Maven__com_googlecode_libphonenumber_libphonenumber_7_0.xml │ ├── Maven__com_h2database_h2_1_4_181.xml │ ├── Maven__com_infradna_tool_bridge_method_annotation_1_13.xml │ ├── Maven__com_jayway_jsonpath_json_path_2_0_0.xml │ ├── Maven__com_jayway_restassured_json_path_2_4_0.xml │ ├── Maven__com_jayway_restassured_rest_assured_2_4_0.xml │ ├── Maven__com_jayway_restassured_rest_assured_common_2_4_0.xml │ ├── Maven__com_jayway_restassured_xml_path_2_4_0.xml │ ├── Maven__com_mysema_codegen_codegen_0_6_7.xml │ ├── Maven__com_mysema_commons_mysema_commons_lang_0_2_4.xml │ ├── Maven__com_querydsl_querydsl_codegen_4_0_4.xml │ ├── Maven__com_querydsl_querydsl_core_4_0_4.xml │ ├── Maven__com_querydsl_querydsl_spatial_4_0_4.xml │ ├── Maven__com_querydsl_querydsl_sql_4_0_4.xml │ ├── Maven__com_querydsl_querydsl_sql_codegen_4_0_4.xml │ ├── Maven__com_querydsl_querydsl_sql_spatial_4_0_4.xml │ ├── Maven__com_vividsolutions_jts_1_13.xml │ ├── Maven__com_zaxxer_HikariCP_2_0_1.xml │ ├── Maven__commons_codec_commons_codec_1_10.xml │ ├── Maven__javax_el_javax_el_api_2_2_4.xml │ ├── Maven__javax_inject_javax_inject_1.xml │ ├── Maven__javax_servlet_javax_servlet_api_3_1_0.xml │ ├── Maven__javax_validation_validation_api_1_1_0_Final.xml │ ├── Maven__joda_time_joda_time_2_5.xml │ ├── Maven__junit_junit_4_12.xml │ ├── Maven__log4j_log4j_1_2_17.xml │ ├── Maven__net_minidev_asm_1_0_2.xml │ ├── Maven__net_minidev_json_smart_2_1_1.xml │ ├── Maven__nl_jqno_equalsverifier_equalsverifier_1_6.xml │ ├── Maven__org_abego_treelayout_org_abego_treelayout_core_1_0_1.xml │ ├── Maven__org_antlr_antlr4_runtime_4_5.xml │ ├── Maven__org_apache_commons_commons_compress_1_9.xml │ ├── Maven__org_apache_commons_commons_lang3_3_3_2.xml │ ├── Maven__org_apache_httpcomponents_httpclient_4_3_6.xml │ ├── Maven__org_apache_httpcomponents_httpcore_4_3_3.xml │ ├── Maven__org_apache_httpcomponents_httpmime_4_3_6.xml │ ├── Maven__org_apache_poi_poi_3_12.xml │ ├── Maven__org_apache_poi_poi_ooxml_3_12.xml │ ├── Maven__org_apache_poi_poi_ooxml_schemas_3_12.xml │ ├── Maven__org_apache_servicemix_bundles_org_apache_servicemix_bundles_javax_inject_1_2.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_core_8_0_28.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_el_8_0_28.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_logging_juli_8_0_28.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_0_28.xml │ ├── Maven__org_apache_xmlbeans_xmlbeans_2_6_0.xml │ ├── Maven__org_assertj_assertj_core_3_2_0.xml │ ├── Maven__org_ccil_cowan_tagsoup_tagsoup_1_2_1.xml │ ├── Maven__org_codehaus_groovy_groovy_2_4_4.xml │ ├── Maven__org_codehaus_groovy_groovy_json_2_4_4.xml │ ├── Maven__org_codehaus_groovy_groovy_xml_2_4_4.xml │ ├── Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml │ ├── Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml │ ├── Maven__org_eclipse_jdt_core_compiler_ecj_4_3_1.xml │ ├── Maven__org_flywaydb_flyway_core_3_0.xml │ ├── Maven__org_geolatte_geolatte_common_0_7_1.xml │ ├── Maven__org_geolatte_geolatte_geom_0_14.xml │ ├── Maven__org_glassfish_web_javax_el_2_2_4.xml │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml │ ├── Maven__org_hamcrest_hamcrest_library_1_3.xml │ ├── Maven__org_hibernate_hibernate_validator_5_1_2_Final.xml │ ├── Maven__org_hibernate_hibernate_validator_cdi_5_1_2_Final.xml │ ├── Maven__org_jasypt_jasypt_1_9_2.xml │ ├── Maven__org_javassist_javassist_3_18_1_GA.xml │ ├── Maven__org_jboss_logging_jboss_logging_3_1_3_GA.xml │ ├── Maven__org_jgrapht_jgrapht_core_0_9_0.xml │ ├── Maven__org_mockito_mockito_core_1_10_19.xml │ ├── Maven__org_objenesis_objenesis_2_1.xml │ ├── Maven__org_orbisgis_cts_1_3_3.xml │ ├── Maven__org_orbisgis_h2drivers_1_2_0.xml │ ├── Maven__org_orbisgis_h2network_1_2_0.xml │ ├── Maven__org_orbisgis_h2spatial_1_2_0.xml │ ├── Maven__org_orbisgis_h2spatial_api_1_2_0.xml │ ├── Maven__org_orbisgis_h2spatial_ext_1_2_0.xml │ ├── Maven__org_orbisgis_java_network_analyzer_0_1_6.xml │ ├── Maven__org_orbisgis_jdelaunay_0_5_3.xml │ ├── Maven__org_orbisgis_spatial_utilities_1_2_0.xml │ ├── Maven__org_postgis_postgis_jdbc_1_3_3.xml │ ├── Maven__org_postgis_postgis_stubs_1_3_3.xml │ ├── Maven__org_postgresql_postgresql_9_3_1102_jdbc41.xml │ ├── Maven__org_reflections_reflections_0_9_9.xml │ ├── Maven__org_slf4j_jcl_over_slf4j_1_7_12.xml │ ├── Maven__org_slf4j_jul_to_slf4j_1_7_12.xml │ ├── Maven__org_slf4j_log4j_over_slf4j_1_7_12.xml │ ├── Maven__org_slf4j_slf4j_api_1_7_12.xml │ ├── Maven__org_springframework_boot_spring_boot_1_2_7_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_actuator_1_2_7_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_autoconfigure_1_2_7_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_1_2_7_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_actuator_1_2_7_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_logging_1_2_7_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_test_1_2_7_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_tomcat_1_2_7_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_web_1_2_7_RELEASE.xml │ ├── Maven__org_springframework_data_spring_data_commons_1_9_4_RELEASE.xml │ ├── Maven__org_springframework_restdocs_spring_restdocs_core_1_1_0_RELEASE.xml │ ├── Maven__org_springframework_restdocs_spring_restdocs_mockmvc_1_1_0_RELEASE.xml │ ├── Maven__org_springframework_spring_aop_4_1_8_RELEASE.xml │ ├── Maven__org_springframework_spring_beans_4_1_8_RELEASE.xml │ ├── Maven__org_springframework_spring_context_4_1_8_RELEASE.xml │ ├── Maven__org_springframework_spring_core_4_1_8_RELEASE.xml │ ├── Maven__org_springframework_spring_expression_4_1_8_RELEASE.xml │ ├── Maven__org_springframework_spring_jdbc_4_1_8_RELEASE.xml │ ├── Maven__org_springframework_spring_test_4_1_8_RELEASE.xml │ ├── Maven__org_springframework_spring_tx_4_1_8_RELEASE.xml │ ├── Maven__org_springframework_spring_web_4_1_8_RELEASE.xml │ ├── Maven__org_springframework_spring_webmvc_4_1_8_RELEASE.xml │ ├── Maven__org_yaml_snakeyaml_1_14.xml │ ├── Maven__pl_pragmatists_JUnitParams_1_0_4.xml │ └── Maven__stax_stax_api_1_0_1.xml ├── modules.xml ├── runConfigurations │ ├── Application.xml │ └── ExportQTypes.xml ├── scopes │ └── scope_settings.xml ├── uiDesigner.xml └── vcs.xml ├── .travis.yml ├── Dockerfile-api ├── LICENSE-AGPL.txt ├── LICENSE-EUPL.txt ├── README.md ├── build.sh ├── cache-builder-images.sh ├── ci-build.sh ├── db ├── Dockerfile-db └── init.sql ├── docker-compose.yaml ├── etc ├── devdata │ ├── contacts.json │ ├── facilities.json │ ├── hubs.json │ ├── operators.json │ └── users.json ├── draw-geojson.html ├── radiator.html └── scripts │ ├── db │ └── psql-init-db.sh │ └── main.inc ├── liipi-api.iml ├── pom.xml ├── publish.sh ├── src ├── generated │ └── java │ │ └── fi │ │ └── hsl │ │ └── parkandride │ │ ├── back │ │ └── sql │ │ │ ├── QAppUser.java │ │ │ ├── QCapacityType.java │ │ │ ├── QContact.java │ │ │ ├── QDayType.java │ │ │ ├── QFacility.java │ │ │ ├── QFacilityAlias.java │ │ │ ├── QFacilityCapacityHistory.java │ │ │ ├── QFacilityPaymentMethod.java │ │ │ ├── QFacilityPrediction.java │ │ │ ├── QFacilityPredictionHistory.java │ │ │ ├── QFacilityService.java │ │ │ ├── QFacilityStatus.java │ │ │ ├── QFacilityStatusHistory.java │ │ │ ├── QFacilityUtilization.java │ │ │ ├── QHub.java │ │ │ ├── QHubFacility.java │ │ │ ├── QLock.java │ │ │ ├── QOperator.java │ │ │ ├── QPaymentMethod.java │ │ │ ├── QPort.java │ │ │ ├── QPredictor.java │ │ │ ├── QPricing.java │ │ │ ├── QPricingMethod.java │ │ │ ├── QRegion.java │ │ │ ├── QRequestLog.java │ │ │ ├── QRequestLogSource.java │ │ │ ├── QRequestLogUrl.java │ │ │ ├── QService.java │ │ │ ├── QUnavailableCapacity.java │ │ │ ├── QUnavailableCapacityHistory.java │ │ │ └── QUsage.java │ │ └── core │ │ └── domain │ │ └── wkt │ │ ├── WKT.tokens │ │ ├── WKTBaseListener.java │ │ ├── WKTBaseVisitor.java │ │ ├── WKTLexer.java │ │ ├── WKTLexer.tokens │ │ ├── WKTListener.java │ │ ├── WKTParser.java │ │ └── WKTVisitor.java ├── main │ ├── antlr │ │ └── WKT.g4 │ ├── asciidoc │ │ └── index.adoc │ ├── java │ │ ├── com │ │ │ └── querydsl │ │ │ │ └── sql │ │ │ │ └── spatial │ │ │ │ └── PGgeometryType2.java │ │ ├── fi │ │ │ └── hsl │ │ │ │ └── parkandride │ │ │ │ ├── Application.java │ │ │ │ ├── ApplicationVersionFilter.java │ │ │ │ ├── FeatureProfile.java │ │ │ │ ├── MDCFilter.java │ │ │ │ ├── back │ │ │ │ ├── AbstractMultilingualStringMapping.java │ │ │ │ ├── AddressMapping.java │ │ │ │ ├── ContactDao.java │ │ │ │ ├── FacilityDao.java │ │ │ │ ├── FacilityHistoryDao.java │ │ │ │ ├── GSortedSet.java │ │ │ │ ├── H2GeometryType.java │ │ │ │ ├── HubDao.java │ │ │ │ ├── LiipiSQLExceptionTranslator.java │ │ │ │ ├── ListUtil.java │ │ │ │ ├── LockDao.java │ │ │ │ ├── MultilingualStringMapping.java │ │ │ │ ├── MultilingualUrlMapping.java │ │ │ │ ├── OperatorDao.java │ │ │ │ ├── RegionDao.java │ │ │ │ ├── RegionRepository.java │ │ │ │ ├── RequestLogDao.java │ │ │ │ ├── StreamUtil.java │ │ │ │ ├── TimeType.java │ │ │ │ ├── TimeUtil.java │ │ │ │ ├── UserDao.java │ │ │ │ ├── UtilizationDao.java │ │ │ │ └── prediction │ │ │ │ │ ├── PredictionDao.java │ │ │ │ │ └── PredictorDao.java │ │ │ │ ├── config │ │ │ │ ├── CoreConfiguration.java │ │ │ │ └── JdbcConfiguration.java │ │ │ │ ├── core │ │ │ │ ├── back │ │ │ │ │ ├── ContactRepository.java │ │ │ │ │ ├── FacilityHistoryRepository.java │ │ │ │ │ ├── FacilityRepository.java │ │ │ │ │ ├── HubRepository.java │ │ │ │ │ ├── LockRepository.java │ │ │ │ │ ├── OperatorRepository.java │ │ │ │ │ ├── PhoneType.java │ │ │ │ │ ├── PredictionRepository.java │ │ │ │ │ ├── PredictorRepository.java │ │ │ │ │ ├── RequestLogRepository.java │ │ │ │ │ ├── UserRepository.java │ │ │ │ │ └── UtilizationRepository.java │ │ │ │ ├── domain │ │ │ │ │ ├── Address.java │ │ │ │ │ ├── CapacityType.java │ │ │ │ │ ├── Contact.java │ │ │ │ │ ├── ContactSearch.java │ │ │ │ │ ├── DayType.java │ │ │ │ │ ├── DefaultTimeZoneDateTimeSerializer.java │ │ │ │ │ ├── Facility.java │ │ │ │ │ ├── FacilityCapacity.java │ │ │ │ │ ├── FacilityCapacityHistory.java │ │ │ │ │ ├── FacilityContacts.java │ │ │ │ │ ├── FacilityInfo.java │ │ │ │ │ ├── FacilityNotFoundException.java │ │ │ │ │ ├── FacilityPaymentInfo.java │ │ │ │ │ ├── FacilitySearch.java │ │ │ │ │ ├── FacilityStatus.java │ │ │ │ │ ├── FacilityStatusHistory.java │ │ │ │ │ ├── FacilitySummary.java │ │ │ │ │ ├── FacilityUtil.java │ │ │ │ │ ├── HasInterval.java │ │ │ │ │ ├── Hub.java │ │ │ │ │ ├── HubNotFoundException.java │ │ │ │ │ ├── HubSearch.java │ │ │ │ │ ├── Lock.java │ │ │ │ │ ├── LockAcquireFailedException.java │ │ │ │ │ ├── LockException.java │ │ │ │ │ ├── Login.java │ │ │ │ │ ├── MultilingualString.java │ │ │ │ │ ├── MultilingualUrl.java │ │ │ │ │ ├── NewUser.java │ │ │ │ │ ├── NotFoundException.java │ │ │ │ │ ├── NullSafeSortedSet.java │ │ │ │ │ ├── OpeningHours.java │ │ │ │ │ ├── Operator.java │ │ │ │ │ ├── OperatorEntity.java │ │ │ │ │ ├── OperatorSearch.java │ │ │ │ │ ├── PageableFacilitySearch.java │ │ │ │ │ ├── PaymentMethod.java │ │ │ │ │ ├── Permission.java │ │ │ │ │ ├── Phone.java │ │ │ │ │ ├── Port.java │ │ │ │ │ ├── Pricing.java │ │ │ │ │ ├── PricingMethod.java │ │ │ │ │ ├── PropertyPathTranslator.java │ │ │ │ │ ├── Region.java │ │ │ │ │ ├── RegionWithHubs.java │ │ │ │ │ ├── RequestLogEntry.java │ │ │ │ │ ├── RequestLogKey.java │ │ │ │ │ ├── Role.java │ │ │ │ │ ├── SearchResults.java │ │ │ │ │ ├── Service.java │ │ │ │ │ ├── Sort.java │ │ │ │ │ ├── Spatial.java │ │ │ │ │ ├── StrictIsoDateTimeDeserializer.java │ │ │ │ │ ├── Time.java │ │ │ │ │ ├── TimeDuration.java │ │ │ │ │ ├── UnavailableCapacity.java │ │ │ │ │ ├── Usage.java │ │ │ │ │ ├── User.java │ │ │ │ │ ├── UserSearch.java │ │ │ │ │ ├── UserSecret.java │ │ │ │ │ ├── Utilization.java │ │ │ │ │ ├── UtilizationKey.java │ │ │ │ │ ├── UtilizationSearch.java │ │ │ │ │ ├── UtilizationStatus.java │ │ │ │ │ ├── Violation.java │ │ │ │ │ ├── prediction │ │ │ │ │ │ ├── AverageOfPreviousWeeksPredictor.java │ │ │ │ │ │ ├── BasePredictionResult.java │ │ │ │ │ │ ├── HubPredictionResult.java │ │ │ │ │ │ ├── Prediction.java │ │ │ │ │ │ ├── PredictionBatch.java │ │ │ │ │ │ ├── PredictionRequest.java │ │ │ │ │ │ ├── PredictionResult.java │ │ │ │ │ │ ├── Predictor.java │ │ │ │ │ │ ├── PredictorState.java │ │ │ │ │ │ ├── RelativizedAverageOfPreviousWeeksPredictor.java │ │ │ │ │ │ ├── SameAsLatestPredictor.java │ │ │ │ │ │ ├── UtilizationHistory.java │ │ │ │ │ │ ├── UtilizationHistoryImpl.java │ │ │ │ │ │ └── UtilizationHistoryList.java │ │ │ │ │ └── validation │ │ │ │ │ │ ├── Coordinates.java │ │ │ │ │ │ ├── CoordinatesValidator.java │ │ │ │ │ │ ├── ElementLength.java │ │ │ │ │ │ ├── ElementLengthSetValidator.java │ │ │ │ │ │ ├── MinElement.java │ │ │ │ │ │ ├── MinElementMapValidator.java │ │ │ │ │ │ ├── NotBlankElement.java │ │ │ │ │ │ ├── NotBlankElementSetValidator.java │ │ │ │ │ │ ├── NotNullElement.java │ │ │ │ │ │ ├── NotNullElementCollectionValidator.java │ │ │ │ │ │ ├── NotNullElementMapValidator.java │ │ │ │ │ │ ├── PhoneOrEmailRequired.java │ │ │ │ │ │ ├── PhoneOrEmailRequiredValidator.java │ │ │ │ │ │ ├── ValidTimeDuration.java │ │ │ │ │ │ └── ValidTimeDurationValidator.java │ │ │ │ └── service │ │ │ │ │ ├── AccessDeniedException.java │ │ │ │ │ ├── AuthenticationRequiredException.java │ │ │ │ │ ├── AuthenticationService.java │ │ │ │ │ ├── BatchingRequestLogService.java │ │ │ │ │ ├── CapacityPricingValidator.java │ │ │ │ │ ├── ContactService.java │ │ │ │ │ ├── FacilityHistoryService.java │ │ │ │ │ ├── FacilityService.java │ │ │ │ │ ├── HubService.java │ │ │ │ │ ├── OperatorService.java │ │ │ │ │ ├── PasswordValidator.java │ │ │ │ │ ├── PredictionService.java │ │ │ │ │ ├── TransactionalRead.java │ │ │ │ │ ├── TransactionalWrite.java │ │ │ │ │ ├── TranslationService.java │ │ │ │ │ ├── UserService.java │ │ │ │ │ ├── ValidationException.java │ │ │ │ │ ├── ValidationService.java │ │ │ │ │ └── reporting │ │ │ │ │ ├── AbstractReportService.java │ │ │ │ │ ├── Excel.java │ │ │ │ │ ├── ExcelUtil.java │ │ │ │ │ ├── FacilityUsageReportService.java │ │ │ │ │ ├── HubsAndFacilitiesReportService.java │ │ │ │ │ ├── MaxUtilizationReportService.java │ │ │ │ │ ├── ReportContext.java │ │ │ │ │ ├── ReportParameters.java │ │ │ │ │ ├── ReportService.java │ │ │ │ │ ├── ReportServiceSupport.java │ │ │ │ │ ├── RequestLogInterval.java │ │ │ │ │ └── RequestLogReportService.java │ │ │ │ ├── dev │ │ │ │ ├── DevController.java │ │ │ │ └── DevHelper.java │ │ │ │ ├── front │ │ │ │ ├── CORSFilter.java │ │ │ │ ├── ContactController.java │ │ │ │ ├── Credentials.java │ │ │ │ ├── DocsController.java │ │ │ │ ├── ExceptionHandlers.java │ │ │ │ ├── FacilityController.java │ │ │ │ ├── Features.java │ │ │ │ ├── FeaturesController.java │ │ │ │ ├── HubController.java │ │ │ │ ├── IllegalHeaderException.java │ │ │ │ ├── OperatorController.java │ │ │ │ ├── PhoneSerializer.java │ │ │ │ ├── RegionController.java │ │ │ │ ├── ReportController.java │ │ │ │ ├── RequestLoggingInterceptor.java │ │ │ │ ├── SchemaController.java │ │ │ │ ├── UrlSchema.java │ │ │ │ ├── UserArgumentResolver.java │ │ │ │ ├── UserController.java │ │ │ │ ├── ValueHolder.java │ │ │ │ └── geojson │ │ │ │ │ ├── Feature.java │ │ │ │ │ ├── FeatureCollection.java │ │ │ │ │ ├── GeojsonDeserializer.java │ │ │ │ │ └── GeojsonSerializer.java │ │ │ │ └── util │ │ │ │ ├── ArgumentValidator.java │ │ │ │ ├── Iterators.java │ │ │ │ ├── MapUtils.java │ │ │ │ └── Predicates.java │ │ └── org │ │ │ └── geolatte │ │ │ └── geom │ │ │ └── GeometryEditor.java │ └── resources │ │ ├── ValidationMessages.properties │ │ ├── application-ci.properties │ │ ├── application-dev.properties │ │ ├── application-dev_api.properties │ │ ├── application-docker.properties │ │ ├── application-psql.properties │ │ ├── application.properties │ │ ├── db │ │ ├── common │ │ │ ├── V10__predictor.sql │ │ │ ├── V11__regions.sql │ │ │ ├── V12__users_and_operators.sql │ │ │ ├── V13_1__prediction_history_predictor_id.sql │ │ │ ├── V13__prediction_history.sql │ │ │ ├── V14__more_regions.sql │ │ │ ├── V15__request_logging.sql │ │ │ ├── V16__facility_status_history.sql │ │ │ ├── V17__facility_capacity_history.sql │ │ │ ├── V18__facility_unavailable_capacity_history.sql │ │ │ ├── V1__users_and_operators.sql │ │ │ ├── V20__cluster_mutex_lock.sql │ │ │ ├── V22__utilization_index.sql │ │ │ ├── V2__contacts.sql │ │ │ ├── V3__enums.sql │ │ │ ├── V4__facilities.sql │ │ │ ├── V5__hubs.sql │ │ │ ├── V7__dummy_data.sql │ │ │ ├── V8__prediction.sql │ │ │ └── V9__rename_usage_enums.sql │ │ ├── h2 │ │ │ ├── V0__initialize_h2.sql │ │ │ ├── V11_1__regions.sql │ │ │ ├── V19__fixPornainen.sql │ │ │ ├── V21__utilization_capacity.sql │ │ │ ├── V4_1__facilities.sql │ │ │ ├── V5_1__hubs.sql │ │ │ └── V6__unique_names_h2.sql │ │ └── psql │ │ │ ├── V11_1__regions.sql │ │ │ ├── V19__fixPornainen.sql │ │ │ ├── V21__utilization_capacity.sql │ │ │ ├── V4_1__facilities.sql │ │ │ ├── V5_1__hubs.sql │ │ │ └── V6__unique_names_psql.sql │ │ ├── logback-appenderConsole.xml │ │ ├── logback-logging.profile_IS_UNDEFINED.xml │ │ ├── logback.xml │ │ ├── messages_fi.properties │ │ └── public │ │ └── index.html └── test │ ├── java │ └── fi │ │ └── hsl │ │ └── parkandride │ │ ├── ActiveProfileAppender.java │ │ ├── DevApiProfileAppender.java │ │ ├── ExportQTypes.java │ │ ├── MDCFilterTest.java │ │ ├── PWGen.java │ │ ├── back │ │ ├── AbstractDaoTest.java │ │ ├── ContactDaoTest.java │ │ ├── DaoTestApplication.java │ │ ├── Dummies.java │ │ ├── FacilityDaoTest.java │ │ ├── FacilityHistoryDaoTest.java │ │ ├── HubDaoTest.java │ │ ├── LiipiSQLExceptionTranslatorTest.java │ │ ├── LockDaoTest.java │ │ ├── OperatorDaoTest.java │ │ ├── RegionDaoTest.java │ │ ├── RequestLogDaoTest.java │ │ ├── TimeUtilTest.java │ │ ├── UserDaoTest.java │ │ ├── UtilizationDaoTest.java │ │ └── prediction │ │ │ ├── PredictionDaoTest.java │ │ │ └── PredictorDaoTest.java │ │ ├── config │ │ ├── CoreConfigurationTest.java │ │ └── TestConfiguration.java │ │ ├── core │ │ ├── ViolationAssert.java │ │ ├── domain │ │ │ ├── FacilityCapacityTest.java │ │ │ ├── FacilityIsOpenTest.java │ │ │ ├── FacilityStatusHistoryTest.java │ │ │ ├── MultilingualStringTest.java │ │ │ ├── OpeningHoursTest.java │ │ │ ├── PhoneTest.java │ │ │ ├── PricingTest.java │ │ │ ├── PropertyPathTranslatorTest.java │ │ │ ├── RequestLogKeyTest.java │ │ │ ├── SpatialTest.java │ │ │ ├── StrictIsoDateTimeDeserializerTest.java │ │ │ ├── TimeTest.java │ │ │ ├── UtilizationStatusTest.java │ │ │ ├── ViolationTest.java │ │ │ ├── prediction │ │ │ │ ├── AbstractPredictorTest.java │ │ │ │ ├── AverageOfPreviousWeeksPredictorTest.java │ │ │ │ ├── PredictionRequestTest.java │ │ │ │ ├── RelativizedAverageOfPreviousWeeksPredictorTest.java │ │ │ │ ├── SameAsLatestPredictorTest.java │ │ │ │ └── UtilizationHistoryListTest.java │ │ │ └── validation │ │ │ │ ├── CoordinatesValidatorTest.java │ │ │ │ └── MinElementValidatorTest.java │ │ └── service │ │ │ ├── AuthenticationServiceTest.java │ │ │ ├── CapacityPricingValidatorTest.java │ │ │ ├── FacilityHistoryServiceTest.java │ │ │ ├── PasswordValidatorTest.java │ │ │ ├── PredictionServiceTest.java │ │ │ ├── UserServiceTest.java │ │ │ ├── ValidationExceptionTest.java │ │ │ └── ValidationServiceTest.java │ │ ├── docs │ │ ├── ApiDocumentation.java │ │ ├── OperationRequestAdapter.java │ │ └── UriHostReplacingOperationPreprocessor.java │ │ ├── itest │ │ ├── AbstractIntegrationTest.java │ │ ├── AbstractReportingITest.java │ │ ├── CacheHeadersTest.java │ │ ├── ErrorHandlingITest.java │ │ ├── FacilityITest.java │ │ ├── FacilityUsageReportITest.java │ │ ├── GenericReportITest.java │ │ ├── HubsAndFacilitiesReportITest.java │ │ ├── ISO8601UTCTimestampMatcher.java │ │ ├── JSONObjectBuilder.java │ │ ├── MaxUtilizationReportITest.java │ │ ├── PredictionITest.java │ │ ├── RequestLogITest.java │ │ └── UtilizationITest.java │ │ ├── test │ │ └── DateTimeTestUtils.java │ │ └── util │ │ ├── ArgumentValidatorTest.java │ │ ├── IteratorsTest.java │ │ └── PredicatesTest.java │ └── resources │ ├── facility.create.JsonMappingException.json │ └── logback-test.xml ├── test ├── .dockerignore ├── .gitignore ├── Dockerfile-test ├── fixtures │ ├── facilities.fixture.js │ ├── facility.js │ ├── facilityFactory.js │ ├── fixtures.js │ ├── hub.js │ ├── hubFactory.js │ └── hubs.fixture.js ├── liipi-test.iml ├── package.json ├── pageobjects │ ├── auth │ │ └── authModal.js │ ├── base.js │ ├── capacitiesTable.js │ ├── components │ │ ├── components.js │ │ ├── datepicker.js │ │ ├── sweetAlert.js │ │ └── uiSelect.js │ ├── contacts │ │ ├── contactEditModal.js │ │ └── contactPage.js │ ├── devPage.js │ ├── facilities │ │ ├── facilityEditPage.js │ │ ├── facilityViewPage.js │ │ ├── portEditModal.js │ │ └── portViewModal.js │ ├── facilitiesTable.js │ ├── hubs │ │ ├── hubEditPage.js │ │ ├── hubListPage.js │ │ └── hubViewPage.js │ ├── indexPage.js │ ├── menu.js │ ├── operators │ │ ├── operatorEditModal.js │ │ └── operatorPage.js │ ├── pageobjects.js │ ├── predictionsTable.js │ └── users │ │ ├── reportsPage.js │ │ ├── userModal.js │ │ └── usersPage.js ├── protractor.conf.js ├── specs │ ├── auth │ │ └── auth.spec.js │ ├── common.js │ ├── contacts │ │ └── contactFlow.spec.js │ ├── devApi.js │ ├── facilities │ │ ├── facilityEdit.spec.js │ │ └── facilityView.spec.js │ ├── hubs │ │ ├── hubEdit.spec.js │ │ ├── hubList.spec.js │ │ └── hubView.spec.js │ ├── menu.spec.js │ ├── operators │ │ └── operatorFlow.spec.js │ ├── reports │ │ └── reports.spec.js │ ├── users │ │ └── users.spec.js │ └── waitAbsent.js └── yarn.lock ├── validate-commit-message.js ├── validate-commit-message.sh └── web ├── .bowerrc ├── .dockerignore ├── .gitignore ├── Dockerfile-web ├── Gruntfile.js ├── bower.json ├── build.config.js ├── changelog.tpl ├── docker ├── docker-entrypoint.sh └── nginx-default.conf.template ├── karma └── karma-unit.tpl.js ├── liipi-web.iml ├── module.prefix ├── module.suffix ├── package.json ├── src ├── README.md ├── app │ ├── README.md │ ├── about │ │ ├── about-en.js │ │ ├── about-en.tpl.html │ │ ├── about.js │ │ └── about.tpl.html │ ├── app.js │ ├── app.spec.js │ ├── auth │ │ ├── auth.js │ │ ├── login.tpl.html │ │ ├── passwordExpiredModal.js │ │ ├── passwordExpiredModal.tpl.html │ │ ├── passwordReminderModal.js │ │ └── passwordReminderModal.tpl.html │ ├── components │ │ └── violations │ │ │ ├── violations.js │ │ │ └── violations.tpl.html │ ├── contacts │ │ ├── contactEdit.tpl.html │ │ ├── contactList.tpl.html │ │ ├── contactListNavi.tpl.html │ │ └── contacts.js │ ├── dev │ │ ├── dev.js │ │ └── dev.tpl.html │ ├── facilities │ │ ├── capacities.js │ │ ├── capacitiesList.tpl.html │ │ ├── capacitiesTable.tpl.html │ │ ├── facilitiesTable.js │ │ ├── facilitiesTable.tpl.html │ │ ├── facilityContactEdit.tpl.html │ │ ├── facilityContactView.tpl.html │ │ ├── facilityContacts.js │ │ ├── facilityEdit.js │ │ ├── facilityEdit.tpl.html │ │ ├── facilityEditNavi.tpl.html │ │ ├── facilityMap.js │ │ ├── facilityView.js │ │ ├── facilityView.tpl.html │ │ ├── facilityViewNavi.tpl.html │ │ ├── portEdit.tpl.html │ │ ├── portView.tpl.html │ │ ├── predictionsTable.js │ │ ├── predictionsTable.tpl.html │ │ ├── pricing.js │ │ ├── pricingEdit.tpl.html │ │ ├── pricingList.js │ │ ├── pricingList.tpl.html │ │ ├── pricingManager.js │ │ ├── searchDemo.js │ │ ├── searchDemo.tpl.html │ │ ├── searchDemoNavi.tpl.html │ │ ├── usages.js │ │ └── usagesList.tpl.html │ ├── hubs │ │ ├── hubEdit.js │ │ ├── hubEdit.tpl.html │ │ ├── hubEditNavi.tpl.html │ │ ├── hubList.js │ │ ├── hubList.tpl.html │ │ ├── hubListNavi.tpl.html │ │ ├── hubMap.js │ │ ├── hubView.js │ │ ├── hubView.tpl.html │ │ └── hubViewNavi.tpl.html │ ├── layout │ │ ├── layout.js │ │ └── mainLayout.tpl.html │ ├── operators │ │ ├── operatorEdit.tpl.html │ │ ├── operatorList.tpl.html │ │ ├── operatorListNavi.tpl.html │ │ ├── operatorSelect.tpl.html │ │ └── operators.js │ ├── reports │ │ ├── reports.js │ │ ├── reports.tpl.html │ │ └── reportsNavi.tpl.html │ ├── users │ │ ├── userList.js │ │ ├── userList.tpl.html │ │ ├── userListRow.js │ │ ├── userListRow.tpl.html │ │ ├── userModal.js │ │ ├── userModal.tpl.html │ │ ├── userPasswordModal.js │ │ ├── userPasswordModal.tpl.html │ │ ├── users.js │ │ ├── users.spec.js │ │ ├── users.tpl.html │ │ └── usersNavi.tpl.html │ └── util │ │ ├── modalUtil.js │ │ └── submitUtil.js ├── assets │ ├── README.md │ ├── datamodel.png │ ├── hsl-liipi-logo2.png │ ├── karttakuva.png │ ├── ports │ │ ├── entry-exit-nopedestrian-bicycle.gif │ │ ├── entry-exit-nopedestrian-nobicycle.gif │ │ ├── entry-exit-pedestrian-bicycle.gif │ │ ├── entry-exit-pedestrian-nobicycle.gif │ │ ├── entry-noexit-nopedestrian-bicycle.gif │ │ ├── entry-noexit-nopedestrian-nobicycle.gif │ │ ├── entry-noexit-pedestrian-bicycle.gif │ │ ├── entry-noexit-pedestrian-nobicycle.gif │ │ ├── noentry-exit-nopedestrian-bicycle.gif │ │ ├── noentry-exit-nopedestrian-nobicycle.gif │ │ ├── noentry-exit-pedestrian-bicycle.gif │ │ ├── noentry-exit-pedestrian-nobicycle.gif │ │ ├── noentry-noexit-nopedestrian-bicycle.gif │ │ ├── noentry-noexit-nopedestrian-nobicycle.gif │ │ ├── noentry-noexit-pedestrian-bicycle.gif │ │ └── noentry-noexit-pedestrian-nobicycle.gif │ └── translations-fi.json ├── common │ ├── README.md │ ├── directives │ │ ├── address.js │ │ ├── addressEdit.tpl.html │ │ ├── addressView.tpl.html │ │ ├── dateInput.js │ │ ├── longMultilingualEdit.tpl.html │ │ ├── multilingual.js │ │ ├── multilingualEdit.tpl.html │ │ ├── multilingualView.tpl.html │ │ ├── tags.js │ │ ├── tags.tpl.html │ │ └── util.js │ ├── featureToggle.js │ ├── filters │ │ └── filters.js │ ├── services │ │ ├── ContactResource.js │ │ ├── FacilityResource.js │ │ ├── HubResource.js │ │ ├── MapService.js │ │ ├── OperatorResource.js │ │ ├── RegionResource.js │ │ ├── SchemaResource.js │ │ ├── Sequence.js │ │ ├── UserResource.js │ │ └── i18n.js │ └── showErrors.js ├── index.html └── sass │ ├── _capacity_table.scss │ ├── _dialogs.scss │ ├── _fonts_and_links.scss │ ├── _layouts.scss │ ├── _map.scss │ ├── _messages_and_warnings.scss │ ├── _mixins.scss │ ├── _responsive.scss │ ├── _tags.scss │ ├── _variables.scss │ └── base.scss ├── tools.md └── yarn.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | /.git/ 2 | /target/ 3 | # XXX: the api module needs translations from the web module, so the modules cannot be in sibling directories for isolation 4 | web 5 | !web/src/assets/translations-*.json 6 | /test/ 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | /workspace.xml 2 | /dataSources* 3 | /dictionaries/ 4 | /misc.xml 5 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | parkandrideAPI -------------------------------------------------------------------------------- /.idea/ClojureProjectResolveSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | IDE 5 | 6 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/copyright/HSL.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__asm_asm_3_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_classmate_1_0_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_4_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_4_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_4_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_joda_2_4_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_findbugs_annotations_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_guava_guava_18_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_googlecode_json_simple_json_simple_1_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_googlecode_libphonenumber_libphonenumber_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_h2database_h2_1_4_181.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_infradna_tool_bridge_method_annotation_1_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_0_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jayway_restassured_json_path_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jayway_restassured_rest_assured_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jayway_restassured_rest_assured_common_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jayway_restassured_xml_path_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_mysema_codegen_codegen_0_6_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_mysema_commons_mysema_commons_lang_0_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_querydsl_querydsl_codegen_4_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_querydsl_querydsl_core_4_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_querydsl_querydsl_spatial_4_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_querydsl_querydsl_sql_4_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_querydsl_querydsl_sql_codegen_4_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_querydsl_querydsl_sql_spatial_4_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_vividsolutions_jts_1_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_zaxxer_HikariCP_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_codec_commons_codec_1_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_el_javax_el_api_2_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_inject_javax_inject_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_validation_validation_api_1_1_0_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__joda_time_joda_time_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__junit_junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__log4j_log4j_1_2_17.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_minidev_asm_1_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_minidev_json_smart_2_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__nl_jqno_equalsverifier_equalsverifier_1_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_abego_treelayout_org_abego_treelayout_core_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_antlr_antlr4_runtime_4_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_compress_1_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_lang3_3_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_3_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_poi_poi_3_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_poi_poi_ooxml_3_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_poi_poi_ooxml_schemas_3_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_servicemix_bundles_org_apache_servicemix_bundles_javax_inject_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_8_0_28.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_8_0_28.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_logging_juli_8_0_28.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_0_28.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlbeans_xmlbeans_2_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_assertj_assertj_core_3_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_ccil_cowan_tagsoup_tagsoup_1_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_groovy_groovy_2_4_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_groovy_groovy_json_2_4_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_groovy_groovy_xml_2_4_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_eclipse_jdt_core_compiler_ecj_4_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_flywaydb_flyway_core_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_geolatte_geolatte_common_0_7_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_geolatte_geolatte_geom_0_14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_glassfish_web_javax_el_2_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hibernate_hibernate_validator_5_1_2_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hibernate_hibernate_validator_cdi_5_1_2_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jasypt_jasypt_1_9_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_javassist_javassist_3_18_1_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_1_3_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jgrapht_jgrapht_core_0_9_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mockito_mockito_core_1_10_19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_orbisgis_cts_1_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_orbisgis_h2drivers_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_orbisgis_h2network_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_orbisgis_h2spatial_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_orbisgis_h2spatial_api_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_orbisgis_h2spatial_ext_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_orbisgis_java_network_analyzer_0_1_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_orbisgis_jdelaunay_0_5_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_orbisgis_spatial_utilities_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_postgis_postgis_jdbc_1_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_postgis_postgis_stubs_1_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_postgresql_postgresql_9_3_1102_jdbc41.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_reflections_reflections_0_9_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_log4j_over_slf4j_1_7_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_1_2_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_1_2_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_1_2_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_1_2_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_actuator_1_2_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_1_2_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_1_2_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_1_2_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_1_2_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_data_spring_data_commons_1_9_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_restdocs_spring_restdocs_core_1_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_restdocs_spring_restdocs_mockmvc_1_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_aop_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_beans_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_context_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_core_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_expression_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_jdbc_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_test_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_tx_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_web_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_webmvc_4_1_8_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_yaml_snakeyaml_1_14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pl_pragmatists_JUnitParams_1_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__stax_stax_api_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations/Application.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eux 3 | 4 | mvn clean verify --batch-mode --errors 5 | -------------------------------------------------------------------------------- /cache-builder-images.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | for name in "liipi-api-builder-cache" "liipi-web-builder-cache" "liipi-web-nginx-builder-cache"; do 5 | latest_id=$(docker images --filter "label=cache-this-layer=${name}" --format "{{.ID}}" | head -n 1) 6 | docker tag "${latest_id}" "${name}" 7 | echo "Tagged ${latest_id} as ${name}" 8 | done 9 | -------------------------------------------------------------------------------- /ci-build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | : ${1:? Usage: $0 VERSION} 4 | 5 | readonly VERSION="$1" 6 | 7 | set -x 8 | 9 | docker-compose build --build-arg version="${VERSION}" 10 | docker-compose up -d db 11 | docker-compose run --rm wait-for-it db:5432 --timeout=30 || (docker-compose logs db; false) 12 | docker-compose up -d api 13 | docker-compose run --rm wait-for-it api:8080 --timeout=30 || (docker-compose logs api; false) 14 | docker-compose up -d web 15 | docker-compose run --rm wait-for-it web:80 --timeout=10 || (docker-compose logs web; false) 16 | docker-compose run --rm test 17 | -------------------------------------------------------------------------------- /db/Dockerfile-db: -------------------------------------------------------------------------------- 1 | FROM mdillon/postgis:9.5 2 | 3 | RUN localedef --force --inputfile=fi_FI --charmap=UTF-8 --alias-file=/usr/share/locale/locale.alias fi_FI.UTF-8 4 | ENV LANG fi_FI.utf8 5 | 6 | COPY init.sql /docker-entrypoint-initdb.d/ 7 | -------------------------------------------------------------------------------- /db/init.sql: -------------------------------------------------------------------------------- 1 | CREATE EXTENSION postgis; 2 | CREATE EXTENSION postgis_topology; 3 | CREATE EXTENSION fuzzystrmatch; 4 | CREATE EXTENSION postgis_tiger_geocoder; 5 | -------------------------------------------------------------------------------- /etc/devdata/contacts.json: -------------------------------------------------------------------------------- 1 | [{"id":1,"name":{"fi":"hsl fi","sv":"hsl sv","en":"hsl en"},"phone":"09 47664444","email":null,"address":{"streetAddress":null,"postalCode":null,"city":null},"openingHours":null,"info":null}] -------------------------------------------------------------------------------- /etc/devdata/hubs.json: -------------------------------------------------------------------------------- 1 | [{"id":100000,"name":{"fi":"Rautatieasema","sv":"Järnvägsstation","en":"Central Railway Station"},"location":{"type":"Point","coordinates":[24.941645,60.17136]},"facilityIds":[4,5,6,7,16,17]},{"id":100001,"name":{"fi":"Pasila","sv":"Böle","en":"Pasila"},"location":{"type":"Point","coordinates":[24.93373,60.198246]},"facilityIds":[8,9,10]},{"id":100002,"name":{"fi":"Westend","sv":"Westend","en":"Westend"},"location":{"type":"Point","coordinates":[24.804579,60.1688]},"facilityIds":[12,13]}] -------------------------------------------------------------------------------- /etc/devdata/operators.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "name": { 5 | "fi": "smooth operator", 6 | "sv": "smooth operator", 7 | "en": "smooth operator" 8 | } 9 | } 10 | ] -------------------------------------------------------------------------------- /etc/devdata/users.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "username":"admin", 4 | "password":"liipi", 5 | "role":"ADMIN" 6 | }, 7 | { 8 | "username":"operator", 9 | "password":"smooth", 10 | "role":"OPERATOR", 11 | "operatorId":1 12 | } 13 | ] -------------------------------------------------------------------------------- /publish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | : ${1:? Usage: $0 TAG} 4 | 5 | readonly TAG="$1" 6 | readonly REGISTRY="995219551342.dkr.ecr.eu-west-1.amazonaws.com" 7 | readonly API_IMAGE="liipi-api" 8 | readonly WEB_IMAGE="liipi-web" 9 | 10 | #export AWS_PROFILE=liipi 11 | eval $(aws ecr get-login --no-include-email --region eu-west-1) 12 | 13 | set -x 14 | 15 | docker tag "${API_IMAGE}:latest" "${REGISTRY}/${API_IMAGE}:${TAG}" 16 | docker tag "${WEB_IMAGE}:latest" "${REGISTRY}/${WEB_IMAGE}:${TAG}" 17 | 18 | docker push "${REGISTRY}/${API_IMAGE}:${TAG}" 19 | docker push "${REGISTRY}/${WEB_IMAGE}:${TAG}" 20 | -------------------------------------------------------------------------------- /src/generated/java/fi/hsl/parkandride/core/domain/wkt/WKT.tokens: -------------------------------------------------------------------------------- 1 | Decimal=1 2 | IntegerPart=2 3 | DecimalPart=3 4 | COMMA=4 5 | LPAR=5 6 | RPAR=6 7 | POINT=7 8 | LINESTRING=8 9 | POLYGON=9 10 | MULTIPOINT=10 11 | MULTILINESTRING=11 12 | MULTIPOLYGON=12 13 | WS=13 14 | ','=4 15 | '('=5 16 | ')'=6 17 | -------------------------------------------------------------------------------- /src/generated/java/fi/hsl/parkandride/core/domain/wkt/WKTLexer.tokens: -------------------------------------------------------------------------------- 1 | Decimal=1 2 | IntegerPart=2 3 | DecimalPart=3 4 | COMMA=4 5 | LPAR=5 6 | RPAR=6 7 | POINT=7 8 | LINESTRING=8 9 | POLYGON=9 10 | MULTIPOINT=10 11 | MULTILINESTRING=11 12 | MULTIPOLYGON=12 13 | WS=13 14 | ','=4 15 | '('=5 16 | ')'=6 17 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/FeatureProfile.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2018 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride; 5 | 6 | public interface FeatureProfile { 7 | String DEV = "dev"; 8 | String DEV_API = "dev_api"; 9 | String EXPORT_QTYPES = "export_qtypes"; 10 | String PSQL = "psql"; 11 | String H2 = "!psql"; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/back/MultilingualStringMapping.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.back; 5 | 6 | import com.querydsl.core.types.dsl.StringPath; 7 | 8 | import fi.hsl.parkandride.core.domain.MultilingualString; 9 | 10 | public class MultilingualStringMapping extends AbstractMultilingualStringMapping { 11 | 12 | public MultilingualStringMapping(StringPath fiPath, StringPath svPath, StringPath enPath) { 13 | super(MultilingualString.class, fiPath, svPath, enPath); 14 | } 15 | 16 | @Override 17 | protected MultilingualString newMultilingualString(String fi, String sv, String en) { 18 | return new MultilingualString(fi, sv, en); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/back/MultilingualUrlMapping.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.back; 5 | 6 | import com.querydsl.core.types.dsl.StringPath; 7 | 8 | import fi.hsl.parkandride.core.domain.MultilingualUrl; 9 | 10 | public class MultilingualUrlMapping extends AbstractMultilingualStringMapping { 11 | 12 | public MultilingualUrlMapping(StringPath fiPath, StringPath svPath, StringPath enPath) { 13 | super(MultilingualUrl.class, fiPath, svPath, enPath); 14 | 15 | } 16 | 17 | @Override 18 | protected MultilingualUrl newMultilingualString(String fi, String sv, String en) { 19 | return new MultilingualUrl(fi, sv, en); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/back/RegionRepository.java: -------------------------------------------------------------------------------- 1 | package fi.hsl.parkandride.back; 2 | 3 | import fi.hsl.parkandride.core.domain.Region; 4 | import fi.hsl.parkandride.core.domain.RegionWithHubs; 5 | 6 | import java.util.Collection; 7 | 8 | public interface RegionRepository { 9 | 10 | Collection getRegions(); 11 | 12 | Collection regionsWithHubs(); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/back/StreamUtil.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.back; 5 | 6 | import java.util.Iterator; 7 | import java.util.Optional; 8 | import java.util.stream.Stream; 9 | import java.util.stream.StreamSupport; 10 | 11 | public class StreamUtil { 12 | 13 | public static Stream asStream(Optional optional) { 14 | return optional.map(Stream::of).orElse(Stream.empty()); 15 | } 16 | 17 | public static Stream asStream(Iterator iterator) { 18 | return asStream(iterator, false); 19 | } 20 | 21 | public static Stream asStream(Iterator iterator, boolean parallel) { 22 | Iterable iterable = () -> iterator; 23 | return StreamSupport.stream(iterable.spliterator(), parallel); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/back/TimeUtil.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.back; 5 | 6 | import org.joda.time.DateTime; 7 | 8 | public class TimeUtil { 9 | 10 | public static DateTime roundMinutes(int resolution, DateTime dateTime) { 11 | int minute = dateTime.getMinuteOfHour(); 12 | int remainder = minute % resolution; 13 | int roundedRem = (int) (Math.round(((double) remainder) / resolution) * resolution); 14 | return dateTime.plusMinutes(roundedRem - remainder) 15 | .withSecondOfMinute(0) 16 | .withMillisOfSecond(0); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/back/ContactRepository.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.back; 5 | 6 | import fi.hsl.parkandride.core.domain.Contact; 7 | import fi.hsl.parkandride.core.domain.ContactSearch; 8 | import fi.hsl.parkandride.core.domain.SearchResults; 9 | 10 | public interface ContactRepository { 11 | 12 | long insertContact(Contact contact); 13 | 14 | Contact getContact(long contactId); 15 | 16 | Contact getContactForUpdate(long contactId); 17 | 18 | void updateContact(long contactId, Contact contact); 19 | 20 | SearchResults findContacts(ContactSearch search); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/back/FacilityRepository.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.back; 5 | 6 | import fi.hsl.parkandride.core.domain.*; 7 | 8 | public interface FacilityRepository { 9 | 10 | long insertFacility(Facility facility); 11 | 12 | void updateFacility(long facilityId, Facility facility); 13 | 14 | void updateFacility(long facilityId, Facility newFacility, Facility oldFacility); 15 | 16 | Facility getFacility(long facilityId); 17 | 18 | FacilityInfo getFacilityInfo(long facilityId); 19 | 20 | Facility getFacilityForUpdate(long facilityId); 21 | 22 | SearchResults findFacilities(PageableFacilitySearch search); 23 | 24 | FacilitySummary summarizeFacilities(FacilitySearch search); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/back/HubRepository.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.back; 5 | 6 | import fi.hsl.parkandride.core.domain.Hub; 7 | import fi.hsl.parkandride.core.domain.HubSearch; 8 | import fi.hsl.parkandride.core.domain.SearchResults; 9 | 10 | public interface HubRepository { 11 | 12 | long insertHub(Hub hub); 13 | 14 | void updateHub(long hubId, Hub hub); 15 | 16 | Hub getHub(long hubId); 17 | 18 | SearchResults findHubs(HubSearch search); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/back/LockRepository.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.back; 5 | 6 | import fi.hsl.parkandride.core.domain.Lock; 7 | import org.joda.time.Duration; 8 | 9 | public interface LockRepository { 10 | 11 | Lock acquireLock(String lockName, Duration lockDuration); 12 | 13 | boolean releaseLock(Lock lock); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/back/OperatorRepository.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.back; 5 | 6 | import fi.hsl.parkandride.core.domain.Operator; 7 | import fi.hsl.parkandride.core.domain.OperatorSearch; 8 | import fi.hsl.parkandride.core.domain.SearchResults; 9 | 10 | public interface OperatorRepository { 11 | 12 | long insertOperator(Operator operator); 13 | 14 | void updateOperator(long operatorId, Operator operator); 15 | 16 | Operator getOperator(long serviceId); 17 | 18 | SearchResults findOperators(OperatorSearch search); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/back/PredictorRepository.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.back; 5 | 6 | import fi.hsl.parkandride.core.domain.UtilizationKey; 7 | import fi.hsl.parkandride.core.domain.prediction.PredictorState; 8 | 9 | import java.util.List; 10 | 11 | public interface PredictorRepository { 12 | 13 | Long enablePredictor(String predictorType, UtilizationKey utilizationKey); 14 | 15 | void save(PredictorState state); 16 | 17 | PredictorState getById(Long predictorId); 18 | 19 | PredictorState getForUpdate(Long predictorId); 20 | 21 | List findAllPredictors(); 22 | 23 | List findPredictorsNeedingUpdate(); 24 | 25 | void markPredictorsNeedAnUpdate(UtilizationKey utilizationKey); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/CapacityType.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import static java.util.Arrays.asList; 7 | 8 | import java.util.List; 9 | 10 | public enum CapacityType { 11 | CAR, 12 | DISABLED, 13 | ELECTRIC_CAR, 14 | MOTORCYCLE, 15 | BICYCLE, 16 | BICYCLE_SECURE_SPACE; 17 | 18 | public static final CapacityType[] motorCapacities = new CapacityType[]{CAR, ELECTRIC_CAR, MOTORCYCLE, DISABLED}; 19 | public static final CapacityType[] bicycleCapacities = new CapacityType[]{BICYCLE, BICYCLE_SECURE_SPACE}; 20 | public static final List motorCapacityList = asList(motorCapacities); 21 | public static final List bicycleCapacityList = asList(bicycleCapacities); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/FacilityNotFoundException.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public class FacilityNotFoundException extends NotFoundException { 7 | 8 | public FacilityNotFoundException(long facilityId) { 9 | super("Facility#%s not found", facilityId); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/FacilityPaymentInfo.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import javax.validation.Valid; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import fi.hsl.parkandride.core.domain.validation.NotNullElement; 10 | 11 | public class FacilityPaymentInfo { 12 | 13 | @Valid 14 | public MultilingualString detail; 15 | 16 | @Valid 17 | public MultilingualUrl url; 18 | 19 | @NotNull 20 | @NotNullElement 21 | public NullSafeSortedSet paymentMethods = new NullSafeSortedSet<>(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/FacilityStatus.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public enum FacilityStatus { 7 | IN_OPERATION, 8 | INACTIVE, 9 | TEMPORARILY_CLOSED, 10 | EXCEPTIONAL_SITUATION; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/FacilitySummary.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import java.util.Map; 7 | 8 | public class FacilitySummary { 9 | 10 | public final long facilityCount; 11 | 12 | public final Map capacities; 13 | 14 | public FacilitySummary(long facilityCount, Map capacities) { 15 | this.facilityCount = facilityCount; 16 | this.capacities = capacities; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/HasInterval.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import org.joda.time.DateTime; 7 | import org.joda.time.Duration; 8 | import org.joda.time.Interval; 9 | 10 | import java.util.Optional; 11 | 12 | public interface HasInterval { 13 | 14 | DateTime getStart(); 15 | DateTime getEnd(); 16 | 17 | default Interval getInterval() { 18 | return new Interval(getStart(), getEnd()); 19 | } 20 | 21 | default Duration overlapWith(Interval interval) { 22 | return Optional.ofNullable(interval) 23 | .map(i -> getInterval().overlap(i)) 24 | .map(Interval::toDuration) 25 | .orElse(Duration.ZERO); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/Hub.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import com.google.common.collect.Sets; 7 | import fi.hsl.parkandride.core.domain.validation.Coordinates; 8 | import fi.hsl.parkandride.core.domain.validation.NotNullElement; 9 | import org.geolatte.geom.Point; 10 | 11 | import javax.validation.Valid; 12 | import javax.validation.constraints.NotNull; 13 | import java.util.Set; 14 | 15 | public class Hub { 16 | 17 | public Long id; 18 | 19 | @NotNull 20 | @Valid 21 | public MultilingualString name; 22 | 23 | @NotNull 24 | @Coordinates 25 | public Point location; 26 | 27 | @NotNull 28 | @NotNullElement 29 | public Set facilityIds = Sets.newHashSet(); 30 | 31 | @Valid 32 | public Address address; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/HubNotFoundException.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public class HubNotFoundException extends NotFoundException { 7 | 8 | public HubNotFoundException(long hubId) { 9 | super("Hub#%s not found", hubId); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/LockAcquireFailedException.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public class LockAcquireFailedException extends LockException { 7 | public LockAcquireFailedException(String message) { 8 | super(message); 9 | } 10 | 11 | public LockAcquireFailedException(String message, Throwable cause) { 12 | super(message, cause); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/LockException.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public class LockException extends RuntimeException { 7 | public LockException(String message) { 8 | super(message); 9 | } 10 | 11 | public LockException(String message, Throwable cause) { 12 | super(message, cause); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/Login.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import java.util.Set; 7 | 8 | import com.google.common.collect.Sets; 9 | 10 | public class Login { 11 | 12 | public String token; 13 | 14 | public String username; 15 | 16 | public Role role; 17 | 18 | public Set permissions = Sets.newHashSet(); 19 | 20 | public Long operatorId; 21 | 22 | public Long userId; 23 | 24 | public Integer passwordExpireInDays; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/NewUser.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public class NewUser extends User { 7 | 8 | public String password; 9 | 10 | public NewUser() {} 11 | 12 | public NewUser(Long id, String username, Role role, String password) { 13 | super(id, username, role); 14 | this.password = password; 15 | } 16 | 17 | public NewUser(Long id, String username, Role role, Long operatorId, String password) { 18 | super(id, username, role, operatorId); 19 | this.password = password; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/NotFoundException.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public class NotFoundException extends RuntimeException { 7 | 8 | public NotFoundException(String format, Object id) { 9 | super(String.format(format, id)); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/Operator.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public class Operator implements OperatorEntity { 7 | 8 | public Long id; 9 | 10 | public MultilingualString name; 11 | 12 | public Operator() { 13 | } 14 | 15 | public Operator(String name) { 16 | this.name = new MultilingualString(name); 17 | } 18 | 19 | @Override 20 | public Long operatorId() { 21 | return id; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/OperatorEntity.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | 7 | public interface OperatorEntity { 8 | 9 | public Long operatorId(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/OperatorSearch.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public class OperatorSearch { 7 | 8 | private int limit = 100; 9 | 10 | private long offset = 0; 11 | 12 | private Sort sort; 13 | 14 | // NOTE: getters'n'setters are required for Spring GET request binding 15 | 16 | public int getLimit() { 17 | return limit; 18 | } 19 | 20 | public void setLimit(int limit) { 21 | this.limit = limit; 22 | } 23 | 24 | public long getOffset() { 25 | return offset; 26 | } 27 | 28 | public void setOffset(long offset) { 29 | this.offset = offset; 30 | } 31 | 32 | public Sort getSort() { 33 | return sort; 34 | } 35 | 36 | public void setSort(Sort sort) { 37 | this.sort = sort; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/PaymentMethod.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public enum PaymentMethod { 7 | COINS, 8 | NOTES, 9 | DEBIT_CARD, 10 | VISA_ELECTRON, 11 | VISA_CREDIT, 12 | AMERICAN_EXPRESS, 13 | MASTERCARD, 14 | DINERS_CLUB, 15 | HSL_TRAVEL_CARD, 16 | OTHER 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/Permission.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public enum Permission { 7 | ALL_OPERATORS(false), 8 | FACILITY_CREATE(true), 9 | FACILITY_UPDATE(true), 10 | OPERATOR_CREATE(false), 11 | OPERATOR_UPDATE(true), 12 | CONTACT_CREATE(true), 13 | CONTACT_UPDATE(true), 14 | USER_CREATE(true), 15 | USER_UPDATE(true), 16 | USER_VIEW(true), 17 | FACILITY_UTILIZATION_UPDATE(true), 18 | HUB_CREATE(false), 19 | HUB_UPDATE(false), 20 | REPORT_GENERATE(false); 21 | 22 | public final boolean requiresContext; 23 | 24 | Permission(boolean requiresContext) { 25 | this.requiresContext = requiresContext; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/PropertyPathTranslator.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import java.util.regex.Pattern; 7 | 8 | import com.google.common.base.Preconditions; 9 | 10 | public final class PropertyPathTranslator { 11 | 12 | private static final Pattern PATTERN = Pattern.compile("\\[(\\D\\w*)\\]"); 13 | 14 | private PropertyPathTranslator() {} 15 | 16 | public static String translate(String input) { 17 | Preconditions.checkArgument(input != null); 18 | Preconditions.checkArgument(!isWhitespaceOnly(input)); 19 | 20 | return PATTERN.matcher(input).replaceAll(".$1"); 21 | } 22 | 23 | private static boolean isWhitespaceOnly(String input) { 24 | return input.length() > 0 && input.trim().isEmpty(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/Region.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import com.fasterxml.jackson.annotation.JsonIgnore; 7 | import org.geolatte.geom.Geometry; 8 | import javax.annotation.Nonnull; 9 | 10 | public class Region { 11 | 12 | public long id; 13 | 14 | @Nonnull 15 | public MultilingualString name; 16 | 17 | @Nonnull 18 | @JsonIgnore 19 | public Geometry area; 20 | 21 | public static final Region UNKNOWN_REGION; 22 | 23 | static { 24 | UNKNOWN_REGION = new Region(); 25 | UNKNOWN_REGION.id = -1; 26 | UNKNOWN_REGION.name = new MultilingualString(""); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/RegionWithHubs.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import fi.hsl.parkandride.core.domain.validation.NotNullElement; 7 | 8 | import javax.annotation.Nonnull; 9 | import java.util.HashSet; 10 | import java.util.Set; 11 | 12 | public class RegionWithHubs extends Region { 13 | @Nonnull 14 | @NotNullElement 15 | public Set hubIds = new HashSet<>(); 16 | 17 | public RegionWithHubs() {} 18 | public RegionWithHubs(Region region, Set hubIds) { 19 | this.id = region.id; 20 | this.name = region.name; 21 | this.hubIds = hubIds; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/Service.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public enum Service { 7 | ELEVATOR, 8 | TOILETS, 9 | ACCESSIBLE_TOILETS, 10 | LIGHTING, 11 | COVERED, 12 | SURVEILLANCE_CAMERAS, 13 | VENDING_MACHINE, 14 | INFORMATION_POINT, 15 | PAY_DESK, 16 | CAR_WASH, 17 | REPAIR_SHOP, 18 | SHOE_SHINE, 19 | PAYMENT_AT_GATE, 20 | UMBRELLA_RENTAL, 21 | PARKING_SPACE_RESERVATION, 22 | ENGINE_IGNITION_AID, 23 | FIRST_AID, 24 | STROLLER_RENTAL, 25 | INFO_SCREENS, 26 | BICYCLE_FRAME_LOCK 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/Usage.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | public enum Usage { 7 | PARK_AND_RIDE, 8 | HSL_TRAVEL_CARD, 9 | COMMERCIAL 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/UserSecret.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import javax.validation.Valid; 7 | 8 | import org.joda.time.DateTime; 9 | 10 | public class UserSecret { 11 | 12 | public String password; 13 | 14 | public DateTime passwordUpdatedTimestamp = new DateTime(); 15 | 16 | public DateTime minTokenTimestamp = new DateTime(); 17 | 18 | @Valid 19 | public User user; 20 | 21 | public UserSecret() {} 22 | 23 | public UserSecret(long id, String username, String password, Role role) { 24 | this.user = new User(id, username, role); 25 | this.password = password; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/prediction/BasePredictionResult.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain.prediction; 5 | 6 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 7 | import fi.hsl.parkandride.core.domain.CapacityType; 8 | import fi.hsl.parkandride.core.domain.DefaultTimeZoneDateTimeSerializer; 9 | import fi.hsl.parkandride.core.domain.Usage; 10 | import org.joda.time.DateTime; 11 | 12 | public abstract class BasePredictionResult { 13 | public CapacityType capacityType; 14 | public Usage usage; 15 | @JsonSerialize(using = DefaultTimeZoneDateTimeSerializer.class) 16 | public DateTime timestamp; 17 | public int spacesAvailable; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/prediction/Predictor.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain.prediction; 5 | 6 | import java.util.List; 7 | 8 | public interface Predictor { 9 | 10 | String getType(); 11 | 12 | List predict(PredictorState state, UtilizationHistory history, int maxCapacity); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/prediction/UtilizationHistory.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain.prediction; 5 | 6 | import com.mysema.commons.lang.CloseableIterator; 7 | import fi.hsl.parkandride.core.domain.Utilization; 8 | import org.joda.time.DateTime; 9 | 10 | import java.util.List; 11 | import java.util.Optional; 12 | 13 | public interface UtilizationHistory { 14 | 15 | Optional getLatest(); 16 | 17 | List getRange(DateTime startInclusive, DateTime endInclusive); 18 | 19 | CloseableIterator getUpdatesSince(DateTime startExclusive); 20 | 21 | Optional getAt(DateTime timestamp); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/validation/PhoneOrEmailRequiredValidator.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain.validation; 5 | 6 | import static com.google.common.base.Strings.isNullOrEmpty; 7 | 8 | import javax.validation.ConstraintValidator; 9 | import javax.validation.ConstraintValidatorContext; 10 | 11 | import fi.hsl.parkandride.core.domain.Contact; 12 | 13 | public class PhoneOrEmailRequiredValidator implements ConstraintValidator { 14 | 15 | @Override 16 | public void initialize(PhoneOrEmailRequired constraintAnnotation) { 17 | } 18 | 19 | @Override 20 | public boolean isValid(Contact contact, ConstraintValidatorContext context) { 21 | return contact == null || !(isNullOrEmpty(contact.email) && contact.phone == null); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/domain/validation/ValidTimeDurationValidator.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain.validation; 5 | 6 | import javax.validation.ConstraintValidator; 7 | import javax.validation.ConstraintValidatorContext; 8 | 9 | import fi.hsl.parkandride.core.domain.TimeDuration; 10 | 11 | public class ValidTimeDurationValidator implements ConstraintValidator { 12 | 13 | @Override 14 | public void initialize(ValidTimeDuration constraintAnnotation) { 15 | 16 | } 17 | 18 | @Override 19 | public boolean isValid(TimeDuration value, ConstraintValidatorContext context) { 20 | if (value == null || value.from == null || value.until == null) { 21 | return true; 22 | } 23 | return value.from.isBefore(value.until); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/service/AccessDeniedException.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.service; 5 | 6 | public class AccessDeniedException extends RuntimeException { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/service/AuthenticationRequiredException.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2018 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.service; 5 | 6 | public class AuthenticationRequiredException extends RuntimeException { 7 | public AuthenticationRequiredException(String message) { 8 | super(message, null, true, false); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/service/reporting/ReportParameters.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.service.reporting; 5 | 6 | import fi.hsl.parkandride.core.domain.CapacityType; 7 | import fi.hsl.parkandride.core.domain.Usage; 8 | import org.joda.time.LocalDate; 9 | 10 | import java.util.Set; 11 | 12 | public class ReportParameters { 13 | public LocalDate startDate; 14 | public LocalDate endDate; 15 | public int interval; 16 | public RequestLogInterval requestLogInterval; 17 | public Set operators; 18 | public Set hubs; 19 | public Set facilities; 20 | public Set regions; 21 | public Set usages; 22 | public Set capacityTypes; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/core/service/reporting/ReportService.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.service.reporting; 5 | 6 | import fi.hsl.parkandride.core.domain.User; 7 | 8 | public interface ReportService { 9 | 10 | /** 11 | * Generates the Excel report and converts it to bytes. 12 | * Verifies that the current user has permission to generate reports. 13 | */ 14 | byte[] generateReport(User currentUser, ReportParameters reportParameters); 15 | 16 | /** 17 | * Get the name of the report this service produces. Names should be unique. 18 | * The name is used when querying for the report in the REST interface 19 | */ 20 | String reportName(); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/front/Credentials.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.front; 5 | 6 | public class Credentials { 7 | 8 | public String username; 9 | 10 | public String password; 11 | 12 | public String getUsername() { 13 | return username; 14 | } 15 | 16 | public String getPassword() { 17 | return password; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/front/DocsController.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.front; 5 | 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | import static org.springframework.web.bind.annotation.RequestMethod.GET; 10 | 11 | @Controller 12 | public class DocsController { 13 | 14 | @RequestMapping(value = UrlSchema.DOCS, method = GET) 15 | public String docs() { 16 | return "redirect:" + UrlSchema.DOCS + "/index.html"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/front/Features.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.front; 5 | 6 | import org.springframework.boot.context.properties.ConfigurationProperties; 7 | 8 | @ConfigurationProperties("feature") 9 | public class Features { 10 | 11 | private boolean dev; 12 | 13 | private boolean mapNoTiles; 14 | 15 | public boolean isDev() { 16 | return dev; 17 | } 18 | 19 | public void setDev(boolean dev) { 20 | this.dev = dev; 21 | } 22 | 23 | public boolean isMapNoTiles() { 24 | return mapNoTiles; 25 | } 26 | 27 | public void setMapNoTiles(boolean mapNoTiles) { 28 | this.mapNoTiles = mapNoTiles; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/front/FeaturesController.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.front; 5 | 6 | import static fi.hsl.parkandride.front.UrlSchema.FEATURES; 7 | import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; 8 | import static org.springframework.web.bind.annotation.RequestMethod.GET; 9 | 10 | import javax.inject.Inject; 11 | 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | @RestController 16 | public class FeaturesController { 17 | 18 | @Inject Features features; 19 | 20 | @RequestMapping(method = GET, value = FEATURES, produces = APPLICATION_JSON_VALUE) 21 | public Features getFeatures() { 22 | return features; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/front/IllegalHeaderException.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.front; 5 | 6 | public class IllegalHeaderException extends RuntimeException { 7 | 8 | public IllegalHeaderException(String message) { 9 | super(message); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/front/ValueHolder.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.front; 5 | 6 | /** 7 | * Wraps a value to JSON object for REST APIs. This is because the root of a JSON document 8 | * must be a JSON object or JSON array; primitive values are not valid and some JSON parsers 9 | * may not support them. 10 | */ 11 | public class ValueHolder { 12 | 13 | public ValueHolder() { 14 | } 15 | 16 | public ValueHolder(T t) { 17 | value = t; 18 | } 19 | 20 | public static ValueHolder of(T t) { 21 | return new ValueHolder<>(t); 22 | } 23 | 24 | public T value; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fi/hsl/parkandride/front/geojson/Feature.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.front.geojson; 5 | 6 | import java.util.Map; 7 | 8 | import org.geolatte.geom.Geometry; 9 | 10 | public class Feature { 11 | 12 | public Long id; 13 | 14 | public Geometry geometry; 15 | 16 | public Map properties; 17 | 18 | 19 | public Long getId() { 20 | return id; 21 | } 22 | 23 | public Geometry getGeometry() { 24 | return geometry; 25 | } 26 | 27 | public Map getProperties() { 28 | return properties; 29 | } 30 | 31 | public String getType() { 32 | return "Feature"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/geolatte/geom/GeometryEditor.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package org.geolatte.geom; 5 | 6 | import static com.google.common.base.Strings.isNullOrEmpty; 7 | 8 | import java.beans.PropertyEditorSupport; 9 | 10 | import fi.hsl.parkandride.core.domain.Spatial; 11 | 12 | public class GeometryEditor extends PropertyEditorSupport { 13 | 14 | @Override 15 | public String getAsText() { 16 | Geometry value = (Geometry) getValue(); 17 | if (value != null) { 18 | return Spatial.toWkt(value); 19 | } 20 | return null; 21 | } 22 | 23 | @Override 24 | public void setAsText(String text) throws IllegalArgumentException { 25 | if (!isNullOrEmpty(text)) { 26 | setValue(Spatial.fromWkt(text)); 27 | } else { 28 | setValue(null); 29 | } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/ValidationMessages.properties: -------------------------------------------------------------------------------- 1 | fi.hsl.parkandride.core.domain.validation.Coordinates.message=Coordinates out of allowed bounds: 19\u00B0 <= x/longitude <= 32\u00B0, 59.5\u00B0 <= y/latitude <= 70.5\u00B0. -------------------------------------------------------------------------------- /src/main/resources/application-ci.properties: -------------------------------------------------------------------------------- 1 | spring.profiles.include=dev_api 2 | feature.mapNoTiles=true 3 | -------------------------------------------------------------------------------- /src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | spring.profiles.include=dev_api 2 | feature.dev=true 3 | -------------------------------------------------------------------------------- /src/main/resources/application-dev_api.properties: -------------------------------------------------------------------------------- 1 | feature.dev=true 2 | -------------------------------------------------------------------------------- /src/main/resources/application-docker.properties: -------------------------------------------------------------------------------- 1 | psql.host=${env.PSQL_HOST} 2 | psql.username=${env.PSQL_USERNAME} 3 | psql.password=${env.PSQL_PASSWORD} 4 | security.token.secret=${env.SECURITY_TOKEN_SECRET} 5 | -------------------------------------------------------------------------------- /src/main/resources/application-psql.properties: -------------------------------------------------------------------------------- 1 | flyway.schemas=${psql.username} 2 | flyway.locations=${psql.flyway.locations} 3 | 4 | spring.datasource.username=${psql.username} 5 | spring.datasource.password=${psql.password} 6 | spring.datasource.url=${psql.url} 7 | spring.datasource.driver-class-name=${psql.driver} 8 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V11__regions.sql: -------------------------------------------------------------------------------- 1 | create table region ( 2 | id bigint not null, 3 | name_fi varchar(255) not null, 4 | name_sv varchar(255) not null, 5 | name_en varchar(255) not null, 6 | -- area -> V11_1__regions.sql 7 | 8 | primary key (id) 9 | ); -------------------------------------------------------------------------------- /src/main/resources/db/common/V12__users_and_operators.sql: -------------------------------------------------------------------------------- 1 | alter table app_user add column password_updated_timestamp timestamp default current_timestamp; 2 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V13__prediction_history.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE facility_prediction_history ( 2 | facility_id BIGINT NOT NULL, 3 | capacity_type VARCHAR(64) NOT NULL, 4 | usage VARCHAR(64) NOT NULL, 5 | ts TIMESTAMP NOT NULL, 6 | forecast_distance_in_minutes INT NOT NULL, 7 | spaces_available INT NOT NULL, 8 | 9 | PRIMARY KEY (facility_id, capacity_type, usage, forecast_distance_in_minutes, ts), 10 | 11 | CONSTRAINT facility_prediction_history_facility_id_fk FOREIGN KEY (facility_id) 12 | REFERENCES facility (id), 13 | 14 | CONSTRAINT facility_prediction_history_capacity_type_fk FOREIGN KEY (capacity_type) 15 | REFERENCES capacity_type (name), 16 | 17 | CONSTRAINT facility_prediction_history_usage_fk FOREIGN KEY (usage) 18 | REFERENCES usage (name) 19 | ); 20 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V15__request_logging.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE request_log_source ( 2 | id BIGINT NOT NULL, 3 | source VARCHAR(128) UNIQUE, 4 | PRIMARY KEY (id) 5 | ); 6 | 7 | CREATE TABLE request_log_url ( 8 | id BIGINT NOT NULL, 9 | url VARCHAR(128) UNIQUE, 10 | PRIMARY KEY (id) 11 | ); 12 | 13 | CREATE TABLE request_log ( 14 | source_id BIGINT NOT NULL, 15 | url_id BIGINT NOT NULL, 16 | ts TIMESTAMP NOT NULL, 17 | count BIGINT NOT NULL, 18 | 19 | PRIMARY KEY (source_id, url_id, ts), 20 | 21 | CONSTRAINT request_log_source_id FOREIGN KEY (source_id) 22 | REFERENCES request_log_source (id), 23 | 24 | CONSTRAINT request_log_url_id FOREIGN KEY (url_id) 25 | REFERENCES request_log_url (id) 26 | ); 27 | 28 | CREATE SEQUENCE request_log_source_id_seq INCREMENT BY 1 START WITH 1; 29 | CREATE SEQUENCE request_log_url_id_seq INCREMENT BY 1 START WITH 1; 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V16__facility_status_history.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE facility_status_history ( 2 | id BIGINT NOT NULL, 3 | facility_id BIGINT NOT NULL, 4 | 5 | status VARCHAR(64) NOT NULL, 6 | 7 | start_ts TIMESTAMP NOT NULL, 8 | end_ts TIMESTAMP, -- end date may be empty when still current 9 | 10 | status_description_fi VARCHAR(255), 11 | status_description_sv VARCHAR(255), 12 | status_description_en VARCHAR(255), 13 | 14 | PRIMARY KEY (id), 15 | 16 | CONSTRAINT status_history_facility_id_fk FOREIGN KEY (facility_id) 17 | REFERENCES facility (id) 18 | ); 19 | CREATE SEQUENCE facility_status_history_seq INCREMENT BY 1 START WITH 1; 20 | CREATE INDEX facility_status_history_status_idx ON facility_status_history (status); 21 | CREATE INDEX facility_status_history_start_idx ON facility_status_history (start_ts); 22 | CREATE INDEX facility_status_history_end_idx ON facility_status_history (end_ts); 23 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V18__facility_unavailable_capacity_history.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE unavailable_capacity_history ( 2 | capacity_history_id bigint not null, 3 | capacity_type VARCHAR(64) NOT NULL, 4 | usage VARCHAR(64) NOT NULL, 5 | capacity INT NOT NULL, 6 | 7 | PRIMARY KEY (capacity_history_id, capacity_type, usage), 8 | 9 | CONSTRAINT unavailable_capacity_history_id_fk FOREIGN KEY (capacity_history_id) 10 | REFERENCES facility_capacity_history (id), 11 | 12 | CONSTRAINT unavailable_capacity_history_usage_fk FOREIGN KEY (usage) 13 | REFERENCES usage (name), 14 | 15 | CONSTRAINT unavailable_capacity_history_capacity_type_fk FOREIGN KEY (capacity_type) 16 | REFERENCES capacity_type (name) 17 | ); 18 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V1__users_and_operators.sql: -------------------------------------------------------------------------------- 1 | create table operator ( 2 | id bigint not null, 3 | name_fi varchar(255) not null, 4 | name_sv varchar(255) not null, 5 | name_en varchar(255) not null, 6 | 7 | primary key (id) 8 | ); 9 | 10 | create sequence operator_id_seq increment by 1 start with 1; 11 | 12 | create table app_user ( 13 | id bigint not null, 14 | username varchar(255) not null, 15 | role varchar(32) not null, 16 | operator_id bigint, 17 | 18 | min_token_timestamp timestamp default current_timestamp, 19 | password varchar(128), 20 | 21 | primary key (id), 22 | 23 | constraint user_username_u unique (username), 24 | 25 | constraint user_operator_id_fk foreign key (operator_id) 26 | references operator (id) 27 | ); 28 | 29 | create sequence user_id_seq increment by 1 start with 1; 30 | 31 | create index app_user_operator_id_idx on app_user (operator_id); 32 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V20__cluster_mutex_lock.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE lock ( 2 | name VARCHAR(64) NOT NULL, 3 | owner VARCHAR(64) NOT NULL, 4 | valid_until TIMESTAMP NOT NULL, 5 | 6 | PRIMARY KEY (name) 7 | ); 8 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V22__utilization_index.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX facility_utilization_idx; 2 | CREATE INDEX facility_utilization_idx 3 | ON facility_utilization (facility_id, capacity_type, usage, ts); 4 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V5__hubs.sql: -------------------------------------------------------------------------------- 1 | create table hub ( 2 | id bigint not null, 3 | name_fi varchar(255) not null, 4 | name_sv varchar(255) not null, 5 | name_en varchar(255) not null, 6 | -- location -> V5_1__hubs.sql 7 | 8 | street_address_fi varchar(255), 9 | street_address_sv varchar(255), 10 | street_address_en varchar(255), 11 | 12 | postal_code varchar(5), 13 | 14 | city_fi varchar(255), 15 | city_sv varchar(255), 16 | city_en varchar(255), 17 | 18 | primary key (id) 19 | ); 20 | 21 | create sequence hub_id_seq increment by 1 start with 1; 22 | 23 | 24 | create table hub_facility ( 25 | hub_id bigint not null, 26 | facility_id bigint not null, 27 | 28 | primary key (hub_id, facility_id), 29 | 30 | constraint hub_facility_hub_id_fk foreign key (hub_id) 31 | references hub (id) 32 | ); 33 | 34 | create index hub_facility_facility_id_idx on hub_facility (facility_id); 35 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V7__dummy_data.sql: -------------------------------------------------------------------------------- 1 | 2 | insert into app_user (id, username, role, password) 3 | values (nextval('user_id_seq'), 'admin', 'ADMIN', '62R8AvTSPXWn2U0x8cnUhB/DKKVYPjFnQlFk8yVJhPl/fcB1GI1JINEewCNPfS9J'); 4 | 5 | insert into operator (id, name_fi, name_sv, name_en) 6 | values (nextval('operator_id_seq'), 'X-Park', 'X-Park', 'X-Park'); 7 | 8 | insert into app_user (id, username, role, operator_id, password) 9 | values (nextval('user_id_seq'), 'operator', 'OPERATOR', 1, 'rxHAdPM+iHVDY4OUfyVYPik9/z7Y7zoR4Q+Co/qHw+rGKyJPxcYSaATgoNJ5KRHW'); 10 | 11 | insert into contact (id, name_fi, name_sv, name_en, phone) 12 | values (nextval('contact_id_seq'), 'test', 'test', 'test', '09123456'); 13 | -------------------------------------------------------------------------------- /src/main/resources/db/common/V9__rename_usage_enums.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO usage VALUES ('HSL_TRAVEL_CARD'); 2 | 3 | UPDATE facility_utilization 4 | SET usage = 'HSL_TRAVEL_CARD' 5 | WHERE usage = 'HSL'; 6 | 7 | UPDATE pricing 8 | SET usage = 'HSL_TRAVEL_CARD' 9 | WHERE usage = 'HSL'; 10 | 11 | UPDATE unavailable_capacity 12 | SET usage = 'HSL_TRAVEL_CARD' 13 | WHERE usage = 'HSL'; 14 | 15 | UPDATE facility_prediction 16 | SET usage = 'HSL_TRAVEL_CARD' 17 | WHERE usage = 'HSL'; 18 | 19 | DELETE FROM usage 20 | WHERE name = 'HSL'; 21 | -------------------------------------------------------------------------------- /src/main/resources/db/h2/V0__initialize_h2.sql: -------------------------------------------------------------------------------- 1 | CREATE ALIAS IF NOT EXISTS SPATIAL_INIT FOR "org.h2gis.h2spatialext.CreateSpatialExtension.initSpatialExtension"; 2 | CALL SPATIAL_INIT(); 3 | -------------------------------------------------------------------------------- /src/main/resources/db/h2/V21__utilization_capacity.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE facility_utilization 2 | ADD COLUMN capacity INT NOT NULL; 3 | -------------------------------------------------------------------------------- /src/main/resources/db/h2/V4_1__facilities.sql: -------------------------------------------------------------------------------- 1 | alter table facility add column location geometry not null; 2 | 3 | alter table port add column location geometry not null; 4 | -------------------------------------------------------------------------------- /src/main/resources/db/h2/V5_1__hubs.sql: -------------------------------------------------------------------------------- 1 | alter table hub add column location geometry not null; 2 | -------------------------------------------------------------------------------- /src/main/resources/db/psql/V19__fixPornainen.sql: -------------------------------------------------------------------------------- 1 | -- No-op -------------------------------------------------------------------------------- /src/main/resources/db/psql/V21__utilization_capacity.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE facility_utilization 2 | ADD COLUMN capacity INT; 3 | 4 | -- initialize capacity based on facility_capacity_history (only for cars; the others don't have production data) 5 | UPDATE facility_utilization u 6 | SET capacity = h.capacity_car 7 | FROM facility_capacity_history h 8 | WHERE u.facility_id = h.facility_id 9 | AND u.ts >= h.start_ts 10 | AND (u.ts < h.end_ts OR h.end_ts IS NULL) 11 | AND u.capacity_type = 'CAR'; 12 | 13 | -- initialize NULLs and fix too small capacities 14 | UPDATE facility_utilization 15 | SET capacity = greatest(capacity, spaces_available); 16 | 17 | ALTER TABLE facility_utilization 18 | ALTER COLUMN capacity SET NOT NULL; 19 | -------------------------------------------------------------------------------- /src/main/resources/db/psql/V4_1__facilities.sql: -------------------------------------------------------------------------------- 1 | alter table facility add column location geography(POLYGON, 4326) not null; 2 | 3 | alter table port add column location geography(POINT, 4326) not null; 4 | 5 | create index facility_location_gist ON facility USING GIST ( location ); 6 | -------------------------------------------------------------------------------- /src/main/resources/db/psql/V5_1__hubs.sql: -------------------------------------------------------------------------------- 1 | alter table hub add column location geography(POINT, 4326) not null; 2 | 3 | create index hub_location_gist ON hub USING GIST ( location ); 4 | -------------------------------------------------------------------------------- /src/main/resources/db/psql/V6__unique_names_psql.sql: -------------------------------------------------------------------------------- 1 | create unique index operator_name_fi_u on operator (lower(name_fi)); 2 | create unique index operator_name_sv_u on operator (lower(name_sv)); 3 | create unique index operator_name_en_u on operator (lower(name_en)); 4 | 5 | create unique index contact_name_fi_u on contact (lower(name_fi)); 6 | create unique index contact_name_sv_u on contact (lower(name_sv)); 7 | create unique index contact_name_en_u on contact (lower(name_en)); 8 | 9 | create unique index facility_name_fi_u on facility (lower(name_fi)); 10 | create unique index facility_name_sv_u on facility (lower(name_sv)); 11 | create unique index facility_name_en_u on facility (lower(name_en)); 12 | 13 | create unique index hub_name_fi_u on hub (lower(name_fi)); 14 | create unique index hub_name_sv_u on hub (lower(name_sv)); 15 | create unique index hub_name_en_u on hub (lower(name_en)); 16 | -------------------------------------------------------------------------------- /src/main/resources/logback-appenderConsole.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | UTF-8 10 | ${LOG_PATTERN} 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/logback-logging.profile_IS_UNDEFINED.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/public/index.html: -------------------------------------------------------------------------------- 1 | Liipi API 2 | -------------------------------------------------------------------------------- /src/test/java/fi/hsl/parkandride/DevApiProfileAppender.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride; 5 | 6 | public class DevApiProfileAppender extends ActiveProfileAppender { 7 | public DevApiProfileAppender() { 8 | super(FeatureProfile.DEV_API); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/test/java/fi/hsl/parkandride/back/DaoTestApplication.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.back; 5 | 6 | import fi.hsl.parkandride.config.CoreConfiguration; 7 | import fi.hsl.parkandride.config.TestConfiguration; 8 | import fi.hsl.parkandride.dev.DevHelper; 9 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 10 | import org.springframework.context.annotation.ComponentScan; 11 | import org.springframework.context.annotation.Configuration; 12 | import org.springframework.context.annotation.Import; 13 | import org.springframework.transaction.annotation.EnableTransactionManagement; 14 | 15 | @Configuration 16 | @EnableAutoConfiguration 17 | @Import({CoreConfiguration.class, TestConfiguration.class}) 18 | @ComponentScan(basePackageClasses = DevHelper.class) 19 | @EnableTransactionManagement(proxyTargetClass = true) 20 | public class DaoTestApplication { 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/fi/hsl/parkandride/core/domain/FacilityCapacityTest.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import nl.jqno.equalsverifier.EqualsVerifier; 7 | import org.junit.Test; 8 | 9 | public class FacilityCapacityTest { 10 | 11 | @Test 12 | public void equalsAndHashcode() { 13 | EqualsVerifier.forClass(FacilityCapacity.class).allFieldsShouldBeUsed().verify(); 14 | } 15 | } -------------------------------------------------------------------------------- /src/test/java/fi/hsl/parkandride/core/domain/PricingTest.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.domain; 5 | 6 | import static org.assertj.core.api.Assertions.assertThat; 7 | 8 | import org.junit.Test; 9 | 10 | public class PricingTest { 11 | 12 | @Test 13 | public void all_nulls() { 14 | assertThat(Pricing.COMPARATOR.compare(new Pricing(), new Pricing())).isEqualTo(0); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/test/java/fi/hsl/parkandride/core/service/ValidationExceptionTest.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.core.service; 5 | 6 | import fi.hsl.parkandride.core.domain.Violation; 7 | import org.junit.Test; 8 | 9 | import java.util.Arrays; 10 | import java.util.List; 11 | 12 | import static org.assertj.core.api.Assertions.assertThat; 13 | 14 | public class ValidationExceptionTest { 15 | 16 | @Test 17 | public void exception_message_contains_all_violation_messages() { 18 | List violations = Arrays.asList( 19 | new Violation("Type1", "path.one", ""), 20 | new Violation("Type2", "path.two", "") 21 | ); 22 | 23 | assertThat(new ValidationException(violations).getMessage()).isEqualTo("Invalid data. Violations in path.one (Type1), path.two (Type2)"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/fi/hsl/parkandride/itest/JSONObjectBuilder.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2016 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.itest; 5 | 6 | import org.json.simple.JSONArray; 7 | import org.json.simple.JSONObject; 8 | 9 | public class JSONObjectBuilder { 10 | public final JSONObject jsonObject; 11 | 12 | public JSONObjectBuilder() { 13 | jsonObject = new JSONObject(); 14 | } 15 | 16 | public JSONObjectBuilder put(Object key, Object value) { 17 | jsonObject.put(key, value); 18 | return this; 19 | } 20 | 21 | public JSONObjectBuilder remove(Object key) { 22 | jsonObject.remove(key); 23 | return this; 24 | } 25 | 26 | public JSONArray asArray() { 27 | final JSONArray jsonArray = new JSONArray(); 28 | jsonArray.add(jsonObject); 29 | return jsonArray; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/fi/hsl/parkandride/test/DateTimeTestUtils.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.test; 5 | 6 | import org.joda.time.DateTime; 7 | import org.joda.time.DateTimeUtils; 8 | 9 | import java.util.function.Supplier; 10 | 11 | public final class DateTimeTestUtils { 12 | private DateTimeTestUtils() { /** prevent instantiation */} 13 | 14 | public static V withDate(DateTime date, Supplier r) { 15 | DateTimeUtils.setCurrentMillisFixed(date.getMillis()); 16 | final V v = r.get(); 17 | DateTimeUtils.setCurrentMillisSystem(); 18 | return v; 19 | } 20 | 21 | public static void withDate(DateTime date, Runnable r) { 22 | withDate(date, () -> { 23 | r.run(); 24 | return null; 25 | }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/test/java/fi/hsl/parkandride/util/IteratorsTest.java: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | package fi.hsl.parkandride.util; 5 | 6 | import com.google.common.collect.Lists; 7 | import org.junit.Test; 8 | 9 | import java.util.List; 10 | 11 | import static fi.hsl.parkandride.util.Iterators.iterateFor; 12 | import static org.assertj.core.api.Assertions.assertThat; 13 | 14 | public class IteratorsTest { 15 | 16 | @Test 17 | public void testIterateFor() { 18 | final List listOfIntegers = Lists.newArrayList(iterateFor(0, i -> i < 5, i -> i + 1)); 19 | assertThat(listOfIntegers).containsExactly(0,1,2,3,4); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /src/test/resources/facility.create.JsonMappingException.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "non-numeric capacity value causes JsonMappingException", 3 | "location": { 4 | "bbox": [24.807768741075638, 60.16837631366566, 24.80811206382954, 60.16868052638392], 5 | "type": "Polygon", 6 | "coordinates": [ 7 | [ 8 | [24.807768741075638, 60.16866985230115], 9 | [24.80781165641989, 60.16837631366566], 10 | [24.80811206382954, 60.16839232493162], 11 | [24.808069148485306, 60.16868052638392], 12 | [24.807768741075638, 60.16866985230115] 13 | ] 14 | ] 15 | }, 16 | "builtCapacity": { 17 | "CAR": "abc" 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/.dockerignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /screenshots/ 3 | /node/ 4 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /screenshots/ 3 | /node/ 4 | -------------------------------------------------------------------------------- /test/Dockerfile-test: -------------------------------------------------------------------------------- 1 | FROM mrsheepuk/protractor:latest 2 | 3 | COPY --chown=node . /project 4 | -------------------------------------------------------------------------------- /test/fixtures/facilityFactory.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = function () { 4 | var _ = require('lodash'); 5 | var idGen = 1000; 6 | 7 | var fromName = function(creatorFn, name) { 8 | var o = creatorFn(); 9 | o.name = name; 10 | o.id = idGen++; 11 | return o; 12 | }; 13 | 14 | var self = {}; 15 | 16 | self.facilitiesFromProto = function(proto, names) { 17 | return self.facilitiesFromCreator(function() { return proto.copy(); }, names); 18 | }; 19 | 20 | self.facilitiesFromCreator = function(creatorFn, names) { 21 | var namesShuffled = _.shuffle(names); 22 | return _.map(namesShuffled, _.partial(fromName, creatorFn)); 23 | }; 24 | 25 | return self; 26 | }; -------------------------------------------------------------------------------- /test/fixtures/fixtures.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports.facility = require('./facility'); 4 | module.exports.facilityFactory = require('./facilityFactory')(); 5 | module.exports.hub= require('./hub.js'); 6 | module.exports.hubFactory= require('./hubFactory')(); 7 | module.exports.facilitiesFixture = require('./facilities.fixture')(); 8 | module.exports.hubsFixture = require('./hubs.fixture')(); -------------------------------------------------------------------------------- /test/fixtures/hub.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function hub(data) { 4 | var _ = require('lodash'); 5 | var self = data || {}; 6 | 7 | self.copy = function() { 8 | var copy = hub(_.cloneDeep(self)); 9 | copy.setFacilities(_.map(copy.facilities, function(facility) { return facility.copy(); })); 10 | return copy; 11 | }; 12 | 13 | self.setFacilities = function(facilities) { 14 | self.facilities = facilities; 15 | self.facilityIds = _.map(facilities, function (f) { return f.id; }) 16 | }; 17 | 18 | self.toPayload = function() { 19 | var payload = self.copy(); 20 | var skipFields = ['facilities']; 21 | _.forEach(skipFields, function(field) { delete payload[field]; }); 22 | return payload; 23 | }; 24 | 25 | return self; 26 | }; 27 | 28 | module.exports = hub; -------------------------------------------------------------------------------- /test/fixtures/hubFactory.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = function () { 4 | var _ = require('lodash'); 5 | var idGen = 1000; 6 | 7 | var fromName = function(creatorFn, name) { 8 | var o = creatorFn(); 9 | o.name = name; 10 | o.id = idGen++; 11 | return o; 12 | }; 13 | 14 | var self = {}; 15 | 16 | self.hubsFromProto = function(proto, names) { 17 | var namesShuffled = _.shuffle(names); 18 | var creatorFn = function() { return proto.copy(); }; 19 | return _.map(namesShuffled, _.partial(fromName, creatorFn)); 20 | }; 21 | 22 | return self; 23 | }; -------------------------------------------------------------------------------- /test/liipi-test.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "devDependencies": { 4 | "jasmine-reporters": "1.0.1", 5 | "lodash": "2.4.1", 6 | "protractor": "5.3.2", 7 | "protractor-html-screenshot-reporter": "0.0.17", 8 | "protractor-linkuisref-locator": "1.0.0", 9 | "request": "2.47.0", 10 | "webdriver-manager": "12.1.0" 11 | }, 12 | "dependencies": { 13 | "moment": "^2.10.6" 14 | }, 15 | "scripts": { 16 | "test": "protractor --baseUrl http://localhost:8080", 17 | "webdriver-update": "webdriver-manager update", 18 | "webdriver-start": "webdriver-manager start" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/pageobjects/components/components.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports.uiSelect = require('./uiSelect'); 4 | module.exports.datepicker = require('./datepicker'); 5 | module.exports.sweetAlert = require('./sweetAlert'); 6 | -------------------------------------------------------------------------------- /test/pageobjects/components/sweetAlert.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = function (spec) { 4 | spec = spec || {}; 5 | 6 | var _ = require('lodash'); 7 | var that = require('../base')(spec); 8 | 9 | spec.view = $('.sweet-alert'); 10 | spec.confirmButton = spec.view.$('.confirm'); 11 | spec.cancelButton = spec.view.$('.cancel'); 12 | 13 | that.confirm = function() { 14 | spec.ensureIsPresent(spec.confirmButton).click(); 15 | }; 16 | 17 | that.cancel = function() { 18 | spec.ensureIsPresent(spec.cancelButton).click(); 19 | }; 20 | 21 | return that; 22 | }; -------------------------------------------------------------------------------- /test/pageobjects/devPage.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function () { 4 | return { 5 | resetAll: function () { 6 | browser.get('/#/dev'); 7 | element(by.id('wdDevResetAll')).click(); 8 | } 9 | }; 10 | }; 11 | -------------------------------------------------------------------------------- /test/pageobjects/indexPage.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(spec) { 4 | var that = require('./base')(spec); 5 | 6 | spec.view = element(by.cssContainingText('h2', 'Pysäköintipaikat')); 7 | 8 | that.get = function () { 9 | browser.get('/'); 10 | }; 11 | 12 | return that; 13 | }; 14 | -------------------------------------------------------------------------------- /test/pageobjects/operators/operatorEditModal.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(spec) { 4 | spec = spec || {}; 5 | var that = require('../base')(spec); 6 | 7 | spec.view = $("#operatorEditModal"); 8 | spec.ok = $("#wdOperatorOk"); 9 | spec.cancel = $("#wdOperatorCancel"); 10 | 11 | spec.context = spec.view; 12 | spec.defineMultilingualAccessors("name"); 13 | 14 | that.save = function() { 15 | spec.ok.click(); 16 | browser.waitForAngular(); 17 | }; 18 | 19 | that.cancel = function() { 20 | spec.cancel.click(); 21 | browser.waitForAngular(); 22 | }; 23 | 24 | return that; 25 | }; -------------------------------------------------------------------------------- /test/pageobjects/pageobjects.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports.menu = require('./menu'); 4 | module.exports.indexPage = require('./indexPage'); 5 | module.exports.devPage = require('./devPage'); 6 | 7 | module.exports.authModal = require('./auth/authModal'); 8 | 9 | module.exports.operatorPage = require('./operators/operatorPage'); 10 | module.exports.contactPage = require('./contacts/contactPage'); 11 | module.exports.usersPage = require('./users/usersPage'); 12 | module.exports.reportsPage = require('./users/reportsPage'); 13 | 14 | module.exports.facilityEditPage = require('./facilities/facilityEditPage'); 15 | module.exports.facilityViewPage = require('./facilities/facilityViewPage'); 16 | 17 | module.exports.hubListPage = require('./hubs/hubListPage'); 18 | module.exports.hubEditPage = require('./hubs/hubEditPage'); 19 | module.exports.hubViewPage = require('./hubs/hubViewPage'); 20 | -------------------------------------------------------------------------------- /validate-commit-message.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Git COMMIT-MSG hook for validating commit message 4 | #See https://docs.google.com/document/d/1rk04jEuGfk9kYzfqCuOlPTSJw3hEDZJTBN5E5f1SALo/edit 5 | 6 | MESSAGE=`head -n 1 "$1"` 7 | 8 | MAX_LENGTH=70 9 | TYPES="chore demo docs feat fix refactor revert style test" 10 | PATTERN="^([a-z]+)\([a-z\-\*]+\)\:\ (.*)$" 11 | 12 | if [[ ${#MESSAGE} > $MAX_LENGTH ]]; then 13 | echo "ERROR: Commit message was ${#MESSAGE} characters long, but should be at most $MAX_LENGTH characters" 14 | exit 1 15 | fi 16 | 17 | if [[ "$MESSAGE" =~ ^WIP ]]; then 18 | exit 0 19 | fi 20 | 21 | if ! [[ "$MESSAGE" =~ $PATTERN ]]; then 22 | echo "ERROR: Commit message did not match 'type(scope): subject'" 23 | exit 1 24 | fi 25 | TYPE=${BASH_REMATCH[1]} 26 | 27 | if ! [[ $TYPES =~ (^| )$TYPE($| ) ]]; then 28 | echo "ERROR: Commit message's type '$TYPE' must be one of '$TYPES'" 29 | exit 1 30 | fi 31 | -------------------------------------------------------------------------------- /web/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "vendor", 3 | "json": "bower.json" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /web/.dockerignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /build/ 3 | /node_modules/ 4 | /vendor 5 | /*.log 6 | -------------------------------------------------------------------------------- /web/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /build/ 3 | /node_modules/ 4 | /vendor 5 | /*.log 6 | 7 | -------------------------------------------------------------------------------- /web/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "parkandrideAPI", 3 | "version": "0.0.2-SNAPSHOT", 4 | "devDependencies": { 5 | "angular": "~1.4", 6 | "angular-mocks": "~1.4", 7 | "angular-i18n": "~1.4", 8 | "angular-sanitize": "~1.4", 9 | "angular-bootstrap": "~0.14.0", 10 | "angular-ui-router": "~0.2", 11 | "angular-ui-utils": "src0.1.1", 12 | "angular-ui-select": "0.10.0", 13 | "angular-translate": "~2.8", 14 | "angular-translate-loader-static-files": "~2.8", 15 | "bootstrap-sass-official": "3.2.0", 16 | "font-awesome": "4.2.0", 17 | "lodash": "3.3.0", 18 | "file-saver-saveas-js": "1.20150304.1", 19 | "openlayers3": "https://github.com/openlayers/ol3/releases/download/v3.2.1/v3.2.1.zip", 20 | "sweetalert2": "0.1.8" 21 | }, 22 | "dependencies": {}, 23 | "resolutions": { 24 | "angular-translate": "~2.8.1", 25 | "angular": "~1.4" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /web/changelog.tpl: -------------------------------------------------------------------------------- 1 | 2 | # <%= version%> (<%= today%>) 3 | 4 | <% if (_(changelog.feat).size() > 0) { %> ## Features 5 | <% _(changelog.feat).forEach(function(changes, scope) { %> 6 | - **<%= scope%>:** 7 | <% changes.forEach(function(change) { %> - <%= change.msg%> (<%= helpers.commitLink(change.sha1) %>) 8 | <% }); %> 9 | <% }); %> <% } %> 10 | 11 | <% if (_(changelog.fix).size() > 0) { %> ## Fixes 12 | <% _(changelog.fix).forEach(function(changes, scope) { %> 13 | - **<%= scope%>:** 14 | <% changes.forEach(function(change) { %> - <%= change.msg%> (<%= helpers.commitLink(change.sha1) %>) 15 | <% }); %> 16 | <% }); %> <% } %> 17 | 18 | <% if (_(changelog.breaking).size() > 0) { %> ## Breaking Changes 19 | <% _(changelog.breaking).forEach(function(changes, scope) { %> 20 | - **<%= scope%>:** 21 | <% changes.forEach(function(change) { %> <%= change.msg%> 22 | <% }); %> 23 | <% }); %> <% } %> 24 | -------------------------------------------------------------------------------- /web/docker/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -eu 3 | 4 | envsubst '${API_URL}' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf 5 | 6 | exec "$@" 7 | -------------------------------------------------------------------------------- /web/liipi-web.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /web/module.prefix: -------------------------------------------------------------------------------- 1 | (function ( window, angular, undefined ) { 2 | -------------------------------------------------------------------------------- /web/module.suffix: -------------------------------------------------------------------------------- 1 | })( window, window.angular ); 2 | -------------------------------------------------------------------------------- /web/src/app/about/about-en.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2017 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | (function () { 5 | var m = angular.module('parkandride.about-en', []); 6 | 7 | m.config(function config($stateProvider) { 8 | $stateProvider.state('about-en-page', { 9 | parent: 'abouttab', 10 | url: '/about-en', 11 | views: { 12 | "main": { 13 | templateUrl: 'about/about-en.tpl.html' 14 | } 15 | }, 16 | data: {pageTitle: 'About'} 17 | }); 18 | }); 19 | 20 | })(); 21 | -------------------------------------------------------------------------------- /web/src/app/about/about.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | (function () { 5 | var m = angular.module('parkandride.about', []); 6 | 7 | m.config(function config($stateProvider) { 8 | $stateProvider.state('about-page', { 9 | parent: 'abouttab', 10 | url: '/about', 11 | views: { 12 | "main": { 13 | templateUrl: 'about/about.tpl.html' 14 | } 15 | }, 16 | data: {pageTitle: 'About'} 17 | }); 18 | }); 19 | 20 | })(); 21 | -------------------------------------------------------------------------------- /web/src/app/about/about.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{ "about.title" | translate }} 3 | 4 | 5 |
6 |

7 |
    8 |
  • 9 |
  • 10 |
  • 11 |
  • 12 |
13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /web/src/app/app.spec.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | describe( 'AppCtrl', function() { 5 | describe( 'isCurrentUrl', function() { 6 | var AppCtrl, $location, $scope; 7 | 8 | beforeEach( module( 'parkandride' ) ); 9 | 10 | beforeEach( inject( function( $controller, _$location_, $rootScope ) { 11 | $location = _$location_; 12 | $scope = $rootScope.$new(); 13 | AppCtrl = $controller( 'AppCtrl', { $location: $location, $scope: $scope }); 14 | })); 15 | 16 | it( 'should pass a dummy test', inject( function() { 17 | expect( AppCtrl ).toBeTruthy(); 18 | })); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /web/src/app/auth/passwordReminderModal.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 6 | 11 | 12 | 17 |
18 | -------------------------------------------------------------------------------- /web/src/app/components/violations/violations.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ ctrl.getLabel(violation) | translate }}: 4 | 5 |
6 |
7 | -------------------------------------------------------------------------------- /web/src/app/contacts/contactListNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{'contacts.action.new' | translate }} 3 | 4 | -------------------------------------------------------------------------------- /web/src/app/dev/dev.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 19 |
20 | -------------------------------------------------------------------------------- /web/src/app/facilities/capacitiesList.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{capacity.label}}{{!$last ? ',' : ''}} 3 | 4 | -------------------------------------------------------------------------------- /web/src/app/facilities/capacitiesTable.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 |
{{capacityType.label}} 13 | {{capacities[capacityType.id]}} 14 |
18 |
19 | -------------------------------------------------------------------------------- /web/src/app/facilities/facilitiesTable.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | (function() { 5 | var m = angular.module('parkandride.facilitiesTable', [ 6 | 'parkandride.i18n', 7 | 'parkandride.capacities', 8 | 'parkandride.usages' 9 | ]); 10 | 11 | m.directive('facilitiesTable', function () { 12 | return { 13 | restrict: 'E', 14 | scope: { 15 | facilities: '=' 16 | }, 17 | templateUrl: 'facilities/facilitiesTable.tpl.html', 18 | transclude: false, 19 | link: function(scope) { 20 | scope.thereAreFacilities = function() { 21 | return !_.isEmpty(scope.facilities); 22 | }; 23 | } 24 | }; 25 | }); 26 | })(); -------------------------------------------------------------------------------- /web/src/app/facilities/facilitiesTable.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
{{f.name.fi}}{{ "facilityStatuses." + f.status + ".label" | translate }}
20 |
21 | -------------------------------------------------------------------------------- /web/src/app/facilities/facilityEditNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{'common.action.cancel' | translate }} 3 | 4 | 5 | {{'common.action.cancel' | translate }} 6 | 7 | 9 | {{'common.action.save' | translate }} 10 | 11 | -------------------------------------------------------------------------------- /web/src/app/facilities/facilityViewNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{ 'common.action.back' | translate }} 3 | 4 | 6 | {{ 'common.action.edit' | translate }} 7 | 8 | -------------------------------------------------------------------------------- /web/src/app/facilities/searchDemoNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | Search 3 | 4 | -------------------------------------------------------------------------------- /web/src/app/facilities/usages.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | (function() { 5 | var m = angular.module('parkandride.usages', []); 6 | 7 | m.directive('usagesList', function (schema) { 8 | return { 9 | restrict: 'E', 10 | scope: { 11 | usages: '=' 12 | }, 13 | templateUrl: 'facilities/usagesList.tpl.html', 14 | transclude: false, 15 | link: function(scope) { 16 | scope.usagesList = []; 17 | _.forEach(scope.usages, function(usage) { 18 | scope.usagesList.push(schema.usages[usage]); 19 | }); 20 | } 21 | }; 22 | }); 23 | })(); -------------------------------------------------------------------------------- /web/src/app/facilities/usagesList.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{usage.label}}{{!$last ? ',' : ''}} 3 | 4 | -------------------------------------------------------------------------------- /web/src/app/hubs/hubEditNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{'common.action.cancel' | translate }} 3 | 4 | 5 | {{'common.action.cancel' | translate }} 6 | 7 | 9 | {{'common.action.save' | translate }} 10 | 11 | -------------------------------------------------------------------------------- /web/src/app/hubs/hubListNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{ 'facilities.action.new' | translate }} 3 | 4 | 5 | {{ 'hubs.action.new' | translate }} 6 | 7 | -------------------------------------------------------------------------------- /web/src/app/hubs/hubViewNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{ 'common.action.back' | translate }} 3 | 4 | 5 | {{ 'common.action.edit' | translate }} 6 | 7 | -------------------------------------------------------------------------------- /web/src/app/layout/mainLayout.tpl.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 |
15 | 16 | 25 | -------------------------------------------------------------------------------- /web/src/app/operators/operatorListNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{'operators.action.new' | translate }} 3 | 4 | -------------------------------------------------------------------------------- /web/src/app/reports/reportsNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{'reports.do' | translate }} 3 | 4 | -------------------------------------------------------------------------------- /web/src/app/users/userList.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | (function() { 5 | var m = angular.module('parkandride.users.userList', [ 6 | 'parkandride.users.userListRow', 7 | 'parkandride.i18n' 8 | ]); 9 | 10 | m.directive('userList', function() { 11 | return { 12 | restrict: 'E', 13 | scope: { 14 | users: '=' 15 | }, 16 | bindToController: true, 17 | controller: 'UserListCtrl', 18 | controllerAs: 'ctrl', 19 | templateUrl: 'users/userList.tpl.html', 20 | replace: true 21 | }; 22 | }); 23 | 24 | m.controller('UserListCtrl', function() {}); 25 | })(); 26 | -------------------------------------------------------------------------------- /web/src/app/users/userList.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 |
{{ "users.username.label" | translate }}{{ "users.operator.label" | translate }}{{ "users.role.label" | translate }}{{ "users.listActions.label" | translate }}
15 | -------------------------------------------------------------------------------- /web/src/app/users/userListRow.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{ ctrl.user.username }} 3 | 4 | {{ ctrl.user.operatorNameFi }} 5 | {{ "roles." + ctrl.user.role + ".label" | translate }} 6 | 7 | 8 | {{ "users.listActions.updatePass.label" | translate }} 9 | {{ "users.listActions.updateToken.label" | translate }} 10 | 11 | 12 | {{ "users.listActions.remove.label" | translate }} 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/src/app/users/users.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{ "users.title" | translate }} 3 | 4 | 5 |
6 |

{{ "users.help.summary" | translate }}

7 |
    8 |
  • {{ "users.help.bullet1" | translate }}
  • 9 |
  • {{ "users.help.bullet2" | translate }}
  • 10 |
  • {{ "users.help.bullet3" | translate }}
  • 11 |
  • {{ "users.help.bullet4" | translate }}
  • 12 |
13 |
14 |
15 | 16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /web/src/app/users/usersNavi.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | {{'users.action.new' | translate }} 3 | 4 | -------------------------------------------------------------------------------- /web/src/assets/README.md: -------------------------------------------------------------------------------- 1 | # The `src/assets` Directory 2 | 3 | There's really not much to say here. Every file in this directory is recursively transferred to `dist/assets/`. 4 | 5 | -------------------------------------------------------------------------------- /web/src/assets/datamodel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/datamodel.png -------------------------------------------------------------------------------- /web/src/assets/hsl-liipi-logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/hsl-liipi-logo2.png -------------------------------------------------------------------------------- /web/src/assets/karttakuva.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/karttakuva.png -------------------------------------------------------------------------------- /web/src/assets/ports/entry-exit-nopedestrian-bicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/entry-exit-nopedestrian-bicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/entry-exit-nopedestrian-nobicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/entry-exit-nopedestrian-nobicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/entry-exit-pedestrian-bicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/entry-exit-pedestrian-bicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/entry-exit-pedestrian-nobicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/entry-exit-pedestrian-nobicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/entry-noexit-nopedestrian-bicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/entry-noexit-nopedestrian-bicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/entry-noexit-nopedestrian-nobicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/entry-noexit-nopedestrian-nobicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/entry-noexit-pedestrian-bicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/entry-noexit-pedestrian-bicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/entry-noexit-pedestrian-nobicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/entry-noexit-pedestrian-nobicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/noentry-exit-nopedestrian-bicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/noentry-exit-nopedestrian-bicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/noentry-exit-nopedestrian-nobicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/noentry-exit-nopedestrian-nobicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/noentry-exit-pedestrian-bicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/noentry-exit-pedestrian-bicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/noentry-exit-pedestrian-nobicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/noentry-exit-pedestrian-nobicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/noentry-noexit-nopedestrian-bicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/noentry-noexit-nopedestrian-bicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/noentry-noexit-nopedestrian-nobicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/noentry-noexit-nopedestrian-nobicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/noentry-noexit-pedestrian-bicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/noentry-noexit-pedestrian-bicycle.gif -------------------------------------------------------------------------------- /web/src/assets/ports/noentry-noexit-pedestrian-nobicycle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HSLdevcom/parkandrideAPI/822908770467af1aa301acdc6121e973af6ad743/web/src/assets/ports/noentry-noexit-pedestrian-nobicycle.gif -------------------------------------------------------------------------------- /web/src/common/directives/address.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | (function() { 5 | var m = angular.module('parkandride.address', []); 6 | 7 | m.directive('addressEdit', function () { 8 | return { 9 | restrict: 'E', 10 | require: 'ngModel', 11 | scope: { 12 | address: '=ngModel', 13 | path: '@' 14 | }, 15 | templateUrl: 'directives/addressEdit.tpl.html', 16 | transclude: false 17 | }; 18 | }); 19 | 20 | m.directive('addressView', function () { 21 | return { 22 | restrict: 'E', 23 | scope: { 24 | address: '=' 25 | }, 26 | templateUrl: 'directives/addressView.tpl.html', 27 | transclude: false 28 | }; 29 | }); 30 | })(); 31 | -------------------------------------------------------------------------------- /web/src/common/directives/addressEdit.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 |
7 | 8 |
9 |
10 |
11 | 12 |
13 | 14 |
15 |
16 |
17 |
18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 | -------------------------------------------------------------------------------- /web/src/common/directives/addressView.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 |

{{address.postalCode}}

7 |
8 |
9 |

{{address.postalCode}}

10 |
11 |
12 |

{{address.postalCode}}

13 |
14 |
15 |
16 | 17 |
18 | -------------------------------------------------------------------------------- /web/src/common/directives/multilingualView.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |

({{ "common.lang.fi" | translate }})

3 |
4 |
5 |

({{ "common.lang.sv" | translate }})

6 |
7 |
8 |

({{ "common.lang.en" | translate }})

9 |
10 | -------------------------------------------------------------------------------- /web/src/common/directives/tags.tpl.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/common/filters/filters.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | angular.module('filters', []) 5 | .filter('joinBy', function () { 6 | return function (input,delimiter) { 7 | return (input || []).join(delimiter || ','); 8 | }; 9 | }); 10 | -------------------------------------------------------------------------------- /web/src/common/services/RegionResource.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | (function() { 5 | var m = angular.module('parkandride.RegionResource', []); 6 | 7 | m.factory('RegionResource', function($http) { 8 | var api = {}; 9 | 10 | api.listRegions = function() { 11 | return $http.get('api/v1/regions').then(function(response) { 12 | return response.data; 13 | }); 14 | }; 15 | 16 | api.listRegionsWithHubs = function() { 17 | return $http.get('api/v1/regions/withHubs').then(function(response) { 18 | return response.data; 19 | }); 20 | }; 21 | 22 | return api; 23 | }); 24 | 25 | })(); -------------------------------------------------------------------------------- /web/src/common/services/Sequence.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | (function() { 5 | var m = angular.module('parkandride.Sequence', []); 6 | 7 | var seq=0; 8 | m.value('Sequence', { 9 | nextval: function() { 10 | return ++seq; 11 | } 12 | }); 13 | })(); 14 | -------------------------------------------------------------------------------- /web/src/common/services/i18n.js: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 HSL 2 | // This program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses. 3 | 4 | (function() { 5 | var m = angular.module('parkandride.i18n', [ 6 | 'pascalprecht.translate' 7 | ]); 8 | 9 | m.config(function($translateProvider){ 10 | $translateProvider.useStaticFilesLoader({ 11 | prefix: 'assets/translations-', 12 | suffix: '.json' 13 | }); 14 | $translateProvider.preferredLanguage('fi'); 15 | $translateProvider.useMissingTranslationHandler("missingTranslation"); 16 | $translateProvider.usePostCompiling(true); 17 | $translateProvider.useSanitizeValueStrategy('sanitizeParameters'); 18 | }); 19 | 20 | m.factory('missingTranslation', function($log) { 21 | return function(translationId) { 22 | $log.warn("Missing translation for '" + translationId + "'"); 23 | }; 24 | }); 25 | 26 | })(); -------------------------------------------------------------------------------- /web/src/sass/_dialogs.scss: -------------------------------------------------------------------------------- 1 | .modal-header { 2 | border: 0px; 3 | } 4 | .modal-footer { 5 | border: 0px; 6 | } 7 | .portType input { 8 | margin-right: 5px; 9 | } -------------------------------------------------------------------------------- /web/src/sass/_map.scss: -------------------------------------------------------------------------------- 1 | //map height 2 | .map-container { 3 | height: 400px; 4 | margin-bottom: 25px; 5 | } 6 | 7 | .map { 8 | height: 100%; 9 | width: 100%; 10 | } 11 | 12 | .ol-control { 13 | background-color: transparent; 14 | } 15 | 16 | .ol-control:hover { 17 | background-color: transparent; 18 | } 19 | 20 | .ol-attribution:hover { 21 | background-color: rgba(255,255,255,0.8); 22 | } 23 | 24 | .ol-collapsed:hover { 25 | background-color: transparent; 26 | } 27 | 28 | .ol-control button { 29 | background-color: $primarycolor; 30 | } 31 | 32 | .ol-control button:hover, 33 | .ol-control button:focus { 34 | background-color: $primarycolor-light; 35 | } 36 | 37 | .ol-control button, 38 | .ol-attribution, 39 | .ol-scale-line-inner, 40 | .ol-has-tooltip [role=tooltip] { 41 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;; 42 | } 43 | 44 | .map-cancel { 45 | left: .5em; 46 | bottom: .5em; 47 | } -------------------------------------------------------------------------------- /web/src/sass/_mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin button($radius, $font-size, $height) { 2 | //colors 3 | background-color: $primarycolor; 4 | 5 | //borders 6 | border: none; 7 | border-radius: $radius; 8 | 9 | //font 10 | text-align: center; 11 | font-size: $font-size; 12 | color: #fff; 13 | 14 | //size and position 15 | height: $height; 16 | } 17 | 18 | @mixin font($font-size){ 19 | font-size: $font-size; 20 | line-height: 1em; 21 | color: $primarycolor; 22 | } 23 | 24 | %focused-input { 25 | border: 1px solid $secondarycolor; 26 | -webkit-box-shadow: none; 27 | box-shadow: none; 28 | } 29 | -------------------------------------------------------------------------------- /web/src/sass/_tags.scss: -------------------------------------------------------------------------------- 1 | tags-input .tags { 2 | border: 1px solid #CCCCCC; 3 | border-radius: 4px; 4 | box-shadow: none; 5 | padding: 2px; 6 | } 7 | 8 | tags-input .tags.focused { 9 | -webkit-box-shadow: none; 10 | -moz-box-shadow: none; 11 | box-shadow: none; 12 | border: 1px solid $secondarycolor; 13 | border-radius: 4px; 14 | } 15 | 16 | tags-input .tags .tag-item { 17 | border: none; 18 | border-radius: 4px; 19 | background: $secondarycolor; 20 | } 21 | 22 | tags-input .tags .tag-item.selected { 23 | background: $secondarycolor; 24 | } 25 | 26 | tags-input .tags .tag-item .remove-button { 27 | color: #333; 28 | } 29 | 30 | tags-input.ng-invalid .tags { 31 | border-color: $errorcolor; 32 | -webkit-box-shadow: none; 33 | -moz-box-shadow: none; 34 | box-shadow: none; 35 | } 36 | 37 | tags.has-focus .ui-select-multiple { 38 | @extend %focused-input; 39 | } 40 | 41 | .input { 42 | border: none; 43 | } -------------------------------------------------------------------------------- /web/src/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | //primary color 2 | $primarycolor: #007AC9; 3 | $primarycolor-light: #4DC7FF; 4 | $primarycolor-dark: #004796; 5 | 6 | //secondary colors 7 | $secondarycolor: #BEE4F8; 8 | $highlightcolor: #F092CD; 9 | $k80: #333; 10 | $k60: #616365; 11 | $k40: #666; 12 | $k10: #DDD; 13 | $lightgray: #ccc; 14 | 15 | //message, warning and error colors 16 | $messagecolor: #64BE14; 17 | $warningcolor: #FED100; 18 | $warningbgcolor: #FFFFCC; 19 | $errorcolor: #DC0451; 20 | 21 | //font 22 | $font-family: Helvetica, sans-serif; 23 | $basic-font-size: 16px; 24 | 25 | //header variables 26 | $border-radius: 15px 15px 0 0; 27 | $tab-height: 40px; 28 | 29 | //Modal window size, override Bootstrap defaults 30 | $modal-lg: 943px; 31 | $modal-md: 845px; 32 | $modal-sm: 95%; 33 | 34 | --------------------------------------------------------------------------------