diff --git a/docker/docker-compose.custom.yml b/docker/docker-compose.custom.yml index d16db18f..576664a3 100644 --- a/docker/docker-compose.custom.yml +++ b/docker/docker-compose.custom.yml @@ -40,6 +40,6 @@ services: jore4-hasura: # pin compatible version of jore4 data model - image: "hsldevcom/jore4-hasura:hsl-main--20231218-8a28ef5f4b22b6351312788be4e674144f2bb0a2" + image: "crjore4prod001.azurecr.io/jore4-hsl-hasura:main-2025-12-08-40a4f283c88076a5865ec1eab5713917f09bb3c5" networks: jore4: diff --git a/src/main/generated-sources/jooq/fi/hsl/jore/jore4/jooq/route/tables/Line.java b/src/main/generated-sources/jooq/fi/hsl/jore/jore4/jooq/route/tables/Line.java index c0550e46..14794060 100644 --- a/src/main/generated-sources/jooq/fi/hsl/jore/jore4/jooq/route/tables/Line.java +++ b/src/main/generated-sources/jooq/fi/hsl/jore/jore4/jooq/route/tables/Line.java @@ -118,6 +118,12 @@ public Class getRecordType() { */ public final TableField LEGACY_HSL_MUNICIPALITY_CODE = createField(DSL.name("legacy_hsl_municipality_code"), SQLDataType.CLOB, this, "Defines the legacy municipality that is mainly used for data exports."); + /** + * The column route.line.description. The line text description + * of the line. + */ + public final TableField DESCRIPTION = createField(DSL.name("description"), SQLDataType.CLOB, this, "The line text description of the line."); + private Line(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); } diff --git a/src/main/generated-sources/jooq/fi/hsl/jore/jore4/jooq/service_pattern/tables/ScheduledStopPoint.java b/src/main/generated-sources/jooq/fi/hsl/jore/jore4/jooq/service_pattern/tables/ScheduledStopPoint.java index 050cd542..e14d73b7 100644 --- a/src/main/generated-sources/jooq/fi/hsl/jore/jore4/jooq/service_pattern/tables/ScheduledStopPoint.java +++ b/src/main/generated-sources/jooq/fi/hsl/jore/jore4/jooq/service_pattern/tables/ScheduledStopPoint.java @@ -121,6 +121,13 @@ public Class getRecordType() { */ public final TableField TIMING_PLACE_ID = createField(DSL.name("timing_place_id"), SQLDataType.UUID, this, "Optional reference to a TIMING PLACE. If NULL, the SCHEDULED STOP POINT is not used for timing."); + /** + * The column + * service_pattern.scheduled_stop_point.stop_place_ref. The id + * of the related stop place in stop registry database. + */ + public final TableField STOP_PLACE_REF = createField(DSL.name("stop_place_ref"), SQLDataType.CLOB, this, "The id of the related stop place in stop registry database."); + private ScheduledStopPoint(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); } diff --git a/src/main/java/fi/hsl/jore/importer/feature/mapmatching/service/MockMapMatchingService.java b/src/main/java/fi/hsl/jore/importer/feature/mapmatching/service/MockMapMatchingService.java index cab78b63..b11f4bce 100644 --- a/src/main/java/fi/hsl/jore/importer/feature/mapmatching/service/MockMapMatchingService.java +++ b/src/main/java/fi/hsl/jore/importer/feature/mapmatching/service/MockMapMatchingService.java @@ -16,7 +16,7 @@ public class MockMapMatchingService implements IMapMatchingService { public static final String INFRASTRUCTURE_LINK_EXT_ID = "133202"; public static final boolean INFRASTRUCTURE_LINK_IS_TRAVERSAL_FORWARDS = true; - public static final String INFRASTRUCTURE_LINK_SOURCE = "digiroad_r"; + public static final String INFRASTRUCTURE_LINK_SOURCE = "digiroad_r_mml"; private static final String MAP_MATCHING_OK_RESPONSE_CODE = "Ok"; diff --git a/src/test/java/fi/hsl/jore/importer/feature/batch/route/MapMatchingProcessorTest.java b/src/test/java/fi/hsl/jore/importer/feature/batch/route/MapMatchingProcessorTest.java index 151665ff..4d195bbb 100644 --- a/src/test/java/fi/hsl/jore/importer/feature/batch/route/MapMatchingProcessorTest.java +++ b/src/test/java/fi/hsl/jore/importer/feature/batch/route/MapMatchingProcessorTest.java @@ -110,7 +110,7 @@ class WhenOneRoutePointIsFound { { "mapMatchingInfrastructureLinkId": 209830, "externalLinkRef": { - "infrastructureSource": "digiroad_r", + "infrastructureSource": "digiroad_r_mml", "externalLinkId": "445117" }, "isTraversalForwards": true, @@ -131,7 +131,7 @@ class WhenOneRoutePointIsFound { { "mapMatchingInfrastructureLinkId": 232425, "externalLinkRef": { - "infrastructureSource": "digiroad_r", + "infrastructureSource": "digiroad_r_mml", "externalLinkId": "442423" }, "isTraversalForwards": true, @@ -155,12 +155,12 @@ class WhenOneRoutePointIsFound { } """; - private static final String EXPECTED_FIRST_INFRASTRUCTURE_LINK_SOURCE = "digiroad_r"; + private static final String EXPECTED_FIRST_INFRASTRUCTURE_LINK_SOURCE = "digiroad_r_mml"; private static final String EXPECTED_FIRST_INFRASTRUCTURE_LINK_EXT_ID = "445117"; private static final int EXPECTED_FIRST_INFRASTRUCTURE_LINK_SEQUENCE = 0; private static final boolean EXPECTED_FIRST_INFRASTRUCTURE_LINK_IS_TRAVERSAL_FORWARDS = true; - private static final String EXPECTED_SECOND_INFRASTRUCTURE_LINK_SOURCE = "digiroad_r"; + private static final String EXPECTED_SECOND_INFRASTRUCTURE_LINK_SOURCE = "digiroad_r_mml"; private static final String EXPECTED_SECOND_INFRASTRUCTURE_LINK_EXT_ID = "442423"; private static final int EXPECTED_SECOND_INFRASTRUCTURE_LINK_SEQUENCE = 1; private static final boolean EXPECTED_SECOND_INFRASTRUCTURE_LINK_IS_TRAVERSAL_FORWARDS = true; diff --git a/src/test/java/fi/hsl/jore/importer/feature/digiroad/service/DigiroadStopFactoryTest.java b/src/test/java/fi/hsl/jore/importer/feature/digiroad/service/DigiroadStopFactoryTest.java index 2ca9fd80..8eb43925 100644 --- a/src/test/java/fi/hsl/jore/importer/feature/digiroad/service/DigiroadStopFactoryTest.java +++ b/src/test/java/fi/hsl/jore/importer/feature/digiroad/service/DigiroadStopFactoryTest.java @@ -48,7 +48,7 @@ void shouldThrowException() { class WhenDigiroadStopIdIsEmpty { private static final String CSV_LINE = - ";133202;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r"; + ";133202;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r_mml"; @Test @DisplayName("Should throw an exception") @@ -63,7 +63,7 @@ void shouldThrowException() { class WhenDigiroadLinkIdIsEmpty { private static final String CSV_LINE = - "111;;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r"; + "111;;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r_mml"; @Test @DisplayName("Should throw an exception") @@ -78,7 +78,7 @@ void shouldThrowException() { class WhenNationalIdIsEmpty { private static final String CSV_LINE = - "111;133202;;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r"; + "111;133202;;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r_mml"; @Test @DisplayName("Should throw an exception") @@ -93,7 +93,7 @@ void shouldThrowException() { class WhenNationalIdIsContainsNonNumericalCharacters { private static final String CSV_LINE = - "111;133202;12d3;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r"; + "111;133202;12d3;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r_mml"; @Test @DisplayName("Should throw an exception") @@ -108,7 +108,7 @@ void shouldThrowException() { class WhenStopDirectionIsInvalid { private static final String CSV_LINE = - "111;133202;168626;invalid;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r"; + "111;133202;168626;invalid;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r_mml"; @Test @DisplayName("Should throw an exception") @@ -123,7 +123,7 @@ void shouldThrowException() { class WhenStopLocationIsInvalid { private static final String CSV_LINE = - "111;133202;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801])\";Ullanmäki;Ullasbacken;digiroad_r"; + "111;133202;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801])\";Ullanmäki;Ullasbacken;digiroad_r_mml"; @Test @DisplayName("Should throw an exception") @@ -152,7 +152,7 @@ class WhenCSVLineIsValid { class WhenAllValuesAreGiven { private static final String CSV_LINE = - "111;133202;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r"; + "111;133202;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";Ullanmäki;Ullasbacken;digiroad_r_mml"; @Test @DisplayName("Should return an optional which contains the parsed stop") @@ -233,7 +233,7 @@ void shouldReturnStopWhichHasCorrectSwedishName() { class WhenNamesAreEmptyStrings { private static final String CSV_LINE = - "111;133202;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";;;digiroad_r"; + "111;133202;168626;backward;\"{\"\"type\"\": \"\"Point\"\", \"\"coordinates\"\": [24.696376131, 60.207149801]}\";;;digiroad_r_mml"; @Test @DisplayName("Should return an optional which contains the parsed stop") diff --git a/src/test/java/fi/hsl/jore/importer/feature/jore4/repository/Jore4RouteGeometryRepositoryTest.java b/src/test/java/fi/hsl/jore/importer/feature/jore4/repository/Jore4RouteGeometryRepositoryTest.java index 96d5e447..79917e97 100644 --- a/src/test/java/fi/hsl/jore/importer/feature/jore4/repository/Jore4RouteGeometryRepositoryTest.java +++ b/src/test/java/fi/hsl/jore/importer/feature/jore4/repository/Jore4RouteGeometryRepositoryTest.java @@ -68,7 +68,7 @@ class WhenOneRouteGeometryIsGivenAsArgument { private static final String INFRASTRUCTURE_LINK_EXT_ID = "133202"; private static final boolean INFRASTRUCTURE_LINK_IS_TRAVERSAL_FORWARDS = true; private static final int INFRASTRUCTURE_LINK_SEQUENCE = 0; - private static final String INFRASTRUCTURE_LINK_SOURCE = "digiroad_r"; + private static final String INFRASTRUCTURE_LINK_SOURCE = "digiroad_r_mml"; private Jore4RouteGeometry input; diff --git a/src/test/java/fi/hsl/jore/importer/feature/mapmatching/service/MapMatchingServiceTest.java b/src/test/java/fi/hsl/jore/importer/feature/mapmatching/service/MapMatchingServiceTest.java index 4c1623e8..3da201b9 100644 --- a/src/test/java/fi/hsl/jore/importer/feature/mapmatching/service/MapMatchingServiceTest.java +++ b/src/test/java/fi/hsl/jore/importer/feature/mapmatching/service/MapMatchingServiceTest.java @@ -223,7 +223,7 @@ class WhenMatchWasFound { { "mapMatchingInfrastructureLinkId": 209830, "externalLinkRef": { - "infrastructureSource": "digiroad_r", + "infrastructureSource": "digiroad_r_mml", "externalLinkId": "445117" }, "isTraversalForwards": true, @@ -244,7 +244,7 @@ class WhenMatchWasFound { { "mapMatchingInfrastructureLinkId": 232425, "externalLinkRef": { - "infrastructureSource": "digiroad_r", + "infrastructureSource": "digiroad_r_mml", "externalLinkId": "442423" }, "isTraversalForwards": true, @@ -284,7 +284,7 @@ class WhenMatchWasFound { private static final double EXPECTED_ROUTE_WEIGHT = 286.7201809450182; private static final long EXPECTED_INFRASTRUCTURE_LINK_ONE_ID = 209830; - private static final String EXPECTED_INFRASTRUCTURE_LINK_ONE_SOURCE = "digiroad_r"; + private static final String EXPECTED_INFRASTRUCTURE_LINK_ONE_SOURCE = "digiroad_r_mml"; private static final String EXPECTED_INFRASTRUCTURE_LINK_ONE_EXT_ID = "445117"; private static final boolean EXPECTED_INFRASTRUCTURE_LINK_ONE_TRAVERSAL_FORWARDS = true; private static final double EXPECTED_INFRASTRUCTURE_LINK_ONE_COORDINATE_ONE_LNG = 24.92743115932746; @@ -297,7 +297,7 @@ class WhenMatchWasFound { private static final String EXPECTED_INFRASTRUCTURE_LINK_ONE_SWEDISH_NAME = "Kalevagatan 1"; private static final long EXPECTED_INFRASTRUCTURE_LINK_TWO_ID = 232425; - private static final String EXPECTED_INFRASTRUCTURE_LINK_TWO_SOURCE = "digiroad_r"; + private static final String EXPECTED_INFRASTRUCTURE_LINK_TWO_SOURCE = "digiroad_r_mml"; private static final String EXPECTED_INFRASTRUCTURE_LINK_TWO_EXT_ID = "442423"; private static final boolean EXPECTED_INFRASTRUCTURE_LINK_TWO_TRAVERSAL_FORWARDS = true; private static final double EXPECTED_INFRASTRUCTURE_LINK_TWO_COORDINATE_ONE_LNG = 24.92919590585085; diff --git a/src/test/resources/csv/digiroad_stops.csv b/src/test/resources/csv/digiroad_stops.csv index 9a78f3af..136fd518 100644 --- a/src/test/resources/csv/digiroad_stops.csv +++ b/src/test/resources/csv/digiroad_stops.csv @@ -1 +1 @@ -111;133202;1234567890;backward;"{""type"": ""Point"", ""coordinates"": [24.696376131, 60.207149801]}";Ullanmäki;Ullasbacken;digiroad_r \ No newline at end of file +111;133202;1234567890;backward;"{""type"": ""Point"", ""coordinates"": [24.696376131, 60.207149801]}";Ullanmäki;Ullasbacken;digiroad_r_mml \ No newline at end of file diff --git a/src/test/resources/sql/jore4/populate_infrastructure_links.sql b/src/test/resources/sql/jore4/populate_infrastructure_links.sql index dfd572a2..469473f3 100644 --- a/src/test/resources/sql/jore4/populate_infrastructure_links.sql +++ b/src/test/resources/sql/jore4/populate_infrastructure_links.sql @@ -14,7 +14,7 @@ VALUES ( ST_MakeLine(ST_SetSRID(ST_MakePoint(24.457948, 60.088725, 0), 4326), ST_SetSRID(ST_MakePoint(24.468175, 60.15286, 0), 4326)), 1000, '133202', - 'digiroad_r' + 'digiroad_r_mml' ); INSERT INTO infrastructure_network.vehicle_submode_on_infrastructure_link (