├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── maven.yml │ └── package.yml ├── .gitignore ├── COMPLIANCE.yaml ├── Dockerfile ├── LICENSE ├── ols-router-admin ├── pom.xml └── src │ └── main │ ├── java │ └── ca │ │ └── bc │ │ └── gov │ │ └── ols │ │ └── router │ │ └── admin │ │ ├── AdminApplication.java │ │ ├── AdminController.java │ │ └── WebConfig.java │ └── webapp │ ├── WEB-INF │ └── view │ │ ├── import.jsp │ │ └── validate.jsp │ ├── css │ └── styles.css │ ├── footer.jsp │ ├── header.jsp │ ├── help.jsp │ ├── import_export.jsp │ ├── index.jsp │ └── params.jsp ├── ols-router-core ├── pom.xml └── src │ ├── main │ ├── java │ │ └── ca │ │ │ └── bc │ │ │ └── gov │ │ │ └── ols │ │ │ └── router │ │ │ ├── Router.java │ │ │ ├── RouterFactory.java │ │ │ ├── RoutingEngine.java │ │ │ ├── api │ │ │ ├── ApiResponse.java │ │ │ ├── DefaultsResponse.java │ │ │ ├── GeometryReprojector.java │ │ │ ├── IsochroneResponse.java │ │ │ ├── NavInfoParameters.java │ │ │ ├── NavInfoResponse.java │ │ │ ├── RouterDirectionsResponse.java │ │ │ ├── RouterDistanceBetweenPairsResponse.java │ │ │ ├── RouterDistanceResponse.java │ │ │ ├── RouterOptimalDirectionsResponse.java │ │ │ ├── RouterOptimalRouteResponse.java │ │ │ ├── RouterOptimizedResponse.java │ │ │ ├── RouterRouteResponse.java │ │ │ ├── RoutingParameters.java │ │ │ └── TurnRestrictionVis.java │ │ │ ├── config │ │ │ ├── InMemoryRouterConfigurationStore.java │ │ │ ├── RouterConfig.java │ │ │ └── RouterConfigurationStoreFactory.java │ │ │ ├── data │ │ │ ├── RoadClosureEvent.java │ │ │ ├── RoadDelayEvent.java │ │ │ ├── RoadEvent.java │ │ │ ├── RoadTruckNoticeEvent.java │ │ │ ├── StreetIntersection.java │ │ │ ├── StreetSegment.java │ │ │ ├── TurnClass.java │ │ │ ├── TurnRestriction.java │ │ │ ├── WeeklyTimeRange.java │ │ │ ├── enums │ │ │ │ ├── DayCode.java │ │ │ │ ├── DistanceUnit.java │ │ │ │ ├── End.java │ │ │ │ ├── NavInfoType.java │ │ │ │ ├── RestrictionSource.java │ │ │ │ ├── RestrictionType.java │ │ │ │ ├── RouteOption.java │ │ │ │ ├── RoutingCriteria.java │ │ │ │ ├── TruckNoticeType.java │ │ │ │ ├── TurnDirection.java │ │ │ │ ├── TurnRestrictionType.java │ │ │ │ ├── TurnTimeCode.java │ │ │ │ ├── VehicleType.java │ │ │ │ └── XingClass.java │ │ │ └── vis │ │ │ │ ├── VisFeature.java │ │ │ │ ├── VisLayer.java │ │ │ │ ├── VisLayers.java │ │ │ │ └── VisTurnRestriction.java │ │ │ ├── datasource │ │ │ ├── DataUpdateManager.java │ │ │ ├── FileRouterDataSource.java │ │ │ ├── RouterDataLoader.java │ │ │ ├── RouterDataSource.java │ │ │ ├── RouterDataSourceFactory.java │ │ │ └── TestDataSource.java │ │ │ ├── directions │ │ │ ├── AbstractTravelDirection.java │ │ │ ├── CardinalDirection.java │ │ │ ├── Direction.java │ │ │ ├── FerryDirection.java │ │ │ ├── FinishDirection.java │ │ │ ├── LaneRequirement.java │ │ │ ├── Partition.java │ │ │ ├── StartDirection.java │ │ │ ├── StopoverDirection.java │ │ │ ├── StreetDirection.java │ │ │ └── StreetDirectionType.java │ │ │ ├── engine │ │ │ ├── GraphBuilder.java │ │ │ ├── basic │ │ │ │ ├── Attribute.java │ │ │ │ ├── BasicGraph.java │ │ │ │ ├── BasicGraphBuilder.java │ │ │ │ ├── BasicGraphInternal.java │ │ │ │ ├── BasicGraphRoutingEngine.java │ │ │ │ ├── CostFunction.java │ │ │ │ ├── DijkstraShortestPath.java │ │ │ │ ├── DijkstraWalker.java │ │ │ │ ├── EdgeList.java │ │ │ │ ├── EdgeMerger.java │ │ │ │ ├── EventLookup.java │ │ │ │ ├── FerryInfo.java │ │ │ │ ├── GlobalDistortionField.java │ │ │ │ ├── QueryGraph.java │ │ │ │ ├── ScheduleLookup.java │ │ │ │ ├── SegmentIdLookup.java │ │ │ │ ├── SplitEdge.java │ │ │ │ ├── TrafficLookup.java │ │ │ │ ├── TrafficLookupBuilder.java │ │ │ │ ├── TurnLookup.java │ │ │ │ └── WayPoint.java │ │ │ └── graphhopper │ │ │ │ ├── GraphHopperCoordinateSequence.java │ │ │ │ ├── GraphHopperGraphBuilder.java │ │ │ │ ├── GraphHopperRoutingEngine.java │ │ │ │ ├── Isochrone.java │ │ │ │ ├── ParallelDijkstra.java │ │ │ │ ├── RouterGraphHopper.java │ │ │ │ └── isochrone │ │ │ │ ├── ContourBuilder.java │ │ │ │ └── RasterHullBuilder.java │ │ │ ├── notifications │ │ │ ├── EventWaitNotification.java │ │ │ ├── FerryWaitNotification.java │ │ │ ├── Notification.java │ │ │ ├── OversizeNotification.java │ │ │ └── TruckNotification.java │ │ │ ├── open511 │ │ │ ├── Area.java │ │ │ ├── Event.java │ │ │ ├── EventResponse.java │ │ │ ├── LocalTimeInterval.java │ │ │ ├── Meta.java │ │ │ ├── Pagination.java │ │ │ ├── RecurringSchedule.java │ │ │ ├── Restriction.java │ │ │ ├── Road.java │ │ │ ├── Schedule.java │ │ │ ├── ScheduleInterval.java │ │ │ ├── enums │ │ │ │ ├── Direction.java │ │ │ │ ├── EventCertainty.java │ │ │ │ ├── EventSeverity.java │ │ │ │ ├── EventStatus.java │ │ │ │ ├── EventSubtype.java │ │ │ │ ├── EventType.java │ │ │ │ ├── ImpactedSystem.java │ │ │ │ ├── Open511RestrictionType.java │ │ │ │ ├── RoadState.java │ │ │ │ └── ScheduleException.java │ │ │ └── parser │ │ │ │ └── Open511Parser.java │ │ │ ├── restrictions │ │ │ ├── AbstractRestriction.java │ │ │ ├── Constraint.java │ │ │ ├── LaneBasedRestriction.java │ │ │ ├── RestrictionLookup.java │ │ │ ├── RestrictionLookupBuilder.java │ │ │ └── rdm │ │ │ │ ├── RdmFetcher.java │ │ │ │ ├── RdmParser.java │ │ │ │ ├── Restriction.java │ │ │ │ └── RestrictionBuilder.java │ │ │ ├── status │ │ │ ├── BasicStatusMessage.java │ │ │ ├── RdmStatusMessage.java │ │ │ ├── StatusMessage.java │ │ │ └── SystemStatus.java │ │ │ ├── time │ │ │ ├── Always.java │ │ │ ├── DateInterval.java │ │ │ ├── DaySet.java │ │ │ ├── TemporalSet.java │ │ │ ├── TemporalSetIntersection.java │ │ │ ├── TemporalSetUnion.java │ │ │ └── WeeklyDateRange.java │ │ │ └── util │ │ │ ├── Azimuth.java │ │ │ ├── GeomParseUtil.java │ │ │ ├── TimeHelper.java │ │ │ └── UrlCsvInputSource.java │ ├── resources-filtered │ │ └── app.properties │ └── resources │ │ ├── bgeo_configuration_parameters.csv │ │ └── logback.xml │ └── test │ └── java │ └── ca │ └── bc │ └── gov │ └── ols │ └── router │ └── util │ └── AzimuthTest.java ├── ols-router-process ├── pom.xml └── src │ └── main │ └── java │ └── ca │ └── bc │ └── gov │ └── ols │ └── router │ ├── process │ ├── RouterProcess.java │ ├── RpStreetEnd.java │ ├── RpStreetIntersection.java │ └── RpStreetSegment.java │ └── rdm │ └── RdmFetcher.java ├── ols-router-web ├── pom.xml └── src │ ├── main │ └── java │ │ └── ca │ │ └── bc │ │ └── gov │ │ └── ols │ │ └── router │ │ └── rest │ │ ├── GeotoolsGeometryReprojector.java │ │ ├── RouterApplication.java │ │ ├── SpringSecurityInitializer.java │ │ ├── ThreadPoolTaskSchedulerConfig.java │ │ ├── WebConfig.java │ │ ├── WebSecurityConfig.java │ │ ├── controllers │ │ └── RoutingController.java │ │ ├── converters │ │ ├── BooleanConverter.java │ │ ├── DistanceUnitConverter.java │ │ ├── InstantConverter.java │ │ └── RoutingCriteriaConverter.java │ │ ├── exceptions │ │ ├── ErrorMessage.java │ │ ├── ExceptionMapper.java │ │ ├── InvalidParameterException.java │ │ └── NotFoundException.java │ │ └── messageconverters │ │ ├── ConverterHelper.java │ │ ├── html │ │ ├── HtmlConverterHelper.java │ │ ├── HtmlErrorMessageConverter.java │ │ └── HtmlResponseConverter.java │ │ ├── json │ │ ├── JsonConverterHelper.java │ │ ├── JsonDefaultsResponseConverter.java │ │ ├── JsonNavInfoResponseConverter.java │ │ ├── JsonResponseConverter.java │ │ ├── JsonpConverterHelper.java │ │ └── JsonpResponseConverter.java │ │ └── kml │ │ ├── KmlConverterHelper.java │ │ ├── KmlErrorMessageConverter.java │ │ └── KmlResponseConverter.java │ └── test │ └── java │ └── ca │ └── bc │ └── gov │ └── ols │ └── router │ └── rest │ └── controllers │ └── RoutingControllerTest.java ├── pom.xml ├── readme.md └── src ├── assembly └── license-header.xml └── license ├── THIRD-PARTY.txt └── license-header.txt /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | name: GitHub CI for Router 2 | 3 | on: 4 | push: 5 | branches: 6 | - dev 7 | pull_request: 8 | branches: 9 | - master 10 | - dev 11 | 12 | jobs: 13 | 14 | build: 15 | runs-on: ${{ matrix.os }} 16 | strategy: 17 | matrix: 18 | java_version: [1.11] 19 | os: [ubuntu-latest] 20 | pom_ver: [2.0.0] 21 | 22 | steps: 23 | - name: SCM Checkout 24 | uses: actions/checkout@v1 25 | - name: Set up JDK 11 26 | uses: actions/setup-java@v1 27 | with: 28 | java-version: ${{ matrix.java_version }} 29 | - name: Update Maven Release Version 30 | run: mvn versions:set -DnewVersion='${{ matrix.pom_ver }}' -DgenerateBackupPoms=false --file pom.xml 31 | - name: Build with Maven and Scan with SonarQube 32 | env: 33 | SONAR_URL: ${{ secrets.SONAR_URL }} 34 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} 35 | run: mvn clean package sonar:sonar -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_TOKEN --file pom.xml 36 | # - uses: 8398a7/action-slack@v1 37 | # with: 38 | # type: failure 39 | # env: 40 | # SLACK_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK }} 41 | # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 42 | # if: failure() 43 | # - uses: 8398a7/action-slack@v1 44 | # with: 45 | # type: success 46 | # env: 47 | # SLACK_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK }} 48 | # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 49 | # if: success() 50 | -------------------------------------------------------------------------------- /.github/workflows/package.yml: -------------------------------------------------------------------------------- 1 | name: sidecar package 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | dockerize: 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | matrix: 11 | os: [ubuntu-latest] 12 | steps: 13 | - name: SCM Checkout 14 | uses: actions/checkout@v1 15 | - name: One Click Docker 16 | uses: pangzineng/Github-Action-One-Click-Docker@v1.1.1 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ---> Java 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | 25 | # Maven 26 | target/ 27 | 28 | # Eclipse 29 | .project 30 | .metadata 31 | .factorypath 32 | bin/** 33 | tmp/** 34 | tmp/**/* 35 | *.tmp 36 | *.bak 37 | *.swp 38 | local.properties 39 | .classpath 40 | .settings/ 41 | .loadpath 42 | *.launch 43 | 44 | # IntelliJ 45 | 46 | .idea/ 47 | *.iml 48 | -------------------------------------------------------------------------------- /COMPLIANCE.yaml: -------------------------------------------------------------------------------- 1 | name: compliance 2 | description: | 3 | This document is used to track a projects PIA and STRA 4 | compliance. 5 | spec: 6 | - name: PIA 7 | status: PIA_STATUS_HERE 8 | last-updated: '2020-01-17T00:09:23.449Z' 9 | - name: STRA 10 | status: STRA_STATUS_HERE 11 | last-updated: '2020-01-17T00:09:23.449Z' 12 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3-jdk-11-slim AS builder 2 | ADD . /app 3 | WORKDIR /app 4 | RUN mvn versions:set -DnewVersion='1' -DgenerateBackupPoms=false && mvn package 5 | 6 | FROM busybox 7 | RUN mkdir /app 8 | COPY --from=builder /app/ols-*/target/ols-*.war /app/ 9 | RUN ls -la /app/ 10 | CMD ["tail", "-f", "/dev/null"] 11 | -------------------------------------------------------------------------------- /ols-router-admin/src/main/java/ca/bc/gov/ols/router/admin/AdminApplication.java: -------------------------------------------------------------------------------- 1 | package ca.bc.gov.ols.router.admin; 2 | 3 | import javax.annotation.PreDestroy; 4 | 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.boot.SpringApplication; 8 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 9 | import org.springframework.boot.autoconfigure.SpringBootApplication; 10 | import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; 11 | import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration; 12 | 13 | import ca.bc.gov.ols.config.ConfigurationStore; 14 | import ca.bc.gov.ols.router.RouterFactory; 15 | import ca.bc.gov.ols.router.config.RouterConfigurationStoreFactory; 16 | 17 | @SpringBootApplication 18 | @EnableAutoConfiguration(exclude={CassandraAutoConfiguration.class, UserDetailsServiceAutoConfiguration.class}) 19 | public class AdminApplication { 20 | 21 | static final Logger logger = LoggerFactory.getLogger( 22 | AdminApplication.class.getCanonicalName()); 23 | 24 | private static AdminApplication singleton; 25 | 26 | private ConfigurationStore configStore; 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(AdminApplication.class, args); 30 | } 31 | 32 | public AdminApplication() { 33 | logger.info("AdminApplication() constructor called"); 34 | configStore = RouterConfigurationStoreFactory.getConfigurationStore(RouterFactory.getBootstrapConfigFromEnvironment()); 35 | singleton = this; 36 | } 37 | 38 | public static AdminApplication adminApplication() { 39 | if(singleton == null) { 40 | singleton = new AdminApplication(); 41 | } 42 | return singleton; 43 | } 44 | 45 | public ConfigurationStore getConfigStore() { 46 | return configStore; 47 | } 48 | 49 | @PreDestroy 50 | public void preDestroy() { 51 | configStore.close(); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /ols-router-admin/src/main/java/ca/bc/gov/ols/router/admin/WebConfig.java: -------------------------------------------------------------------------------- 1 | package ca.bc.gov.ols.router.admin; 2 | 3 | import org.apache.catalina.Context; 4 | import org.apache.tomcat.util.scan.StandardJarScanner; 5 | import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 9 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 10 | import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; 11 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 12 | 13 | @Configuration 14 | @EnableWebMvc 15 | public class WebConfig implements WebMvcConfigurer { 16 | 17 | @Override 18 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 19 | registry 20 | .addResourceHandler("/css/**") 21 | .addResourceLocations("/css/"); 22 | } 23 | 24 | @Override 25 | public void configureViewResolvers(ViewResolverRegistry registry) { 26 | registry.jsp(); 27 | } 28 | 29 | // prevents tomcat from scanning every library jar's manifest 30 | @Bean 31 | public TomcatServletWebServerFactory tomcatFactory() { 32 | return new TomcatServletWebServerFactory() { 33 | @Override 34 | protected void postProcessContext(Context context) { 35 | ((StandardJarScanner) context.getJarScanner()).setScanManifest(false); 36 | } 37 | }; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ols-router-admin/src/main/webapp/WEB-INF/view/import.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | 3 | Copyright 2008-2015, Province of British Columbia 4 | All rights reserved. 5 | 6 | --%> 7 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 8 | <%@ include file="../../header.jsp" %> 9 |
Errors
15 |Messages
27 |File Name: ${exportConfig.fileName}
12 |Export Date (from file contents): ${exportConfig.exportDate}
13 |Errors
17 |Messages
29 |Table | Live Config Records | File Records | File Check Count |
---|---|---|---|
Configuration Parameters | ${comparison.curConfigParamCount} | ${comparison.otherConfigParamCount} | ${exportConfig.configParamCount} |
No Differences
45 |Live Config | File | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
APP_ID | CONFIG_PARAM_NAME | CONFIG_PARAM_VALUE | 50 |APP_ID | CONFIG_PARAM_NAME | CONFIG_PARAM_VALUE | ||||||
Not Present | 56 |${diff.current.appId} | ${diff.current.configParamName} | ${diff.current.configParamValue} | 59 |Not Present | 64 |${diff.other.appId} | ${diff.other.configParamName} | ${diff.other.configParamValue} | 67 |