From 6aec71a4dafcae2a13e03c6335d591da48a251dc Mon Sep 17 00:00:00 2001 From: Claus Nagel Date: Mon, 18 Nov 2024 08:31:19 +0100 Subject: [PATCH] minor change --- .../{EnvelopeConfigReader.java => EnvelopeReader.java} | 2 +- .../{EnvelopeConfigWriter.java => EnvelopeWriter.java} | 2 +- .../java/org/citydb/model/encoding/PrefixedNameReader.java | 4 ++-- .../java/org/citydb/model/encoding/PrefixedNameWriter.java | 4 ++-- citydb-query/src/main/java/module-info.java | 1 - citydb-query/src/main/java/org/citydb/query/Query.java | 6 +++--- citydb-tiling/src/main/java/org/citydb/tiling/Tiling.java | 6 +++--- 7 files changed, 12 insertions(+), 13 deletions(-) rename citydb-model/src/main/java/org/citydb/model/encoding/{EnvelopeConfigReader.java => EnvelopeReader.java} (97%) rename citydb-model/src/main/java/org/citydb/model/encoding/{EnvelopeConfigWriter.java => EnvelopeWriter.java} (97%) rename citydb-query/src/main/java/org/citydb/query/feature/FeatureTypesReader.java => citydb-model/src/main/java/org/citydb/model/encoding/PrefixedNameReader.java (94%) rename citydb-query/src/main/java/org/citydb/query/feature/FeatureTypesWriter.java => citydb-model/src/main/java/org/citydb/model/encoding/PrefixedNameWriter.java (95%) diff --git a/citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeConfigReader.java b/citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeReader.java similarity index 97% rename from citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeConfigReader.java rename to citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeReader.java index af69f98c..5b91ccba 100644 --- a/citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeConfigReader.java +++ b/citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeReader.java @@ -32,7 +32,7 @@ import java.lang.reflect.Type; import java.util.List; -public class EnvelopeConfigReader implements ObjectReader { +public class EnvelopeReader implements ObjectReader { @Override public Envelope readObject(JSONReader jsonReader, Type type, Object o, long l) { if (jsonReader.isObject()) { diff --git a/citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeConfigWriter.java b/citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeWriter.java similarity index 97% rename from citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeConfigWriter.java rename to citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeWriter.java index 95300e5b..5de89298 100644 --- a/citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeConfigWriter.java +++ b/citydb-model/src/main/java/org/citydb/model/encoding/EnvelopeWriter.java @@ -30,7 +30,7 @@ import java.lang.reflect.Type; import java.util.List; -public class EnvelopeConfigWriter implements ObjectWriter { +public class EnvelopeWriter implements ObjectWriter { @Override public void write(JSONWriter jsonWriter, Object o, Object o1, Type type, long l) { if (o instanceof Envelope envelope) { diff --git a/citydb-query/src/main/java/org/citydb/query/feature/FeatureTypesReader.java b/citydb-model/src/main/java/org/citydb/model/encoding/PrefixedNameReader.java similarity index 94% rename from citydb-query/src/main/java/org/citydb/query/feature/FeatureTypesReader.java rename to citydb-model/src/main/java/org/citydb/model/encoding/PrefixedNameReader.java index 946b2717..6f02f2ae 100644 --- a/citydb-query/src/main/java/org/citydb/query/feature/FeatureTypesReader.java +++ b/citydb-model/src/main/java/org/citydb/model/encoding/PrefixedNameReader.java @@ -19,7 +19,7 @@ * limitations under the License. */ -package org.citydb.query.feature; +package org.citydb.model.encoding; import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONReader; @@ -30,7 +30,7 @@ import java.util.ArrayList; import java.util.List; -public class FeatureTypesReader implements ObjectReader> { +public class PrefixedNameReader implements ObjectReader> { @Override public List readObject(JSONReader jsonReader, Type type, Object o, long l) { if (jsonReader.isArray()) { diff --git a/citydb-query/src/main/java/org/citydb/query/feature/FeatureTypesWriter.java b/citydb-model/src/main/java/org/citydb/model/encoding/PrefixedNameWriter.java similarity index 95% rename from citydb-query/src/main/java/org/citydb/query/feature/FeatureTypesWriter.java rename to citydb-model/src/main/java/org/citydb/model/encoding/PrefixedNameWriter.java index 483fb17d..139ff902 100644 --- a/citydb-query/src/main/java/org/citydb/query/feature/FeatureTypesWriter.java +++ b/citydb-model/src/main/java/org/citydb/model/encoding/PrefixedNameWriter.java @@ -19,7 +19,7 @@ * limitations under the License. */ -package org.citydb.query.feature; +package org.citydb.model.encoding; import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONWriter; @@ -31,7 +31,7 @@ import java.util.ArrayList; import java.util.List; -public class FeatureTypesWriter implements ObjectWriter> { +public class PrefixedNameWriter implements ObjectWriter> { @Override public void write(JSONWriter jsonWriter, Object o, Object o1, Type type, long l) { if (o instanceof List list) { diff --git a/citydb-query/src/main/java/module-info.java b/citydb-query/src/main/java/module-info.java index 66e90f83..a76a339b 100644 --- a/citydb-query/src/main/java/module-info.java +++ b/citydb-query/src/main/java/module-info.java @@ -10,7 +10,6 @@ exports org.citydb.query.builder.schema; exports org.citydb.query.builder.sql; exports org.citydb.query.executor; - exports org.citydb.query.feature; exports org.citydb.query.filter; exports org.citydb.query.filter.common; exports org.citydb.query.filter.encoding; diff --git a/citydb-query/src/main/java/org/citydb/query/Query.java b/citydb-query/src/main/java/org/citydb/query/Query.java index f71efc4e..cad7579e 100644 --- a/citydb-query/src/main/java/org/citydb/query/Query.java +++ b/citydb-query/src/main/java/org/citydb/query/Query.java @@ -27,9 +27,9 @@ import org.citydb.database.schema.FeatureType; import org.citydb.model.common.Name; import org.citydb.model.common.PrefixedName; +import org.citydb.model.encoding.PrefixedNameReader; +import org.citydb.model.encoding.PrefixedNameWriter; import org.citydb.model.feature.FeatureTypeProvider; -import org.citydb.query.feature.FeatureTypesReader; -import org.citydb.query.feature.FeatureTypesWriter; import org.citydb.query.filter.Filter; import org.citydb.query.filter.encoding.FilterConfigReader; import org.citydb.query.filter.encoding.FilterConfigWriter; @@ -43,7 +43,7 @@ @SerializableConfig(name = "query") public class Query { - @JSONField(serializeUsing = FeatureTypesWriter.class, deserializeUsing = FeatureTypesReader.class) + @JSONField(serializeUsing = PrefixedNameWriter.class, deserializeUsing = PrefixedNameReader.class) private List featureTypes; @JSONField(serializeUsing = FilterConfigWriter.class, deserializeUsing = FilterConfigReader.class) private Filter filter; diff --git a/citydb-tiling/src/main/java/org/citydb/tiling/Tiling.java b/citydb-tiling/src/main/java/org/citydb/tiling/Tiling.java index 663ff424..b6608128 100644 --- a/citydb-tiling/src/main/java/org/citydb/tiling/Tiling.java +++ b/citydb-tiling/src/main/java/org/citydb/tiling/Tiling.java @@ -28,8 +28,8 @@ import org.citydb.database.geometry.GeometryException; import org.citydb.database.srs.SpatialReference; import org.citydb.database.srs.SrsException; -import org.citydb.model.encoding.EnvelopeConfigReader; -import org.citydb.model.encoding.EnvelopeConfigWriter; +import org.citydb.model.encoding.EnvelopeReader; +import org.citydb.model.encoding.EnvelopeWriter; import org.citydb.model.geometry.Envelope; import org.citydb.tiling.options.TileMatrixOrigin; @@ -39,7 +39,7 @@ @SerializableConfig(name = "tilingOptions") public class Tiling { - @JSONField(serializeUsing = EnvelopeConfigWriter.class, deserializeUsing = EnvelopeConfigReader.class) + @JSONField(serializeUsing = EnvelopeWriter.class, deserializeUsing = EnvelopeReader.class) private Envelope extent; private TilingScheme scheme; @JSONField(serializeFeatures = JSONWriter.Feature.WriteEnumUsingToString)