diff --git a/baremaps-benchmarking/src/main/java/org/apache/baremaps/benchmarking/geoparquet/OvertureMapsBenchmark.java b/baremaps-benchmarking/src/main/java/org/apache/baremaps/benchmarking/geoparquet/OvertureMapsBenchmark.java index ac4351f87..59da4d153 100644 --- a/baremaps-benchmarking/src/main/java/org/apache/baremaps/benchmarking/geoparquet/OvertureMapsBenchmark.java +++ b/baremaps-benchmarking/src/main/java/org/apache/baremaps/benchmarking/geoparquet/OvertureMapsBenchmark.java @@ -21,7 +21,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.concurrent.TimeUnit; -import org.apache.baremaps.geoparquet.format.GeoParquetReader; +import org.apache.baremaps.geoparquet.GeoParquetReader; import org.apache.hadoop.fs.s3a.AnonymousAWSCredentialsProvider; import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.runner.Runner; diff --git a/baremaps-benchmarking/src/main/java/org/apache/baremaps/benchmarking/geoparquet/SmallFileBenchmark.java b/baremaps-benchmarking/src/main/java/org/apache/baremaps/benchmarking/geoparquet/SmallFileBenchmark.java index 0e81da647..1ae2a7476 100644 --- a/baremaps-benchmarking/src/main/java/org/apache/baremaps/benchmarking/geoparquet/SmallFileBenchmark.java +++ b/baremaps-benchmarking/src/main/java/org/apache/baremaps/benchmarking/geoparquet/SmallFileBenchmark.java @@ -22,7 +22,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.concurrent.TimeUnit; -import org.apache.baremaps.geoparquet.format.GeoParquetReader; +import org.apache.baremaps.geoparquet.GeoParquetReader; import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; diff --git a/baremaps-cli/src/main/java/org/apache/baremaps/cli/dem/VectorTileContours.java b/baremaps-cli/src/main/java/org/apache/baremaps/cli/dem/VectorTileContours.java index 0175515ad..fc829070f 100644 --- a/baremaps-cli/src/main/java/org/apache/baremaps/cli/dem/VectorTileContours.java +++ b/baremaps-cli/src/main/java/org/apache/baremaps/cli/dem/VectorTileContours.java @@ -24,8 +24,8 @@ import java.util.concurrent.Callable; import org.apache.baremaps.maplibre.tileset.Tileset; import org.apache.baremaps.maplibre.tileset.TilesetLayer; -import org.apache.baremaps.openstreetmap.format.stream.ProgressLogger; -import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.stream.ProgressLogger; +import org.apache.baremaps.openstreetmap.stream.StreamUtils; import org.apache.baremaps.tasks.ExportVectorTiles; import org.apache.baremaps.tilestore.TileCoord; import org.apache.baremaps.tilestore.TileEntry; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapDocumentMapper.java b/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapDocumentMapper.java index d60d937fe..cc478c01f 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapDocumentMapper.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapDocumentMapper.java @@ -20,8 +20,8 @@ import java.util.function.Function; -import org.apache.baremaps.openstreetmap.format.model.Element; -import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.model.Node; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.LatLonShape; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapEntityConsumer.java b/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapEntityConsumer.java index 52e54fe99..ab29a2954 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapEntityConsumer.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapEntityConsumer.java @@ -18,8 +18,8 @@ package org.apache.baremaps.geocoder.openstreetmap; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Element; -import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.model.Entity; import org.apache.lucene.index.IndexWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocMapper.java b/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocMapper.java index 0f0931b1f..1b8d04596 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocMapper.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocMapper.java @@ -85,19 +85,22 @@ public Optional apply(RpslObject nicObject) { var attributes = nicObject.asMap(); // Use a default name if there is no netname - var network = attributes.getOrDefault("netname", "unknown"); + var network = String.join(", ", attributes.getOrDefault("netname", List.of("unknown"))); + var geoloc = String.join(", ", attributes.getOrDefault("geoloc", List.of())); + var country = String.join(", ", attributes.getOrDefault("country", List.of())); + var source = String.join(", ", attributes.getOrDefault("source", List.of())); // If there is a geoloc field, we use the latitude and longitude provided if (attributes.containsKey("geoloc")) { - var location = stringToCoordinate(attributes.get("geoloc")); + var location = stringToCoordinate(geoloc); if (location.isPresent()) { return Optional.of(new IpLocObject( - attributes.get("geoloc"), + geoloc, inetRange, location.get(), network, - attributes.get("country"), - attributes.get("source"), + country, + source, IpLocPrecision.GEOLOC)); } } @@ -112,36 +115,37 @@ public Optional apply(RpslObject nicObject) { // build a query text string out of the cherry-picked fields var queryTextBuilder = new StringBuilder(); for (String field : searchedFields) { - if (!Strings.isNullOrEmpty(attributes.get(field))) { + var fieldValue = String.join(", ", attributes.get(field)); + if (!Strings.isNullOrEmpty(fieldValue)) { queryTextBuilder.append(attributes.get(field)).append(" "); } } String queryText = queryTextBuilder.toString(); - var location = findLocationInCountry(queryText, attributes.get("country")); + var location = findLocationInCountry(queryText, country); if (location.isPresent()) { return Optional.of(new IpLocObject( queryText, inetRange, location.get(), network, - attributes.get("country"), - attributes.get("source"), + country, + source, IpLocPrecision.GEOCODER)); } } // If there is a country get the location of country if (attributes.containsKey("country")) { - var location = findCountryLocation(attributes.get("country")); + var location = findCountryLocation(country); if (location.isPresent()) { return Optional.of(new IpLocObject( - attributes.get("country"), + country, inetRange, location.get(), network, - attributes.get("country"), - attributes.get("source"), + country, + source, IpLocPrecision.COUNTRY)); } } @@ -152,7 +156,7 @@ public Optional apply(RpslObject nicObject) { new Coordinate(), network, null, - attributes.get("source"), + source, IpLocPrecision.WORLD)); } catch (Exception e) { logger.warn("Error while mapping nic object to ip loc object", e); diff --git a/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocRepository.java b/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocRepository.java index b94aea7dd..a98fe058b 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocRepository.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocRepository.java @@ -28,7 +28,7 @@ import java.util.List; import java.util.stream.Stream; import javax.sql.DataSource; -import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.stream.StreamUtils; import org.locationtech.jts.geom.Coordinate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/CreateGeocoderOpenStreetMap.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/CreateGeocoderOpenStreetMap.java index 0a7533cae..ea2730505 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/CreateGeocoderOpenStreetMap.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/CreateGeocoderOpenStreetMap.java @@ -25,8 +25,8 @@ import java.util.StringJoiner; import org.apache.baremaps.geocoder.GeocoderConstants; import org.apache.baremaps.geocoder.openstreetmap.OpenStreetMapEntityConsumer; -import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; -import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; +import org.apache.baremaps.openstreetmap.stream.StreamUtils; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; import org.apache.lucene.index.IndexWriter; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/CreateIplocIndex.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/CreateIplocIndex.java index face5399a..1a284d9b0 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/CreateIplocIndex.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/CreateIplocIndex.java @@ -26,7 +26,7 @@ import java.util.StringJoiner; import org.apache.baremaps.iploc.IpLocReader; import org.apache.baremaps.iploc.IpLocRepository; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.stream.StreamException; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; import org.apache.lucene.search.SearcherFactory; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/DiffService.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/DiffService.java index 1cb856007..b0e189cd3 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/DiffService.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/DiffService.java @@ -17,7 +17,7 @@ package org.apache.baremaps.tasks; -import static org.apache.baremaps.openstreetmap.format.stream.ConsumerUtils.consumeThenReturn; +import static org.apache.baremaps.openstreetmap.stream.ConsumerUtils.consumeThenReturn; import java.io.BufferedInputStream; import java.net.MalformedURLException; @@ -28,12 +28,12 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; import java.util.zip.GZIPInputStream; -import org.apache.baremaps.openstreetmap.format.function.EntityGeometryBuilder; -import org.apache.baremaps.openstreetmap.format.function.EntityToGeometryMapper; -import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; -import org.apache.baremaps.openstreetmap.format.model.*; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; -import org.apache.baremaps.openstreetmap.format.xml.XmlChangeReader; +import org.apache.baremaps.openstreetmap.function.EntityGeometryBuilder; +import org.apache.baremaps.openstreetmap.function.EntityToGeometryMapper; +import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.model.*; +import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.xml.XmlChangeReader; import org.apache.baremaps.postgres.openstreetmap.HeaderRepository; import org.apache.baremaps.postgres.openstreetmap.Repository; import org.apache.baremaps.tilestore.TileCoord; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ExportVectorTiles.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ExportVectorTiles.java index 4fea4aff0..97cbbb72b 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ExportVectorTiles.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ExportVectorTiles.java @@ -32,8 +32,8 @@ import org.apache.baremaps.maplibre.style.Style; import org.apache.baremaps.maplibre.tileset.Tileset; import org.apache.baremaps.maplibre.tileset.TilesetQuery; -import org.apache.baremaps.openstreetmap.format.stream.ProgressLogger; -import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.stream.ProgressLogger; +import org.apache.baremaps.openstreetmap.stream.StreamUtils; import org.apache.baremaps.tilestore.*; import org.apache.baremaps.tilestore.file.FileTileStore; import org.apache.baremaps.tilestore.mbtiles.MBTilesStore; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportDaylightFeatures.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportDaylightFeatures.java index 3ffbbb7e4..2291672b0 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportDaylightFeatures.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportDaylightFeatures.java @@ -24,7 +24,7 @@ import java.util.List; import java.util.Map; import java.util.StringJoiner; -import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.model.Element; import org.apache.baremaps.postgres.openstreetmap.*; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportDaylightTranslations.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportDaylightTranslations.java index 27ee1e072..488fb07bd 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportDaylightTranslations.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportDaylightTranslations.java @@ -23,7 +23,7 @@ import java.util.List; import java.util.StringJoiner; import java.util.stream.Collectors; -import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.model.Element; import org.apache.baremaps.postgres.openstreetmap.*; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportGeoPackage.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportGeoPackage.java index 8cbd873cb..93932f02e 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportGeoPackage.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportGeoPackage.java @@ -19,8 +19,8 @@ import java.nio.file.Path; import java.util.StringJoiner; -import org.apache.baremaps.geopackage.store.GeoPackageDataStore; -import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; +import org.apache.baremaps.geopackage.GeoPackageDataStore; +import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; import org.apache.baremaps.postgres.store.PostgresDataStore; import org.apache.baremaps.store.DataTableGeometryMapper; import org.apache.baremaps.store.DataTableMapper; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportGeoParquet.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportGeoParquet.java index d99b0efb8..70491d6c0 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportGeoParquet.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportGeoParquet.java @@ -19,9 +19,9 @@ import java.net.URI; import java.util.StringJoiner; -import org.apache.baremaps.geoparquet.store.GeoParquetDataStore; -import org.apache.baremaps.geoparquet.store.GeoParquetDataTable; -import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; +import org.apache.baremaps.geoparquet.GeoParquetDataStore; +import org.apache.baremaps.geoparquet.GeoParquetDataTable; +import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; import org.apache.baremaps.postgres.store.PostgresDataStore; import org.apache.baremaps.store.DataTableGeometryMapper; import org.apache.baremaps.store.DataTableMapper; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportOsmOsc.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportOsmOsc.java index 651bdb7d2..36d9103e4 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportOsmOsc.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportOsmOsc.java @@ -17,14 +17,14 @@ package org.apache.baremaps.tasks; -import static org.apache.baremaps.openstreetmap.format.stream.ConsumerUtils.consumeThenReturn; +import static org.apache.baremaps.openstreetmap.stream.ConsumerUtils.consumeThenReturn; import java.io.BufferedInputStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.StringJoiner; -import org.apache.baremaps.openstreetmap.format.function.*; -import org.apache.baremaps.openstreetmap.format.xml.XmlChangeReader; +import org.apache.baremaps.openstreetmap.function.*; +import org.apache.baremaps.openstreetmap.xml.XmlChangeReader; import org.apache.baremaps.postgres.openstreetmap.CopyChangeImporter; import org.apache.baremaps.postgres.openstreetmap.NodeRepository; import org.apache.baremaps.postgres.openstreetmap.RelationRepository; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportOsmPbf.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportOsmPbf.java index 9d2f83ea4..bc4e966f3 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportOsmPbf.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportOsmPbf.java @@ -25,11 +25,11 @@ import java.util.List; import java.util.Map; import java.util.StringJoiner; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.model.Way; -import org.apache.baremaps.openstreetmap.format.pbf.PbfBlockReader; -import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.pbf.PbfBlockReader; +import org.apache.baremaps.openstreetmap.stream.StreamUtils; import org.apache.baremaps.postgres.openstreetmap.*; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportShapefile.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportShapefile.java index 970751d3e..1e5f95d31 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportShapefile.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/ImportShapefile.java @@ -19,9 +19,9 @@ import java.nio.file.Path; import java.util.StringJoiner; -import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; import org.apache.baremaps.postgres.store.PostgresDataStore; -import org.apache.baremaps.shapefile.store.ShapefileDataTable; +import org.apache.baremaps.shapefile.ShapefileDataTable; import org.apache.baremaps.store.DataTableGeometryMapper; import org.apache.baremaps.store.DataTableMapper; import org.apache.baremaps.workflow.Task; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/tasks/UpdateOsmDatabase.java b/baremaps-core/src/main/java/org/apache/baremaps/tasks/UpdateOsmDatabase.java index f1cbc753c..51d125a02 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/tasks/UpdateOsmDatabase.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/tasks/UpdateOsmDatabase.java @@ -23,13 +23,13 @@ import java.util.Map; import java.util.StringJoiner; import java.util.zip.GZIPInputStream; -import org.apache.baremaps.openstreetmap.format.function.*; -import org.apache.baremaps.openstreetmap.format.model.Header; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.model.Way; -import org.apache.baremaps.openstreetmap.format.state.StateReader; -import org.apache.baremaps.openstreetmap.format.xml.XmlChangeReader; +import org.apache.baremaps.openstreetmap.function.*; +import org.apache.baremaps.openstreetmap.model.Header; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.state.StateReader; +import org.apache.baremaps.openstreetmap.xml.XmlChangeReader; import org.apache.baremaps.postgres.openstreetmap.*; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/geocoder/DataTableIndexTest.java b/baremaps-core/src/test/java/org/apache/baremaps/geocoder/DataTableIndexTest.java index 92f142ba2..70f1855de 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/geocoder/DataTableIndexTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/geocoder/DataTableIndexTest.java @@ -24,7 +24,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; -import org.apache.baremaps.geoparquet.store.GeoParquetDataTable; +import org.apache.baremaps.geoparquet.GeoParquetDataTable; import org.apache.baremaps.testing.TestFiles; import org.apache.baremaps.utils.FileUtils; import org.apache.lucene.document.Document; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/integration/GeoPackageToPostgresTest.java b/baremaps-core/src/test/java/org/apache/baremaps/integration/GeoPackageToPostgresTest.java index 2cffd3649..d2ba41414 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/integration/GeoPackageToPostgresTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/integration/GeoPackageToPostgresTest.java @@ -17,7 +17,7 @@ package org.apache.baremaps.integration; -import org.apache.baremaps.geopackage.store.GeoPackageDataStore; +import org.apache.baremaps.geopackage.GeoPackageDataStore; import org.apache.baremaps.postgres.store.PostgresDataStore; import org.apache.baremaps.testing.PostgresContainerTest; import org.apache.baremaps.testing.TestFiles; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/integration/GeoParquetToPostgresTest.java b/baremaps-core/src/test/java/org/apache/baremaps/integration/GeoParquetToPostgresTest.java index 5efadbd95..3e4f1588d 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/integration/GeoParquetToPostgresTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/integration/GeoParquetToPostgresTest.java @@ -19,7 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.apache.baremaps.geoparquet.store.GeoParquetDataStore; +import org.apache.baremaps.geoparquet.GeoParquetDataStore; import org.apache.baremaps.postgres.store.PostgresDataStore; import org.apache.baremaps.testing.PostgresContainerTest; import org.apache.baremaps.testing.TestFiles; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/tasks/ImportUpdateSampleTest.java b/baremaps-core/src/test/java/org/apache/baremaps/tasks/ImportUpdateSampleTest.java index 19cfe71b5..4aa327f47 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/tasks/ImportUpdateSampleTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/tasks/ImportUpdateSampleTest.java @@ -31,8 +31,8 @@ import org.apache.baremaps.data.memory.OnHeapMemory; import org.apache.baremaps.data.type.CoordinateDataType; import org.apache.baremaps.data.type.LongListDataType; -import org.apache.baremaps.openstreetmap.format.model.Header; -import org.apache.baremaps.openstreetmap.format.state.StateReader; +import org.apache.baremaps.openstreetmap.model.Header; +import org.apache.baremaps.openstreetmap.state.StateReader; import org.apache.baremaps.postgres.openstreetmap.*; import org.apache.baremaps.testing.PostgresRepositoryTest; import org.apache.baremaps.testing.TestFiles; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/utils/ProjectionTransformerTest.java b/baremaps-core/src/test/java/org/apache/baremaps/utils/ProjectionTransformerTest.java index 1a955ca45..2f5faba8f 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/utils/ProjectionTransformerTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/utils/ProjectionTransformerTest.java @@ -19,7 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; import org.junit.jupiter.api.Test; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; diff --git a/baremaps-csv/src/main/java/org/apache/baremaps/csv/store/CsvDataStore.java b/baremaps-csv/src/main/java/org/apache/baremaps/csv/CsvDataStore.java similarity index 98% rename from baremaps-csv/src/main/java/org/apache/baremaps/csv/store/CsvDataStore.java rename to baremaps-csv/src/main/java/org/apache/baremaps/csv/CsvDataStore.java index e8d6dea27..1dfc85298 100644 --- a/baremaps-csv/src/main/java/org/apache/baremaps/csv/store/CsvDataStore.java +++ b/baremaps-csv/src/main/java/org/apache/baremaps/csv/CsvDataStore.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.csv.store; +package org.apache.baremaps.csv; import java.io.File; import java.io.IOException; diff --git a/baremaps-csv/src/main/java/org/apache/baremaps/csv/store/CsvDataTable.java b/baremaps-csv/src/main/java/org/apache/baremaps/csv/CsvDataTable.java similarity index 99% rename from baremaps-csv/src/main/java/org/apache/baremaps/csv/store/CsvDataTable.java rename to baremaps-csv/src/main/java/org/apache/baremaps/csv/CsvDataTable.java index a7de2002e..845e54e93 100644 --- a/baremaps-csv/src/main/java/org/apache/baremaps/csv/store/CsvDataTable.java +++ b/baremaps-csv/src/main/java/org/apache/baremaps/csv/CsvDataTable.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.csv.store; +package org.apache.baremaps.csv; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; diff --git a/baremaps-csv/src/test/java/org/apache/baremaps/csv/store/CsvDataTableGeonamesTest.java b/baremaps-csv/src/test/java/org/apache/baremaps/csv/CsvDataTableGeonamesTest.java similarity index 95% rename from baremaps-csv/src/test/java/org/apache/baremaps/csv/store/CsvDataTableGeonamesTest.java rename to baremaps-csv/src/test/java/org/apache/baremaps/csv/CsvDataTableGeonamesTest.java index d2293167a..073a8c006 100644 --- a/baremaps-csv/src/test/java/org/apache/baremaps/csv/store/CsvDataTableGeonamesTest.java +++ b/baremaps-csv/src/test/java/org/apache/baremaps/csv/CsvDataTableGeonamesTest.java @@ -15,12 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.csv.store; +package org.apache.baremaps.csv; import static org.junit.jupiter.api.Assertions.*; import java.io.IOException; import java.util.List; + import org.apache.baremaps.store.*; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.*; @@ -45,10 +46,14 @@ void testGeonamesCsvDataTable() throws IOException { new DataColumnFixed("country_code", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.STRING), new DataColumnFixed("cc2", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.STRING), - new DataColumnFixed("admin1_code", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.STRING), - new DataColumnFixed("admin2_code", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.STRING), - new DataColumnFixed("admin3_code", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.STRING), - new DataColumnFixed("admin4_code", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.STRING), + new DataColumnFixed("admin1_code", DataColumn.Cardinality.OPTIONAL, + DataColumn.Type.STRING), + new DataColumnFixed("admin2_code", DataColumn.Cardinality.OPTIONAL, + DataColumn.Type.STRING), + new DataColumnFixed("admin3_code", DataColumn.Cardinality.OPTIONAL, + DataColumn.Type.STRING), + new DataColumnFixed("admin4_code", DataColumn.Cardinality.OPTIONAL, + DataColumn.Type.STRING), new DataColumnFixed("population", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.LONG), new DataColumnFixed("elevation", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.INTEGER), new DataColumnFixed("dem", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.INTEGER), diff --git a/baremaps-csv/src/test/java/org/apache/baremaps/csv/store/CsvDataTableTest.java b/baremaps-csv/src/test/java/org/apache/baremaps/csv/CsvDataTableTest.java similarity index 98% rename from baremaps-csv/src/test/java/org/apache/baremaps/csv/store/CsvDataTableTest.java rename to baremaps-csv/src/test/java/org/apache/baremaps/csv/CsvDataTableTest.java index f0f93c9fd..37a3826f3 100644 --- a/baremaps-csv/src/test/java/org/apache/baremaps/csv/store/CsvDataTableTest.java +++ b/baremaps-csv/src/test/java/org/apache/baremaps/csv/CsvDataTableTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.csv.store; +package org.apache.baremaps.csv; import static org.junit.jupiter.api.Assertions.*; @@ -24,6 +24,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.List; + import org.apache.baremaps.store.*; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -122,7 +123,8 @@ void testCsvWithDifferentDataTypes() throws IOException { new DataColumnFixed("int_col", DataColumn.Cardinality.REQUIRED, DataColumn.Type.INTEGER), new DataColumnFixed("double_col", DataColumn.Cardinality.REQUIRED, DataColumn.Type.DOUBLE), new DataColumnFixed("bool_col", DataColumn.Cardinality.REQUIRED, DataColumn.Type.BOOLEAN), - new DataColumnFixed("string_col", DataColumn.Cardinality.REQUIRED, DataColumn.Type.STRING)); + new DataColumnFixed("string_col", DataColumn.Cardinality.REQUIRED, + DataColumn.Type.STRING)); DataSchema schema = new DataSchemaImpl("test_table", columns); DataTable dataTable = new CsvDataTable(schema, tempCsvFile, true, ','); assertEquals(2, dataTable.size()); diff --git a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/FlatGeoBuf.java b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBuf.java similarity index 98% rename from baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/FlatGeoBuf.java rename to baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBuf.java index 059de1ade..e0ccce8a3 100644 --- a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/FlatGeoBuf.java +++ b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBuf.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.flatgeobuf.format; +package org.apache.baremaps.flatgeobuf; import java.nio.ByteBuffer; import java.util.List; diff --git a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufDataStore.java b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufDataStore.java similarity index 98% rename from baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufDataStore.java rename to baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufDataStore.java index 6999a1ebe..88425922a 100644 --- a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufDataStore.java +++ b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufDataStore.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.flatgeobuf.store; +package org.apache.baremaps.flatgeobuf; import java.io.IOException; import java.nio.file.Files; diff --git a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufDataTable.java b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufDataTable.java similarity index 95% rename from baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufDataTable.java rename to baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufDataTable.java index 5f4104f89..57f6ab3ad 100644 --- a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufDataTable.java +++ b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufDataTable.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.flatgeobuf.store; +package org.apache.baremaps.flatgeobuf; import java.io.IOException; import java.nio.ByteBuffer; @@ -26,10 +26,7 @@ import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Objects; -import org.apache.baremaps.flatgeobuf.format.FlatGeoBuf; -import org.apache.baremaps.flatgeobuf.format.FlatGeoBufReader; -import org.apache.baremaps.flatgeobuf.format.FlatGeoBufWriter; -import org.apache.baremaps.flatgeobuf.format.PackedRTree; + import org.apache.baremaps.store.*; import org.apache.baremaps.store.DataColumn.Type; diff --git a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/FlatGeoBufReader.java b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufReader.java similarity index 99% rename from baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/FlatGeoBufReader.java rename to baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufReader.java index 35e50597d..d453b31b1 100644 --- a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/FlatGeoBufReader.java +++ b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.flatgeobuf.format; +package org.apache.baremaps.flatgeobuf; import java.io.IOException; import java.io.InputStream; diff --git a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufTypeConversion.java b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufTypeConversion.java similarity index 96% rename from baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufTypeConversion.java rename to baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufTypeConversion.java index 786f8b69d..fd327ca12 100644 --- a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufTypeConversion.java +++ b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufTypeConversion.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package org.apache.baremaps.flatgeobuf.store; +package org.apache.baremaps.flatgeobuf; import java.util.*; -import org.apache.baremaps.flatgeobuf.format.FlatGeoBuf; -import org.apache.baremaps.flatgeobuf.format.FlatGeoBuf.Feature; + +import org.apache.baremaps.flatgeobuf.FlatGeoBuf.Feature; import org.apache.baremaps.flatgeobuf.generated.ColumnType; import org.apache.baremaps.store.*; import org.apache.baremaps.store.DataColumn.Cardinality; diff --git a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/FlatGeoBufWriter.java b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufWriter.java similarity index 99% rename from baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/FlatGeoBufWriter.java rename to baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufWriter.java index 4433d04cf..469740f47 100644 --- a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/FlatGeoBufWriter.java +++ b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/FlatGeoBufWriter.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.flatgeobuf.format; +package org.apache.baremaps.flatgeobuf; import com.google.flatbuffers.FlatBufferBuilder; diff --git a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/GeometryConversions.java b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/GeometryConversions.java similarity index 99% rename from baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/GeometryConversions.java rename to baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/GeometryConversions.java index 6e4711bf8..1951c0052 100644 --- a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/GeometryConversions.java +++ b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/GeometryConversions.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.flatgeobuf.format; +package org.apache.baremaps.flatgeobuf; import com.google.flatbuffers.FlatBufferBuilder; import java.util.Arrays; diff --git a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/PackedRTree.java b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/PackedRTree.java similarity index 99% rename from baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/PackedRTree.java rename to baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/PackedRTree.java index 6063805a1..4c3bf63bf 100644 --- a/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/format/PackedRTree.java +++ b/baremaps-flatgeobuf/src/main/java/org/apache/baremaps/flatgeobuf/PackedRTree.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.flatgeobuf.format; +package org.apache.baremaps.flatgeobuf; import com.google.common.io.LittleEndianDataInputStream; import java.io.IOException; diff --git a/baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufDataTableTest.java b/baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/FlatGeoBufDataTableTest.java similarity index 97% rename from baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufDataTableTest.java rename to baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/FlatGeoBufDataTableTest.java index 5c004b447..fd3794997 100644 --- a/baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/store/FlatGeoBufDataTableTest.java +++ b/baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/FlatGeoBufDataTableTest.java @@ -15,12 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.flatgeobuf.store; +package org.apache.baremaps.flatgeobuf; import static org.junit.jupiter.api.Assertions.*; import java.io.IOException; import java.nio.file.Files; + import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Test; diff --git a/baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/FlatGeoBufTest.java b/baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/FlatGeoBufTest.java index b9c750c17..81316aad3 100644 --- a/baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/FlatGeoBufTest.java +++ b/baremaps-flatgeobuf/src/test/java/org/apache/baremaps/flatgeobuf/FlatGeoBufTest.java @@ -30,9 +30,7 @@ import java.nio.file.StandardOpenOption; import java.util.ArrayList; import java.util.List; -import org.apache.baremaps.flatgeobuf.format.FlatGeoBuf; -import org.apache.baremaps.flatgeobuf.format.FlatGeoBufReader; -import org.apache.baremaps.flatgeobuf.format.FlatGeoBufWriter; + import org.apache.baremaps.flatgeobuf.generated.Feature; import org.apache.baremaps.flatgeobuf.generated.Header; import org.apache.baremaps.testing.TestFiles; diff --git a/baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/store/GeoPackageDataStore.java b/baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/GeoPackageDataStore.java similarity index 98% rename from baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/store/GeoPackageDataStore.java rename to baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/GeoPackageDataStore.java index d28dfca25..74290917a 100644 --- a/baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/store/GeoPackageDataStore.java +++ b/baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/GeoPackageDataStore.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geopackage.store; +package org.apache.baremaps.geopackage; import java.nio.file.Path; diff --git a/baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/store/GeoPackageDataTable.java b/baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/GeoPackageDataTable.java similarity index 99% rename from baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/store/GeoPackageDataTable.java rename to baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/GeoPackageDataTable.java index 95890e6e9..8ea223665 100644 --- a/baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/store/GeoPackageDataTable.java +++ b/baremaps-geopackage/src/main/java/org/apache/baremaps/geopackage/GeoPackageDataTable.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geopackage.store; +package org.apache.baremaps.geopackage; import java.util.*; diff --git a/baremaps-geopackage/src/test/java/org/apache/baremaps/geopackage/store/GeoPackageDataStoreTest.java b/baremaps-geopackage/src/test/java/org/apache/baremaps/geopackage/GeoPackageDataStoreTest.java similarity index 97% rename from baremaps-geopackage/src/test/java/org/apache/baremaps/geopackage/store/GeoPackageDataStoreTest.java rename to baremaps-geopackage/src/test/java/org/apache/baremaps/geopackage/GeoPackageDataStoreTest.java index bf03c1ca8..db27ebd1c 100644 --- a/baremaps-geopackage/src/test/java/org/apache/baremaps/geopackage/store/GeoPackageDataStoreTest.java +++ b/baremaps-geopackage/src/test/java/org/apache/baremaps/geopackage/GeoPackageDataStoreTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geopackage.store; +package org.apache.baremaps.geopackage; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/store/GeoParquetDataStore.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetDataStore.java similarity index 97% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/store/GeoParquetDataStore.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetDataStore.java index 7bf880633..4423be329 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/store/GeoParquetDataStore.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetDataStore.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.store; +package org.apache.baremaps.geoparquet; import java.net.URI; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/store/GeoParquetDataTable.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetDataTable.java similarity index 93% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/store/GeoParquetDataTable.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetDataTable.java index 173879e06..f67daef7b 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/store/GeoParquetDataTable.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetDataTable.java @@ -15,14 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.store; +package org.apache.baremaps.geoparquet; import java.net.URI; import java.util.Iterator; import java.util.Spliterator; import java.util.stream.Stream; -import org.apache.baremaps.geoparquet.format.GeoParquetException; -import org.apache.baremaps.geoparquet.format.GeoParquetReader; + import org.apache.baremaps.store.DataRow; import org.apache.baremaps.store.DataRowImpl; import org.apache.baremaps.store.DataSchema; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetException.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetException.java similarity index 96% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetException.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetException.java index b63daa6cb..6b5f22d05 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetException.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; /** * Exception thrown when an error occurs during the processing of GeoParquet files. diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroup.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroup.java similarity index 97% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroup.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroup.java index 9ffa5da66..e524a229f 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroup.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroup.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import java.util.ArrayList; import java.util.List; -import org.apache.baremaps.geoparquet.format.GeoParquetSchema.EnvelopeField; -import org.apache.baremaps.geoparquet.format.GeoParquetSchema.Field; -import org.apache.baremaps.geoparquet.format.GeoParquetSchema.GroupField; -import org.apache.baremaps.geoparquet.format.GeoParquetSchema.Type; +import org.apache.baremaps.geoparquet.GeoParquetSchema.EnvelopeField; +import org.apache.baremaps.geoparquet.GeoParquetSchema.Field; +import org.apache.baremaps.geoparquet.GeoParquetSchema.GroupField; +import org.apache.baremaps.geoparquet.GeoParquetSchema.Type; import org.apache.parquet.io.api.Binary; import org.apache.parquet.schema.GroupType; import org.locationtech.jts.geom.Envelope; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroupConverter.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroupConverter.java similarity index 98% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroupConverter.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroupConverter.java index 6f46122c4..fd8bd94fc 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroupConverter.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroupConverter.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import org.apache.parquet.io.api.Converter; import org.apache.parquet.io.api.GroupConverter; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroupFactory.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroupFactory.java similarity index 97% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroupFactory.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroupFactory.java index 59590040b..29d254d14 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroupFactory.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroupFactory.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import java.util.List; -import org.apache.baremaps.geoparquet.format.GeoParquetSchema.*; +import org.apache.baremaps.geoparquet.GeoParquetSchema.*; import org.apache.parquet.schema.GroupType; import org.apache.parquet.schema.LogicalTypeAnnotation; import org.apache.parquet.schema.PrimitiveType; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroupRecordMaterializer.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroupRecordMaterializer.java similarity index 98% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroupRecordMaterializer.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroupRecordMaterializer.java index 0f6407786..cb84bb375 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetGroupRecordMaterializer.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetGroupRecordMaterializer.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetMetadata.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetMetadata.java similarity index 98% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetMetadata.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetMetadata.java index 8940a9da1..35f32d63d 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetMetadata.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetMetadata.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.JsonNode; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetPrimitiveConverter.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetPrimitiveConverter.java similarity index 98% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetPrimitiveConverter.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetPrimitiveConverter.java index af26147f7..b001991c2 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetPrimitiveConverter.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetPrimitiveConverter.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import org.apache.parquet.io.api.Binary; import org.apache.parquet.io.api.PrimitiveConverter; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetReader.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetReader.java similarity index 99% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetReader.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetReader.java index 4872f1eb0..e965d250a 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetReader.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetSchema.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetSchema.java similarity index 98% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetSchema.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetSchema.java index 9e3b33c15..f7c1b5454 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetSchema.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetSchema.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import java.util.List; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetSpliterator.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetSpliterator.java similarity index 99% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetSpliterator.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetSpliterator.java index 9c4f16ed1..12d4a2662 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetSpliterator.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetSpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/store/GeoParquetTypeConversion.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetTypeConversion.java similarity index 94% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/store/GeoParquetTypeConversion.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetTypeConversion.java index b20982b86..63b0027bf 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/store/GeoParquetTypeConversion.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetTypeConversion.java @@ -15,16 +15,15 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.store; +package org.apache.baremaps.geoparquet; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.baremaps.geoparquet.format.GeoParquetGroup; -import org.apache.baremaps.geoparquet.format.GeoParquetSchema; -import org.apache.baremaps.geoparquet.format.GeoParquetSchema.Field; -import org.apache.baremaps.geoparquet.format.GeoParquetSchema.GroupField; + +import org.apache.baremaps.geoparquet.GeoParquetSchema.Field; +import org.apache.baremaps.geoparquet.GeoParquetSchema.GroupField; import org.apache.baremaps.store.*; import org.apache.baremaps.store.DataColumn.Cardinality; import org.apache.baremaps.store.DataColumn.Type; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetWriteSupport.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetWriteSupport.java similarity index 99% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetWriteSupport.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetWriteSupport.java index 7cd34e624..b6be38165 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetWriteSupport.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetWriteSupport.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetWriter.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetWriter.java similarity index 98% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetWriter.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetWriter.java index fc849c2da..e2e4292a8 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/GeoParquetWriter.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/GeoParquetWriter.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; diff --git a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/OvertureMaps.java b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/OvertureMaps.java similarity index 96% rename from baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/OvertureMaps.java rename to baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/OvertureMaps.java index df9111760..78c53fbb1 100644 --- a/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/format/OvertureMaps.java +++ b/baremaps-geoparquet/src/main/java/org/apache/baremaps/geoparquet/OvertureMaps.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.s3a.AnonymousAWSCredentialsProvider; diff --git a/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/store/GeoParquetDataStoreTest.java b/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/GeoParquetDataStoreTest.java similarity index 97% rename from baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/store/GeoParquetDataStoreTest.java rename to baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/GeoParquetDataStoreTest.java index 1768dd689..4e16967db 100644 --- a/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/store/GeoParquetDataStoreTest.java +++ b/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/GeoParquetDataStoreTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.store; +package org.apache.baremaps.geoparquet; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/format/GeoParquetReaderTest.java b/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/GeoParquetReaderTest.java similarity index 97% rename from baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/format/GeoParquetReaderTest.java rename to baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/GeoParquetReaderTest.java index 662f463b3..b7b73a9d5 100644 --- a/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/format/GeoParquetReaderTest.java +++ b/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/GeoParquetReaderTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import static org.junit.jupiter.api.Assertions.*; diff --git a/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/format/GeoParquetWriterTest.java b/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/GeoParquetWriterTest.java similarity index 97% rename from baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/format/GeoParquetWriterTest.java rename to baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/GeoParquetWriterTest.java index 0eceb0452..882fa57e6 100644 --- a/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/format/GeoParquetWriterTest.java +++ b/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/GeoParquetWriterTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -25,7 +25,8 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import org.apache.baremaps.geoparquet.format.GeoParquetMetadata.Column; + +import org.apache.baremaps.geoparquet.GeoParquetMetadata.Column; import org.apache.baremaps.testing.TestFiles; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; diff --git a/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/format/OvertureMapsTest.java b/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/OvertureMapsTest.java similarity index 98% rename from baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/format/OvertureMapsTest.java rename to baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/OvertureMapsTest.java index 604c92501..206aa9f19 100644 --- a/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/format/OvertureMapsTest.java +++ b/baremaps-geoparquet/src/test/java/org/apache/baremaps/geoparquet/OvertureMapsTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.geoparquet.format; +package org.apache.baremaps.geoparquet; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTable.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/OpenStreetMapDataTable.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTable.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/OpenStreetMapDataTable.java index 5a60e31ae..1d1f5bb24 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTable.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/OpenStreetMapDataTable.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.store; +package org.apache.baremaps.openstreetmap; import java.io.InputStream; import java.util.*; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.format.OpenStreetMapFormat.EntityReader; -import org.apache.baremaps.openstreetmap.format.model.*; +import org.apache.baremaps.openstreetmap.OpenStreetMapFormat.EntityReader; +import org.apache.baremaps.openstreetmap.model.*; import org.apache.baremaps.store.*; /** @@ -61,7 +61,8 @@ private DataSchema createSchema() { new DataColumnFixed("user", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.STRING), new DataColumnFixed("changeset", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.LONG), new DataColumnFixed("tags", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.NESTED), - new DataColumnFixed("geometry", DataColumn.Cardinality.OPTIONAL, DataColumn.Type.GEOMETRY)); + new DataColumnFixed("geometry", DataColumn.Cardinality.OPTIONAL, + DataColumn.Type.GEOMETRY)); return new DataSchemaImpl("osm_data", columns); } diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/OpenStreetMapFormat.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/OpenStreetMapFormat.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/OpenStreetMapFormat.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/OpenStreetMapFormat.java index 75d99f6fe..1081d45e5 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/OpenStreetMapFormat.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/OpenStreetMapFormat.java @@ -15,17 +15,17 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format; +package org.apache.baremaps.openstreetmap; import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.format.pbf.PbfBlockReader; -import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; -import org.apache.baremaps.openstreetmap.format.state.StateReader; -import org.apache.baremaps.openstreetmap.format.xml.XmlChangeReader; -import org.apache.baremaps.openstreetmap.format.xml.XmlEntityReader; +import org.apache.baremaps.openstreetmap.pbf.PbfBlockReader; +import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; +import org.apache.baremaps.openstreetmap.state.StateReader; +import org.apache.baremaps.openstreetmap.xml.XmlChangeReader; +import org.apache.baremaps.openstreetmap.xml.XmlEntityReader; import org.locationtech.jts.geom.Coordinate; /** diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlobToBlockMapper.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlobToBlockMapper.java similarity index 78% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlobToBlockMapper.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlobToBlockMapper.java index 15ea0da7a..d8b82fff9 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlobToBlockMapper.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlobToBlockMapper.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.function.Function; -import org.apache.baremaps.openstreetmap.format.model.Blob; -import org.apache.baremaps.openstreetmap.format.model.Block; -import org.apache.baremaps.openstreetmap.format.pbf.DataBlockReader; -import org.apache.baremaps.openstreetmap.format.pbf.HeaderBlockReader; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.model.Blob; +import org.apache.baremaps.openstreetmap.model.Block; +import org.apache.baremaps.openstreetmap.pbf.DataBlockReader; +import org.apache.baremaps.openstreetmap.pbf.HeaderBlockReader; +import org.apache.baremaps.openstreetmap.stream.StreamException; /** * Maps a blob to a block. diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlockEntitiesHandler.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlockEntitiesHandler.java similarity index 82% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlockEntitiesHandler.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlockEntitiesHandler.java index 5222ea792..ec4f73dd6 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlockEntitiesHandler.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlockEntitiesHandler.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Block; -import org.apache.baremaps.openstreetmap.format.model.DataBlock; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.HeaderBlock; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.model.Block; +import org.apache.baremaps.openstreetmap.model.DataBlock; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.HeaderBlock; +import org.apache.baremaps.openstreetmap.stream.StreamException; /** Represents an operation on the entities of blocks of different types. */ public class BlockEntitiesHandler implements Consumer { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ChangeEntitiesHandler.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ChangeEntitiesHandler.java similarity index 88% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ChangeEntitiesHandler.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ChangeEntitiesHandler.java index 3ff4ee641..8b92a1130 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ChangeEntitiesHandler.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ChangeEntitiesHandler.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Change; -import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.model.Change; +import org.apache.baremaps.openstreetmap.model.Entity; /** Represents an operation on the entities of a change. */ public class ChangeEntitiesHandler implements Consumer { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/CoordinateMapBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/CoordinateMapBuilder.java similarity index 89% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/CoordinateMapBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/CoordinateMapBuilder.java index c55b68f10..3686b3ffb 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/CoordinateMapBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/CoordinateMapBuilder.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Node; import org.locationtech.jts.geom.Coordinate; /** A consumer that stores openstreetmap coordinates in a map. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityGeometryBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityGeometryBuilder.java similarity index 89% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityGeometryBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityGeometryBuilder.java index 7893fda86..7c1080d58 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityGeometryBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityGeometryBuilder.java @@ -15,17 +15,17 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.List; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.model.Way; import org.locationtech.jts.geom.*; /** A consumer that builds and sets the geometry of OpenStreetMap entities via side effects. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityProjectionTransformer.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityProjectionTransformer.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityProjectionTransformer.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityProjectionTransformer.java index 57e35997c..238fcb8cf 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityProjectionTransformer.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityProjectionTransformer.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Element; -import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.model.Entity; /** Changes the projection of the geometry of an entity via side-effects. */ public class EntityProjectionTransformer implements Consumer { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityToGeometryMapper.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityToGeometryMapper.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityToGeometryMapper.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityToGeometryMapper.java index e40f75b38..6d6b4453f 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityToGeometryMapper.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityToGeometryMapper.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.Optional; import java.util.function.Function; -import org.apache.baremaps.openstreetmap.format.model.*; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.model.*; +import org.apache.baremaps.openstreetmap.stream.StreamException; import org.locationtech.jts.geom.Geometry; /** A function that maps an {@code Entity} to its {@code Geometry}. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/GeometryMapBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/GeometryMapBuilder.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/GeometryMapBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/GeometryMapBuilder.java index 34ef1de33..52e189e0b 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/GeometryMapBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/GeometryMapBuilder.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.Map; import java.util.function.Consumer; import java.util.function.Predicate; -import org.apache.baremaps.openstreetmap.format.model.Element; -import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.model.Entity; import org.locationtech.jts.geom.Geometry; /** diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/NodeGeometryBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/NodeGeometryBuilder.java similarity index 88% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/NodeGeometryBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/NodeGeometryBuilder.java index a8397385d..7c10eddda 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/NodeGeometryBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/NodeGeometryBuilder.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Node; import org.locationtech.jts.geom.*; /** diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ProjectionTransformer.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ProjectionTransformer.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ProjectionTransformer.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ProjectionTransformer.java index 4c2bf8a37..b7b82d0b7 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ProjectionTransformer.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ProjectionTransformer.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.Objects; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.format.utils.CRSUtils; -import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.utils.CRSUtils; +import org.apache.baremaps.openstreetmap.utils.GeometryUtils; import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.impl.CoordinateArraySequence; import org.locationtech.jts.geom.util.GeometryTransformer; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ReferenceMapBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ReferenceMapBuilder.java similarity index 89% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ReferenceMapBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ReferenceMapBuilder.java index efc179c78..b0d042a33 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ReferenceMapBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ReferenceMapBuilder.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.List; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Way; /** A consumer that stores openstreetmap references in a map. */ public class ReferenceMapBuilder implements Consumer { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/RelationMultiPolygonBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/RelationMultiPolygonBuilder.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/RelationMultiPolygonBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/RelationMultiPolygonBuilder.java index ebf411cf0..e406d5924 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/RelationMultiPolygonBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/RelationMultiPolygonBuilder.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Member; -import org.apache.baremaps.openstreetmap.format.model.Member.MemberType; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Member; +import org.apache.baremaps.openstreetmap.model.Member.MemberType; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.utils.GeometryUtils; import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.prep.PreparedGeometryFactory; import org.locationtech.jts.geom.util.GeometryFixer; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/WayGeometryBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/WayGeometryBuilder.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/WayGeometryBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/WayGeometryBuilder.java index f2b4756e2..1df439ac6 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/WayGeometryBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/WayGeometryBuilder.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.function; +package org.apache.baremaps.openstreetmap.function; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Way; import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.util.GeometryFixer; import org.slf4j.Logger; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Blob.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Blob.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Blob.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Blob.java index 7b6ba1697..337c8b35d 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Blob.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Blob.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Block.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Block.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Block.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Block.java index 53e36e63b..815c93ed6 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Block.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Block.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; /** Represents a block of data in an OpenStreetMap dataset. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Bound.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Bound.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Bound.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Bound.java index 976402683..fc798f521 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Bound.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Bound.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; /** Represents the bounds of an OpenStreetMap dataset. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Change.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Change.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Change.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Change.java index 6870bf361..868df68e6 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Change.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Change.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/DataBlock.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/DataBlock.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/DataBlock.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/DataBlock.java index 13862f291..f28d6bbc8 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/DataBlock.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/DataBlock.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Element.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Element.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Element.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Element.java index 4f0a0910f..676b7666f 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Element.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Element.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Entity.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Entity.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Entity.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Entity.java index 90dfbf560..e2476df80 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Entity.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Entity.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Header.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Header.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Header.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Header.java index c33983c6b..cf692df38 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Header.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Header.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/HeaderBlock.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/HeaderBlock.java similarity index 96% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/HeaderBlock.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/HeaderBlock.java index f0684663d..b683db8a2 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/HeaderBlock.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/HeaderBlock.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Info.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Info.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Info.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Info.java index ad2923db5..284d10faa 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Info.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Info.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Member.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Member.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Member.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Member.java index 2944f5bde..1f73d4d2e 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Member.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Member.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Node.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Node.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Node.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Node.java index 6abe4ca4b..4b340cca6 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Node.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Node.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Relation.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Relation.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Relation.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Relation.java index bb8c04ac3..03496cc31 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Relation.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Relation.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/State.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/State.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/State.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/State.java index f6bf49f68..3795825f4 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/State.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/State.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/User.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/User.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/User.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/User.java index 9e95ba1c8..734af1af5 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/User.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/User.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Way.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Way.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Way.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Way.java index f2209a967..c9bb9b558 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Way.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Way.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.model; +package org.apache.baremaps.openstreetmap.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/BlobIterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/BlobIterator.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/BlobIterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/BlobIterator.java index f59c4918d..c5c437c15 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/BlobIterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/BlobIterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.pbf; +package org.apache.baremaps.openstreetmap.pbf; @@ -24,7 +24,7 @@ import java.io.InputStream; import java.util.Iterator; import java.util.NoSuchElementException; -import org.apache.baremaps.openstreetmap.format.model.Blob; +import org.apache.baremaps.openstreetmap.model.Blob; import org.apache.baremaps.osm.binary.Fileformat; /** An iterator over the blobs of an OpenStreetMap PBF {@code InputStream}. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/DataBlockReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/DataBlockReader.java similarity index 93% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/DataBlockReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/DataBlockReader.java index 875b5377c..3ceaadb4e 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/DataBlockReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/DataBlockReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.pbf; +package org.apache.baremaps.openstreetmap.pbf; @@ -29,15 +29,15 @@ import java.util.TimeZone; import java.util.function.Consumer; import java.util.zip.DataFormatException; -import org.apache.baremaps.openstreetmap.format.model.Blob; -import org.apache.baremaps.openstreetmap.format.model.DataBlock; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Info; -import org.apache.baremaps.openstreetmap.format.model.Member; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.model.Way; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.model.Blob; +import org.apache.baremaps.openstreetmap.model.DataBlock; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Info; +import org.apache.baremaps.openstreetmap.model.Member; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.stream.StreamException; import org.apache.baremaps.osm.binary.Osmformat; import org.apache.baremaps.osm.binary.Osmformat.DenseNodes; import org.apache.baremaps.osm.binary.Osmformat.PrimitiveGroup; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/HeaderBlockReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/HeaderBlockReader.java similarity index 89% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/HeaderBlockReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/HeaderBlockReader.java index bdd8bfd15..e0f873bcc 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/HeaderBlockReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/HeaderBlockReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.pbf; +package org.apache.baremaps.openstreetmap.pbf; @@ -24,11 +24,11 @@ import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.util.zip.DataFormatException; -import org.apache.baremaps.openstreetmap.format.model.Blob; -import org.apache.baremaps.openstreetmap.format.model.Bound; -import org.apache.baremaps.openstreetmap.format.model.Header; -import org.apache.baremaps.openstreetmap.format.model.HeaderBlock; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.model.Blob; +import org.apache.baremaps.openstreetmap.model.Bound; +import org.apache.baremaps.openstreetmap.model.Header; +import org.apache.baremaps.openstreetmap.model.HeaderBlock; +import org.apache.baremaps.openstreetmap.stream.StreamException; import org.apache.baremaps.osm.binary.Osmformat; import org.apache.baremaps.osm.binary.Osmformat.HeaderBBox; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfBlockReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfBlockReader.java similarity index 91% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfBlockReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfBlockReader.java index c15a6cb47..52e5e26a9 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfBlockReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfBlockReader.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.pbf; +package org.apache.baremaps.openstreetmap.pbf; import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.format.function.*; -import org.apache.baremaps.openstreetmap.format.model.Block; -import org.apache.baremaps.openstreetmap.format.stream.ConsumerUtils; -import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.function.*; +import org.apache.baremaps.openstreetmap.model.Block; +import org.apache.baremaps.openstreetmap.stream.ConsumerUtils; +import org.apache.baremaps.openstreetmap.stream.StreamUtils; import org.locationtech.jts.geom.Coordinate; /** A utility class for reading an OpenStreetMap pbf file. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfEntityReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfEntityReader.java similarity index 91% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfEntityReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfEntityReader.java index 016f41346..0f5abc7b3 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfEntityReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfEntityReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.pbf; +package org.apache.baremaps.openstreetmap.pbf; @@ -23,10 +23,10 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.format.model.DataBlock; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.HeaderBlock; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.model.DataBlock; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.HeaderBlock; +import org.apache.baremaps.openstreetmap.stream.StreamException; import org.locationtech.jts.geom.Coordinate; /** A utility class for flattening the blocks streamed by a {@link PbfBlockReader}. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfReader.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfReader.java index 66a8da627..f2d46cf43 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfReader.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.pbf; +package org.apache.baremaps.openstreetmap.pbf; -import org.apache.baremaps.openstreetmap.format.OpenStreetMapFormat.EntityReader; +import org.apache.baremaps.openstreetmap.OpenStreetMapFormat.EntityReader; public interface PbfReader extends EntityReader { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/state/StateReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/state/StateReader.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/state/StateReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/state/StateReader.java index 36b7228a9..71bf4d7ec 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/state/StateReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/state/StateReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.state; +package org.apache.baremaps.openstreetmap.state; import com.google.common.io.CharStreams; @@ -32,8 +32,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; -import org.apache.baremaps.openstreetmap.format.OpenStreetMapFormat.Reader; -import org.apache.baremaps.openstreetmap.format.model.State; +import org.apache.baremaps.openstreetmap.OpenStreetMapFormat.Reader; +import org.apache.baremaps.openstreetmap.model.State; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/AccumulatingConsumer.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/AccumulatingConsumer.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/AccumulatingConsumer.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/AccumulatingConsumer.java index 87faf1648..e9ffb95ee 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/AccumulatingConsumer.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/AccumulatingConsumer.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliterator.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliterator.java index 7867de759..5736c6dd2 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BufferedSpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BufferedSpliterator.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BufferedSpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BufferedSpliterator.java index 66c1b6751..cfde53df6 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BufferedSpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BufferedSpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ConsumerUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ConsumerUtils.java similarity index 96% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ConsumerUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ConsumerUtils.java index 1dbf0b28b..f36733ce4 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ConsumerUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ConsumerUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/HoldingConsumer.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/HoldingConsumer.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/HoldingConsumer.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/HoldingConsumer.java index e05532cdf..8cdf22b58 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/HoldingConsumer.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/HoldingConsumer.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliterator.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliterator.java index d9efd9666..68285143e 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ProgressLogger.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ProgressLogger.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ProgressLogger.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ProgressLogger.java index cdca1ace5..168f487b2 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ProgressLogger.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ProgressLogger.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamException.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamException.java similarity index 96% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamException.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamException.java index 30cd70c50..bc3d162b7 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamException.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; /** * When a checked exception occurs in a stream, it is a good practice to wrap that exception in an diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamUtils.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamUtils.java index 782ade920..5b633f857 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; @@ -28,9 +28,9 @@ import java.util.function.Function; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import org.apache.baremaps.openstreetmap.format.stream.BufferedSpliterator.CompletionOrder; -import org.apache.baremaps.openstreetmap.format.stream.BufferedSpliterator.InCompletionOrder; -import org.apache.baremaps.openstreetmap.format.stream.BufferedSpliterator.InSourceOrder; +import org.apache.baremaps.openstreetmap.stream.BufferedSpliterator.CompletionOrder; +import org.apache.baremaps.openstreetmap.stream.BufferedSpliterator.InCompletionOrder; +import org.apache.baremaps.openstreetmap.stream.BufferedSpliterator.InSourceOrder; /** Utility methods for creating parallel, buffered and batched streams of unknown size. */ public class StreamUtils { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/SupplierUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/SupplierUtils.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/SupplierUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/SupplierUtils.java index 3fd77d634..eef97e8e0 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/SupplierUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/SupplierUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ThrowingFunction.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ThrowingFunction.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ThrowingFunction.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ThrowingFunction.java index 9d5d1fd7a..5a59c3f5c 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ThrowingFunction.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ThrowingFunction.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; import static java.util.Objects.requireNonNull; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/CRSUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/CRSUtils.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/CRSUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/CRSUtils.java index a64057210..cb20f8b06 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/CRSUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/CRSUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.utils; +package org.apache.baremaps.openstreetmap.utils; import org.locationtech.proj4j.CRSFactory; import org.locationtech.proj4j.CoordinateReferenceSystem; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/GeometryUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/GeometryUtils.java similarity index 96% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/GeometryUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/GeometryUtils.java index b4f101e8a..d58944096 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/GeometryUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/GeometryUtils.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.utils; +package org.apache.baremaps.openstreetmap.utils; import static org.locationtech.jts.io.WKBConstants.wkbNDR; -import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.util.AffineTransformation; import org.locationtech.jts.io.ParseException; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeReader.java similarity index 87% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeReader.java index e2715e7a9..3aaab2e87 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeReader.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.xml; +package org.apache.baremaps.openstreetmap.xml; import java.io.InputStream; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import org.apache.baremaps.openstreetmap.format.OpenStreetMapFormat.Reader; -import org.apache.baremaps.openstreetmap.format.model.Change; +import org.apache.baremaps.openstreetmap.OpenStreetMapFormat.Reader; +import org.apache.baremaps.openstreetmap.model.Change; /** A utility class for parsing an OpenStreetMap change file. */ public class XmlChangeReader implements Reader> { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java index cd6ee95bf..e52e9531f 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.xml; +package org.apache.baremaps.openstreetmap.xml; import static javax.xml.stream.XMLInputFactory.IS_COALESCING; import static javax.xml.stream.XMLInputFactory.IS_NAMESPACE_AWARE; @@ -38,15 +38,15 @@ import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import org.apache.baremaps.openstreetmap.format.model.Change; -import org.apache.baremaps.openstreetmap.format.model.Element; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Info; -import org.apache.baremaps.openstreetmap.format.model.Member; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.model.Way; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.model.Change; +import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Info; +import org.apache.baremaps.openstreetmap.model.Member; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.stream.StreamException; /** * An object for traversing an OpenStreetMap XML file describing changes (osc.xml) and creating a diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntityReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntityReader.java similarity index 83% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntityReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntityReader.java index e15f10e79..d65761ad6 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntityReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntityReader.java @@ -15,23 +15,23 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.xml; +package org.apache.baremaps.openstreetmap.xml; -import static org.apache.baremaps.openstreetmap.format.stream.ConsumerUtils.consumeThenReturn; +import static org.apache.baremaps.openstreetmap.stream.ConsumerUtils.consumeThenReturn; import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import org.apache.baremaps.openstreetmap.format.OpenStreetMapFormat.EntityReader; -import org.apache.baremaps.openstreetmap.format.function.CoordinateMapBuilder; -import org.apache.baremaps.openstreetmap.format.function.EntityGeometryBuilder; -import org.apache.baremaps.openstreetmap.format.function.EntityProjectionTransformer; -import org.apache.baremaps.openstreetmap.format.function.ReferenceMapBuilder; -import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.OpenStreetMapFormat.EntityReader; +import org.apache.baremaps.openstreetmap.function.CoordinateMapBuilder; +import org.apache.baremaps.openstreetmap.function.EntityGeometryBuilder; +import org.apache.baremaps.openstreetmap.function.EntityProjectionTransformer; +import org.apache.baremaps.openstreetmap.function.ReferenceMapBuilder; +import org.apache.baremaps.openstreetmap.model.Entity; import org.locationtech.jts.geom.Coordinate; /** A utility class for parsing an OpenStreetMap XML file. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliterator.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliterator.java index 2f7a6e608..b94346ad5 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.xml; +package org.apache.baremaps.openstreetmap.xml; import static javax.xml.stream.XMLInputFactory.IS_COALESCING; import static javax.xml.stream.XMLInputFactory.IS_NAMESPACE_AWARE; @@ -40,15 +40,15 @@ import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import org.apache.baremaps.openstreetmap.format.model.Bound; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Header; -import org.apache.baremaps.openstreetmap.format.model.Info; -import org.apache.baremaps.openstreetmap.format.model.Member; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.model.Way; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.model.Bound; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Header; +import org.apache.baremaps.openstreetmap.model.Info; +import org.apache.baremaps.openstreetmap.model.Member; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.stream.StreamException; /** * An object for traversing an OpenStreetMap XML file describing entities (osm.xml) and creating a diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTableTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OpenStreetMapDataTableTest.java similarity index 93% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTableTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OpenStreetMapDataTableTest.java index bb0d11636..9ab5b416b 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTableTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OpenStreetMapDataTableTest.java @@ -15,13 +15,14 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.store; +package org.apache.baremaps.openstreetmap; import static org.junit.jupiter.api.Assertions.*; import java.io.IOException; import java.nio.file.Files; -import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; + +import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Test; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmDataTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmDataTest.java similarity index 96% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmDataTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmDataTest.java index 07668062f..b6921e1ad 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmDataTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmDataTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format; +package org.apache.baremaps.openstreetmap; import static org.apache.baremaps.testing.TestFiles.resolve; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -26,10 +26,10 @@ import java.util.HashMap; import java.util.Map; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.format.model.Element; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; -import org.apache.baremaps.openstreetmap.format.xml.XmlEntityReader; +import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; +import org.apache.baremaps.openstreetmap.xml.XmlEntityReader; import org.jetbrains.annotations.NotNull; import org.junit.Assert; import org.junit.jupiter.api.DynamicTest; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmSampleTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmSampleTest.java similarity index 84% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmSampleTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmSampleTest.java index 164b8a7ee..4236377c5 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmSampleTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmSampleTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format; +package org.apache.baremaps.openstreetmap; import java.io.IOException; @@ -24,16 +24,16 @@ import java.time.LocalDateTime; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.format.model.Bound; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.model.Header; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.model.State; -import org.apache.baremaps.openstreetmap.format.model.Way; -import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; -import org.apache.baremaps.openstreetmap.format.state.StateReader; -import org.apache.baremaps.openstreetmap.format.xml.XmlEntityReader; +import org.apache.baremaps.openstreetmap.model.Bound; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.model.Header; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.model.State; +import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; +import org.apache.baremaps.openstreetmap.state.StateReader; +import org.apache.baremaps.openstreetmap.xml.XmlEntityReader; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/geometry/EntityDataTypeGeometryBuilderTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/geometry/EntityDataTypeGeometryBuilderTest.java similarity index 93% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/geometry/EntityDataTypeGeometryBuilderTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/geometry/EntityDataTypeGeometryBuilderTest.java index 968ac7bab..5e15daebe 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/geometry/EntityDataTypeGeometryBuilderTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/geometry/EntityDataTypeGeometryBuilderTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.geometry; +package org.apache.baremaps.openstreetmap.geometry; import static org.junit.jupiter.api.Assertions.*; @@ -27,14 +27,14 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import org.apache.baremaps.openstreetmap.format.function.EntityGeometryBuilder; -import org.apache.baremaps.openstreetmap.format.model.Info; -import org.apache.baremaps.openstreetmap.format.model.Member; -import org.apache.baremaps.openstreetmap.format.model.Member.MemberType; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.model.Way; -import org.apache.baremaps.openstreetmap.format.utils.CRSUtils; +import org.apache.baremaps.openstreetmap.function.EntityGeometryBuilder; +import org.apache.baremaps.openstreetmap.model.Info; +import org.apache.baremaps.openstreetmap.model.Member; +import org.apache.baremaps.openstreetmap.model.Member.MemberType; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.utils.CRSUtils; import org.junit.jupiter.api.Test; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/state/StateReaderTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/state/StateReaderTest.java similarity index 95% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/state/StateReaderTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/state/StateReaderTest.java index 1fef8c1f0..b06de0f1d 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/state/StateReaderTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/state/StateReaderTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.state; +package org.apache.baremaps.openstreetmap.state; import static org.junit.jupiter.api.Assertions.*; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliteratorTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliteratorTest.java similarity index 98% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliteratorTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliteratorTest.java index f36a205bd..f09d051e1 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliteratorTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliteratorTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliteratorTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliteratorTest.java similarity index 98% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliteratorTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliteratorTest.java index 36465ed35..14bb58958 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliteratorTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliteratorTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtilsTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/StreamUtilsTest.java similarity index 97% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtilsTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/StreamUtilsTest.java index 2dd663bf1..ee0c3889b 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtilsTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/StreamUtilsTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.stream; +package org.apache.baremaps.openstreetmap.stream; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliteratorTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliteratorTest.java similarity index 89% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliteratorTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliteratorTest.java index 8e03a9f75..c7b23d2dc 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliteratorTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliteratorTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.xml; +package org.apache.baremaps.openstreetmap.xml; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -25,9 +25,9 @@ import java.nio.file.Files; import java.util.Spliterator; import java.util.zip.GZIPInputStream; -import org.apache.baremaps.openstreetmap.format.model.Change; -import org.apache.baremaps.openstreetmap.format.stream.AccumulatingConsumer; -import org.apache.baremaps.openstreetmap.format.stream.HoldingConsumer; +import org.apache.baremaps.openstreetmap.model.Change; +import org.apache.baremaps.openstreetmap.stream.AccumulatingConsumer; +import org.apache.baremaps.openstreetmap.stream.HoldingConsumer; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliteratorTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliteratorTest.java similarity index 87% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliteratorTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliteratorTest.java index d13171eb0..50fe0d16c 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliteratorTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliteratorTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.format.xml; +package org.apache.baremaps.openstreetmap.xml; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -24,9 +24,9 @@ import java.io.InputStream; import java.nio.file.Files; import java.util.Spliterator; -import org.apache.baremaps.openstreetmap.format.model.Entity; -import org.apache.baremaps.openstreetmap.format.stream.AccumulatingConsumer; -import org.apache.baremaps.openstreetmap.format.stream.HoldingConsumer; +import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.stream.AccumulatingConsumer; +import org.apache.baremaps.openstreetmap.stream.HoldingConsumer; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/BlockImporter.java b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/BlockImporter.java index 258c827a7..45a6ff356 100644 --- a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/BlockImporter.java +++ b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/BlockImporter.java @@ -20,8 +20,8 @@ import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.*; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.model.*; +import org.apache.baremaps.openstreetmap.stream.StreamException; /** A consumer for importing OpenStreetMap blocks in a database. */ public class BlockImporter implements Consumer { diff --git a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/ChangeElementsImporter.java b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/ChangeElementsImporter.java index c040d5ab4..c4f8de025 100644 --- a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/ChangeElementsImporter.java +++ b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/ChangeElementsImporter.java @@ -18,8 +18,8 @@ package org.apache.baremaps.postgres.openstreetmap; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.Change; -import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.model.Change; +import org.apache.baremaps.openstreetmap.model.Element; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/CopyChangeImporter.java b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/CopyChangeImporter.java index 47686ec99..31195ed66 100644 --- a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/CopyChangeImporter.java +++ b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/CopyChangeImporter.java @@ -20,7 +20,7 @@ import java.util.List; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.*; +import org.apache.baremaps.openstreetmap.model.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/HeaderRepository.java b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/HeaderRepository.java index 1eeade675..eada38ef7 100644 --- a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/HeaderRepository.java +++ b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/HeaderRepository.java @@ -30,7 +30,7 @@ import java.util.List; import java.util.Map; import javax.sql.DataSource; -import org.apache.baremaps.openstreetmap.format.model.Header; +import org.apache.baremaps.openstreetmap.model.Header; import org.apache.baremaps.postgres.copy.CopyWriter; import org.postgresql.PGConnection; import org.postgresql.copy.PGCopyOutputStream; diff --git a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/NodeRepository.java b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/NodeRepository.java index 7d210d1f7..613ec8053 100644 --- a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/NodeRepository.java +++ b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/NodeRepository.java @@ -30,9 +30,9 @@ import java.util.List; import java.util.Map; import javax.sql.DataSource; -import org.apache.baremaps.openstreetmap.format.model.Info; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.model.Info; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.utils.GeometryUtils; import org.apache.baremaps.postgres.copy.CopyWriter; import org.locationtech.jts.geom.Geometry; import org.postgresql.PGConnection; diff --git a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/PutChangeImporter.java b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/PutChangeImporter.java index 271cb5765..960deb756 100644 --- a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/PutChangeImporter.java +++ b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/PutChangeImporter.java @@ -21,7 +21,7 @@ import java.util.List; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.format.model.*; +import org.apache.baremaps.openstreetmap.model.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/RelationRepository.java b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/RelationRepository.java index 06f26d792..362dc7a47 100644 --- a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/RelationRepository.java +++ b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/RelationRepository.java @@ -26,11 +26,11 @@ import java.time.LocalDateTime; import java.util.*; import javax.sql.DataSource; -import org.apache.baremaps.openstreetmap.format.model.Info; -import org.apache.baremaps.openstreetmap.format.model.Member; -import org.apache.baremaps.openstreetmap.format.model.Member.MemberType; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.model.Info; +import org.apache.baremaps.openstreetmap.model.Member; +import org.apache.baremaps.openstreetmap.model.Member.MemberType; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.utils.GeometryUtils; import org.apache.baremaps.postgres.copy.CopyWriter; import org.locationtech.jts.geom.Geometry; import org.postgresql.PGConnection; diff --git a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/WayRepository.java b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/WayRepository.java index c315222f5..754660d4d 100644 --- a/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/WayRepository.java +++ b/baremaps-postgres/src/main/java/org/apache/baremaps/postgres/openstreetmap/WayRepository.java @@ -33,9 +33,9 @@ import java.util.List; import java.util.Map; import javax.sql.DataSource; -import org.apache.baremaps.openstreetmap.format.model.Info; -import org.apache.baremaps.openstreetmap.format.model.Way; -import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.model.Info; +import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.utils.GeometryUtils; import org.apache.baremaps.postgres.copy.CopyWriter; import org.locationtech.jts.geom.Geometry; import org.postgresql.PGConnection; diff --git a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/Constants.java b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/Constants.java index 95db7dfd2..702e822f2 100644 --- a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/Constants.java +++ b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/Constants.java @@ -22,13 +22,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.time.LocalDateTime; -import org.apache.baremaps.openstreetmap.format.model.Header; -import org.apache.baremaps.openstreetmap.format.model.Info; -import org.apache.baremaps.openstreetmap.format.model.Member; -import org.apache.baremaps.openstreetmap.format.model.Member.MemberType; -import org.apache.baremaps.openstreetmap.format.model.Node; -import org.apache.baremaps.openstreetmap.format.model.Relation; -import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.model.Header; +import org.apache.baremaps.openstreetmap.model.Info; +import org.apache.baremaps.openstreetmap.model.Member; +import org.apache.baremaps.openstreetmap.model.Member.MemberType; +import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.model.Way; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.PrecisionModel; diff --git a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/BlockImporterTest.java b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/BlockImporterTest.java index 4c7c1296d..8c6588c32 100644 --- a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/BlockImporterTest.java +++ b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/BlockImporterTest.java @@ -26,7 +26,7 @@ import java.sql.Connection; import java.sql.SQLException; import javax.sql.DataSource; -import org.apache.baremaps.openstreetmap.format.pbf.PbfBlockReader; +import org.apache.baremaps.openstreetmap.pbf.PbfBlockReader; import org.apache.baremaps.postgres.utils.PostgresUtils; import org.apache.baremaps.testing.PostgresContainerTest; import org.junit.jupiter.api.BeforeEach; diff --git a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/HeaderRepositoryTest.java b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/HeaderRepositoryTest.java index dbca6215e..39a01ed01 100644 --- a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/HeaderRepositoryTest.java +++ b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/HeaderRepositoryTest.java @@ -26,7 +26,7 @@ import java.util.Arrays; import java.util.List; -import org.apache.baremaps.openstreetmap.format.model.Header; +import org.apache.baremaps.openstreetmap.model.Header; import org.apache.baremaps.testing.PostgresRepositoryTest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; diff --git a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/NodeRepositoryTest.java b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/NodeRepositoryTest.java index 00944e2b1..b40b9263f 100644 --- a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/NodeRepositoryTest.java +++ b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/NodeRepositoryTest.java @@ -23,8 +23,8 @@ import java.util.Arrays; import java.util.List; -import org.apache.baremaps.openstreetmap.format.model.Element; -import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.model.Node; import org.apache.baremaps.postgres.Constants; import org.apache.baremaps.testing.PostgresRepositoryTest; import org.junit.jupiter.api.BeforeEach; diff --git a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/RelationRepositoryTest.java b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/RelationRepositoryTest.java index 329ce32ab..786c098e6 100644 --- a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/RelationRepositoryTest.java +++ b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/RelationRepositoryTest.java @@ -23,8 +23,8 @@ import java.util.Arrays; import java.util.List; -import org.apache.baremaps.openstreetmap.format.model.Element; -import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.model.Relation; import org.apache.baremaps.postgres.Constants; import org.apache.baremaps.testing.PostgresRepositoryTest; import org.junit.jupiter.api.BeforeEach; diff --git a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/WayRepositoryTest.java b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/WayRepositoryTest.java index c8a502a04..a7735b58e 100644 --- a/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/WayRepositoryTest.java +++ b/baremaps-postgres/src/test/java/org/apache/baremaps/postgres/openstreetmap/WayRepositoryTest.java @@ -23,8 +23,8 @@ import java.util.Arrays; import java.util.List; -import org.apache.baremaps.openstreetmap.format.model.Element; -import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.model.Way; import org.apache.baremaps.postgres.Constants; import org.apache.baremaps.testing.PostgresRepositoryTest; import org.junit.jupiter.api.BeforeEach; diff --git a/baremaps-rpsl/pom.xml b/baremaps-rpsl/pom.xml index f19a22193..a172bc02d 100644 --- a/baremaps-rpsl/pom.xml +++ b/baremaps-rpsl/pom.xml @@ -6,19 +6,24 @@ baremaps 0.7.4-SNAPSHOT - baremaps-rpsl - net.ripe.ipresource ipresource + + org.apache.baremaps + baremaps-store + org.apache.baremaps baremaps-testing test + + org.locationtech.jts + jts-core + - diff --git a/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslAttribute.java b/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslAttribute.java deleted file mode 100644 index eec5523c8..000000000 --- a/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslAttribute.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to you under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.baremaps.rpsl; - -/** - * Represents a RPSL attribute. - */ -public record RpslAttribute(String name, String value) { - -} diff --git a/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslDataRowIterator.java b/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslDataRowIterator.java new file mode 100644 index 000000000..00b303635 --- /dev/null +++ b/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslDataRowIterator.java @@ -0,0 +1,71 @@ +package org.apache.baremaps.rpsl; + +import org.apache.baremaps.store.DataColumn; +import org.apache.baremaps.store.DataRow; +import org.apache.baremaps.store.DataSchema; + +import java.io.InputStream; +import java.util.Iterator; +import java.util.List; + +/** + * An iterator over DataRow objects created from RPSL data. + */ +class RpslDataRowIterator implements Iterator { + + private final Iterator rpslObjectIterator; + private final DataSchema schema; + + public RpslDataRowIterator(InputStream inputStream, DataSchema schema) { + this.schema = schema; + RpslReader rpslReader = new RpslReader(); + this.rpslObjectIterator = rpslReader.read(inputStream).iterator(); + } + + @Override + public boolean hasNext() { + return rpslObjectIterator.hasNext(); + } + + @Override + public DataRow next() { + RpslObject rpslObject = rpslObjectIterator.next(); + return createDataRow(rpslObject); + } + + private DataRow createDataRow(RpslObject rpslObject) { + DataRow dataRow = schema.createRow(); + + for (DataColumn column : schema.columns()) { + String columnName = column.name().toLowerCase(); + + switch (column.cardinality()) { + case REQUIRED: + case OPTIONAL: + Object value = getSingleValue(rpslObject, column); + if (value != null) { + dataRow.set(columnName, value); + } + break; + case REPEATED: + List values = getRepeatedValue(rpslObject, column); + if (values != null && !values.isEmpty()) { + dataRow.set(columnName, values); + } + break; + } + } + + return dataRow; + } + + private Object getSingleValue(RpslObject rpslObject, DataColumn column) { + String columnName = column.name().toLowerCase(); + return rpslObject.first(columnName).orElse(null); + } + + private List getRepeatedValue(RpslObject rpslObject, DataColumn column) { + String columnName = column.name().toLowerCase(); + return rpslObject.all(columnName); + } +} diff --git a/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslDataTable.java b/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslDataTable.java new file mode 100644 index 000000000..c60362e0a --- /dev/null +++ b/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslDataTable.java @@ -0,0 +1,74 @@ +package org.apache.baremaps.rpsl; + + +import org.apache.baremaps.store.*; +import org.apache.baremaps.store.DataColumn.Cardinality; +import org.apache.baremaps.store.DataColumn.Type; + +import java.io.InputStream; +import java.util.*; + +/** + * A DataTable implementation that reads RPSL data using RpslReader. + */ +public class RpslDataTable implements DataTable { + + private final DataSchema schema; + private final InputStream inputStream; + + /** + * Constructs a RpslDataTable with the given InputStream. + * + * @param inputStream the input stream containing RPSL data + */ + public RpslDataTable(InputStream inputStream) { + this.inputStream = inputStream; + this.schema = createSchema(); + } + + /** + * Creates the DataSchema for the RPSL data. + * + * @return the data schema + */ + private DataSchema createSchema() { + List columns = new ArrayList<>(); + columns.add(new DataColumnFixed("type", Cardinality.REQUIRED, Type.STRING)); + columns.add(new DataColumnFixed("id", Cardinality.REQUIRED, Type.STRING)); + columns.add(new DataColumnFixed("inetnum", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("inet6num", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("netname", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("descr", Cardinality.REPEATED, Type.STRING)); + columns.add(new DataColumnFixed("country", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("admin-c", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("tech-c", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("status", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("mnt-by", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("created", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("last-modified", Cardinality.OPTIONAL, Type.STRING)); + columns.add(new DataColumnFixed("changed", Cardinality.REPEATED, Type.STRING)); + return new DataSchemaImpl("RpslObject", columns); + } + + @Override + public DataSchema schema() { + return schema; + } + + @Override + public long size() { + // Size is unknown since we read from a stream + return -1; + } + + @Override + public Iterator iterator() { + return new RpslDataRowIterator(inputStream, schema); + } + + @Override + public void clear() { + throw new UnsupportedOperationException("Clear operation is not supported."); + } +} + diff --git a/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslObject.java b/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslObject.java index 19db5107a..3d040e36a 100644 --- a/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslObject.java +++ b/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslObject.java @@ -20,10 +20,13 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; +import java.util.*; +import java.util.stream.Collectors; +import net.ripe.ipresource.IpRange; /** * Represents a RPSL Object. @@ -89,16 +92,89 @@ public List all(String name) { * * @return the attributes as a map */ - public Map asMap() { - var map = new HashMap(); + public Map> asMap() { + var map = new HashMap>(); for (RpslAttribute attribute : attributes()) { - map.put(attribute.name(), - (map.containsKey(attribute.name()) ? map.get(attribute.name()) + ", " : "") - + attribute.value()); + var list = map.getOrDefault(attribute.name(), new ArrayList<>()); + list.add(attribute.value()); + map.put(attribute.name(), list); } return map; } + /** + * Parses the 'inetnum' attribute into an IpRange. + * + * @return an Optional containing the IpRange + */ + public Optional inetnum() { + return first("inetnum").map(IpRange::parse); + } + + /** + * Parses the 'inet6num' attribute into an IpRange. + * + * @return an Optional containing the IpRange + */ + public Optional inet6num() { + return first("inet6num").map(IpRange::parse); + } + + /** + * Parses the 'changed' attributes into a list of Changed objects. + * + * @return a list of Changed objects + */ + public List changed() { + return all("changed").stream() + .map(RpslChanged::parse) + .collect(Collectors.toList()); + } + + /** + * Parses the 'created' attribute into a LocalDateTime. + * + * @return an Optional containing the creation date + */ + public Optional created() { + return first("created").map(this::parseDateTime); + } + + /** + * Parses the 'last-modified' attribute into a LocalDateTime. + * + * @return an Optional containing the last modification date + */ + public Optional lastModified() { + return first("last-modified").map(this::parseDateTime); + } + + private LocalDateTime parseDateTime(String dateTimeStr) { + try { + return LocalDateTime.parse(dateTimeStr, DateTimeFormatter.ISO_DATE_TIME); + } catch (DateTimeParseException e) { + throw new IllegalArgumentException("Invalid date time format: " + dateTimeStr, e); + } + } + + /** + * Returns the 'status' attribute. + * + * @return an Optional containing the status + */ + public Optional status() { + return first("status"); + } + + /** + * Returns the 'netname' attribute. + * + * @return an Optional containing the netname + */ + public Optional netname() { + return first("netname"); + } + /** * {@inheritDoc} */ @@ -110,4 +186,41 @@ public String toString() { } return stringBuilder.toString(); } + + + /** + * Represents a RPSL attribute. + */ + public record RpslAttribute(String name, String value) { + + } + + /** + * Represents a changed attribute containing an email and a date. + */ + public record RpslChanged(String email, LocalDate date) { + + /** + * Parses a 'changed' attribute string into a Changed object. + * + * @param s the string to parse + * @return the Changed object + */ + public static RpslChanged parse(String s) { + String[] parts = s.trim().split("\\s+"); + if (parts.length != 2) { + throw new IllegalArgumentException("Invalid changed format: " + s); + } + String email = parts[0]; + String dateStr = parts[1]; + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); + LocalDate date; + try { + date = LocalDate.parse(dateStr, formatter); + } catch (DateTimeParseException e) { + throw new IllegalArgumentException("Invalid date format in changed: " + dateStr, e); + } + return new RpslChanged(email, date); + } + } } diff --git a/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslSpliterator.java b/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslSpliterator.java index 4d9de4495..1334c2533 100644 --- a/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslSpliterator.java +++ b/baremaps-rpsl/src/main/java/org/apache/baremaps/rpsl/RpslSpliterator.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.Spliterator; import java.util.function.Consumer; +import org.apache.baremaps.rpsl.RpslObject.RpslAttribute; class RpslSpliterator implements Spliterator { @@ -99,4 +100,3 @@ public int characteristics() { return lineSpliterator.characteristics(); } } - diff --git a/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RpslParserTest.java b/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RpslParserTest.java index d5f57c3be..5eb6703d6 100644 --- a/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RpslParserTest.java +++ b/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RpslParserTest.java @@ -22,6 +22,8 @@ import java.io.IOException; import java.nio.file.Files; import java.util.List; + +import org.apache.baremaps.rpsl.RpslObject.RpslAttribute; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Test; diff --git a/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RsplDataTableTest.java b/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RsplDataTableTest.java new file mode 100644 index 000000000..510ff9aa2 --- /dev/null +++ b/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RsplDataTableTest.java @@ -0,0 +1,49 @@ +package org.apache.baremaps.rpsl; + +import org.apache.baremaps.rpsl.RpslObject.RpslChanged; +import org.apache.baremaps.store.*; +import org.apache.baremaps.testing.TestFiles; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.nio.file.Files; +import java.util.Iterator; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + +class RpslDataTableTest { + + private DataTable dataTable; + + @BeforeEach + public void before() throws IOException { + var file = TestFiles.resolve("baremaps-testing/data/ripe/sample.txt"); + var inputStream = Files.newInputStream(file); + dataTable = new RpslDataTable(inputStream); + } + + @Test + void schema() { + DataSchema schema = dataTable.schema(); + assertEquals("RpslObject", schema.name()); + List columns = schema.columns(); + assertTrue(columns.stream().anyMatch(c -> c.name().equals("type"))); + assertTrue(columns.stream().anyMatch(c -> c.name().equals("id"))); + assertTrue(columns.stream().anyMatch(c -> c.name().equals("inetnum"))); + assertTrue(columns.stream().anyMatch(c -> c.name().equals("inet6num"))); + } + + @Test + void dataRows() { + Iterator iterator = dataTable.iterator(); + + // First object + assertTrue(iterator.hasNext()); + DataRow row1 = iterator.next(); + + System.out.println(row1); + } + +} diff --git a/baremaps-server/src/main/java/org/apache/baremaps/server/GeocoderResource.java b/baremaps-server/src/main/java/org/apache/baremaps/server/GeocoderResource.java index ee7b7a0b2..071e6521e 100644 --- a/baremaps-server/src/main/java/org/apache/baremaps/server/GeocoderResource.java +++ b/baremaps-server/src/main/java/org/apache/baremaps/server/GeocoderResource.java @@ -34,7 +34,7 @@ import java.util.List; import java.util.Map; import org.apache.baremaps.geocoder.geonames.GeonamesQueryBuilder; -import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.stream.StreamException; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.search.SearcherManager; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/CommonByteReader.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/CommonByteReader.java similarity index 98% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/CommonByteReader.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/CommonByteReader.java index e13768df1..31b610193 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/CommonByteReader.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/CommonByteReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DBaseDataType.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DBaseDataType.java similarity index 98% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DBaseDataType.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DBaseDataType.java index 0e0f1cc89..506552634 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DBaseDataType.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DBaseDataType.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; /** * Provides a simple DataType class. diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DBaseFieldDescriptor.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DBaseFieldDescriptor.java similarity index 98% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DBaseFieldDescriptor.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DBaseFieldDescriptor.java index bdb02d1c7..59f4767b0 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DBaseFieldDescriptor.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DBaseFieldDescriptor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DbaseByteReader.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DbaseByteReader.java similarity index 99% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DbaseByteReader.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DbaseByteReader.java index ec1fe5a68..4b0d41154 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DbaseByteReader.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DbaseByteReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DbaseException.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DbaseException.java similarity index 96% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DbaseException.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DbaseException.java index 04241a51d..ed77e6029 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/DbaseException.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/DbaseException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileByteReader.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileByteReader.java similarity index 99% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileByteReader.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileByteReader.java index 83dc51106..68b017a28 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileByteReader.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileByteReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/store/ShapefileDataStore.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileDataStore.java similarity index 98% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/store/ShapefileDataStore.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileDataStore.java index c3957d00d..93281c5df 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/store/ShapefileDataStore.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileDataStore.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.store; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/store/ShapefileDataTable.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileDataTable.java similarity index 95% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/store/ShapefileDataTable.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileDataTable.java index 42a9828fb..1d99a3288 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/store/ShapefileDataTable.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileDataTable.java @@ -15,15 +15,14 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.store; +package org.apache.baremaps.shapefile; import java.io.IOException; import java.nio.file.Path; import java.util.Iterator; import java.util.NoSuchElementException; -import org.apache.baremaps.shapefile.format.ShapefileInputStream; -import org.apache.baremaps.shapefile.format.ShapefileReader; + import org.apache.baremaps.store.DataRow; import org.apache.baremaps.store.DataSchema; import org.apache.baremaps.store.DataStoreException; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileDescriptor.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileDescriptor.java similarity index 99% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileDescriptor.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileDescriptor.java index 866d21b6b..785e3c8f3 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileDescriptor.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileDescriptor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileException.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileException.java similarity index 96% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileException.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileException.java index 5947b6ff5..d07e2d296 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileException.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileGeometryType.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileGeometryType.java similarity index 97% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileGeometryType.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileGeometryType.java index b392415c4..a8b9e6b95 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileGeometryType.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileGeometryType.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileInputStream.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileInputStream.java similarity index 99% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileInputStream.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileInputStream.java index 07211b8d7..ba4030819 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileInputStream.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileInputStream.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileReader.java b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileReader.java similarity index 99% rename from baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileReader.java rename to baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileReader.java index c4b18ea40..3a796befa 100644 --- a/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/format/ShapefileReader.java +++ b/baremaps-shapefile/src/main/java/org/apache/baremaps/shapefile/ShapefileReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.shapefile.format; +package org.apache.baremaps.shapefile; diff --git a/baremaps-store/src/main/java/org/apache/baremaps/store/DataColumnFixed.java b/baremaps-store/src/main/java/org/apache/baremaps/store/DataColumnFixed.java index 20b7aa286..e8e6cdd88 100644 --- a/baremaps-store/src/main/java/org/apache/baremaps/store/DataColumnFixed.java +++ b/baremaps-store/src/main/java/org/apache/baremaps/store/DataColumnFixed.java @@ -20,7 +20,9 @@ /** * A column in a table. */ -public record DataColumnFixed(String name, Cardinality cardinality, +public record DataColumnFixed( + String name, + Cardinality cardinality, Type type) implements DataColumn { } diff --git a/baremaps-store/src/main/java/org/apache/baremaps/store/DataColumnNested.java b/baremaps-store/src/main/java/org/apache/baremaps/store/DataColumnNested.java index 45725b17b..176f0c626 100644 --- a/baremaps-store/src/main/java/org/apache/baremaps/store/DataColumnNested.java +++ b/baremaps-store/src/main/java/org/apache/baremaps/store/DataColumnNested.java @@ -19,7 +19,9 @@ import java.util.List; -public record DataColumnNested(String name, Cardinality cardinality, +public record DataColumnNested( + String name, + Cardinality cardinality, List columns) implements DataColumn { @Override diff --git a/baremaps-testing/pom.xml b/baremaps-testing/pom.xml index c925ba885..fa6163ed1 100644 --- a/baremaps-testing/pom.xml +++ b/baremaps-testing/pom.xml @@ -14,41 +14,42 @@ com.zaxxer HikariCP - provided + compile org.junit.jupiter junit-jupiter-api - provided + compile org.junit.jupiter junit-jupiter-engine - provided + compile org.junit.jupiter junit-jupiter-params - provided + compile org.locationtech.jts jts-core + compile org.testcontainers junit-jupiter - provided + compile org.testcontainers postgresql - provided + compile org.testcontainers testcontainers - provided + compile