This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sis.git
commit 171730ab22cb56ede886bf158a1481ba912d8937 Merge: c6991bf ee858dc Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Fri Jan 7 20:59:59 2022 +0100 Merge branch 'geoapi-4.0' into geoapi-3.1 .../apache/sis/internal/jaxb/gml/TM_Primitive.java | 4 +- .../sis/internal/jaxb/gts/TM_PeriodDuration.java | 18 +- .../metadata/iso/extent/DefaultTemporalExtent.java | 5 - .../apache/sis/internal/jaxb/gml/DummyInstant.java | 67 ----- .../sis/internal/jaxb/gml/TimePeriodTest.java | 28 ++- .../sis/metadata/PropertyConsistencyCheck.java | 6 +- .../sis/metadata/iso/extent/DefaultExtentTest.java | 2 +- .../main/java/org/apache/sis/io/wkt/Formatter.java | 2 +- .../apache/sis/io/wkt/GeodeticObjectParser.java | 15 +- .../referencing/ServicesForMetadataTest.java | 2 - .../apache/sis/test/integration/MetadataTest.java | 24 +- .../sis/test/integration/MetadataVerticalTest.java | 1 - .../org/apache/sis/test/integration/Metadata.xml | 4 +- .../sis/internal/temporal/DefaultInstant.java | 66 +++++ .../sis/internal/temporal/DefaultPeriod.java | 72 ++++++ .../internal/temporal/DefaultPeriodDuration.java | 88 +++++++ .../internal/temporal/DefaultTemporalFactory.java | 150 +++++++++++ .../apache/sis/internal/temporal/Primitive.java | 75 ++++++ .../apache/sis/internal/temporal/package-info.java | 27 ++ .../sis/internal/util/TemporalUtilities.java | 15 +- .../sis/util/collection/TreeTableFormat.java | 2 +- .../apache/sis/util/logging/MonolineFormatter.java | 2 +- .../src/test/java/org/apache/sis/test/Assert.java | 2 +- ide-project/NetBeans/nbproject/project.properties | 2 +- pom.xml | 2 +- .../apache/sis/storage/landsat/MetadataReader.java | 7 +- .../sis/storage/landsat/MetadataReaderTest.java | 4 +- storage/sis-geotiff/pom.xml | 5 + .../apache/sis/storage/geotiff/GeoTiffStore.java | 8 +- .../sis/storage/geotiff/GeoTiffStoreProvider.java | 22 +- .../sis/storage/geotiff/ImageFileDirectory.java | 12 +- .../org/apache/sis/storage/geotiff/Reader.java | 9 +- .../apache/sis/storage/geotiff/XMLMetadata.java | 192 +++++++++++++- .../sis/storage/geotiff/XMLMetadataTest.java | 159 ++++++++++++ .../apache/sis/test/suite/GeoTiffTestSuite.java | 3 +- .../apache/sis/internal/netcdf/GridMapping.java | 5 +- .../apache/sis/storage/netcdf/MetadataReader.java | 6 +- .../sis/storage/netcdf/NetcdfStoreProvider.java | 5 +- .../sis/storage/netcdf/MetadataReaderTest.java | 4 +- .../sis/internal/storage/MetadataBuilder.java | 186 +++++++------- .../org/apache/sis/internal/storage/Resources.java | 10 + .../sis/internal/storage/Resources.properties | 2 + .../sis/internal/storage/Resources_fr.properties | 2 + .../org/apache/sis/internal/storage/csv/Store.java | 23 +- .../sis/internal/storage/csv/TimeEncoding.java | 4 +- .../sis/internal/storage/csv/package-info.java | 8 +- .../sis/internal/storage/folder/StoreProvider.java | 1 + .../sis/internal/storage/io/ChannelData.java | 38 ++- .../internal/storage/io/InputStreamAdapter.java | 78 ++++-- .../apache/sis/internal/storage/io/Markable.java | 24 +- .../internal/storage/io/OutputStreamAdapter.java | 17 +- .../internal/storage/io/RewindableLineReader.java | 110 ++++++++- .../org/apache/sis/internal/storage/wkt/Store.java | 8 +- .../sis/internal/storage/xml/AbstractProvider.java | 24 +- .../org/apache/sis/storage/DataStoreProvider.java | 244 +++++++++++++++--- .../org/apache/sis/storage/ProbeInputStream.java | 88 +++++++ .../java/org/apache/sis/storage/ProbeReader.java | 90 +++++++ .../org/apache/sis/storage/StorageConnector.java | 106 ++++++-- .../internal/storage/io/ChannelDataOutputTest.java | 4 +- .../storage/io/ChannelImageOutputStreamTest.java | 4 +- .../apache/sis/storage/DataStoreProviderTest.java | 275 +++++++++++++++++++++ .../apache/sis/storage/StorageConnectorTest.java | 202 ++++++++++----- .../apache/sis/test/suite/StorageTestSuite.java | 4 +- .../internal/storage/xml/stream/StaxDataStore.java | 20 +- 64 files changed, 2167 insertions(+), 527 deletions(-) diff --cc core/sis-utility/src/main/java/org/apache/sis/internal/temporal/Primitive.java index 0000000,412c704..20c6100 mode 000000,100644..100644 --- a/core/sis-utility/src/main/java/org/apache/sis/internal/temporal/Primitive.java +++ b/core/sis-utility/src/main/java/org/apache/sis/internal/temporal/Primitive.java @@@ -1,0 -1,75 +1,75 @@@ + /* + * 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.sis.internal.temporal; + -import org.opengis.metadata.Identifier; + import org.opengis.temporal.Duration; + import org.opengis.temporal.RelativePosition; + import org.opengis.temporal.TemporalGeometricPrimitive; + import org.opengis.temporal.TemporalPrimitive; ++import org.opengis.referencing.ReferenceIdentifier; + + + /** + * Base implementation of GeoAPI temporal primitives. This is a temporary class; + * GeoAPI temporal interfaces are expected to change a lot in a future revision. + * + * @author Martin Desruisseaux (Geomatys) + * @version 1.2 + * @since 1.2 + * @module + */ -class Primitive implements TemporalGeometricPrimitive, Identifier { ++class Primitive implements TemporalGeometricPrimitive, ReferenceIdentifier { + /** + * For sub-class constructors. + */ + Primitive() { + } + + /** + * The primary name by which this object is identified. + * This field is inherited from ISO 19111 {@code IdentifiedObject} and is in principle mandatory. + */ + @Override - public final Identifier getName() { ++ public final ReferenceIdentifier getName() { + return this; + } + + /** + * Returns the string representation as the code for this object. This is not a correct identifier code, + * but we use that as a trick for forcing {@link org.apache.sis.util.collection.TreeTableFormat} to show + * the temporal value, because the formatter handles {@link org.opengis.referencing.IdentifiedObject} in + * a special way. + */ + @Override public final String getCode() { + return toString(); + } + + /** position of this primitive relative to another primitive. */ + @Override public final RelativePosition relativePosition(TemporalPrimitive other) { + throw DefaultTemporalFactory.unsupported(); + } + + /** Absolute value of the difference between temporal positions. */ + @Override public final Duration distance(TemporalGeometricPrimitive other) { + throw DefaultTemporalFactory.unsupported(); + } + + /** Duration of this temporal geometric primitive. */ + @Override public final Duration length() { + return null; // Do not throw an exception here; this is invoked by reflection. + } + }