This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 9ab3d881ea11e2687bf2057a132a5e05d5c84d97 Author: Martin Desruisseaux <[email protected]> AuthorDate: Wed Oct 13 11:55:41 2021 +0200 Post 1.1 release: remove deprecated methods. --- .../sis/coverage/grid/GridCoverageBuilder.java | 2 +- .../apache/sis/coverage/grid/GridDerivation.java | 129 +-------------------- .../org/apache/sis/coverage/grid/GridExtent.java | 26 +---- .../org/apache/sis/coverage/grid/GridGeometry.java | 26 +---- .../apache/sis/coverage/grid/ImageRenderer.java | 32 +---- .../apache/sis/internal/jaxb/gts/package-info.java | 5 +- .../sis/metadata/iso/quality/AbstractElement.java | 3 +- .../iso/quality/AbstractTemporalAccuracy.java | 6 +- .../DefaultNonQuantitativeAttributeAccuracy.java | 6 +- .../main/java/org/apache/sis/xml/Namespaces.java | 14 +-- .../main/java/org/apache/sis/xml/package-info.java | 2 +- .../sis/test/xml/AnnotationConsistencyCheck.java | 2 +- .../org/apache/sis/geometry/CoordinateFormat.java | 16 +-- .../java/org/apache/sis/geometry/package-info.java | 2 +- .../main/java/org/apache/sis/io/wkt/Symbols.java | 26 +---- .../java/org/apache/sis/io/wkt/package-info.java | 2 +- .../apache/sis/referencing/datum/package-info.java | 3 +- .../operation/builder/LocalizationGridBuilder.java | 41 +------ .../operation/builder/package-info.java | 2 +- .../org/apache/sis/referencing/package-info.java | 3 +- .../main/java/org/apache/sis/util/Characters.java | 26 +---- .../apache/sis/util/logging/PerformanceLevel.java | 27 +---- .../org/apache/sis/util/logging/package-info.java | 2 +- .../java/org/apache/sis/util/package-info.java | 2 +- .../sis/util/logging/PerformanceLevelTest.java | 8 +- .../sis/storage/earthobservation/LandsatStore.java | 73 ------------ .../earthobservation/LandsatStoreProvider.java | 44 ------- .../sis/storage/earthobservation/package-info.java | 45 ------- .../apache/sis/internal/sql/feature/Database.java | 6 +- .../java/org/apache/sis/storage/sql/SQLStore.java | 33 +----- .../java/org/apache/sis/storage/DataStore.java | 19 --- 31 files changed, 46 insertions(+), 587 deletions(-) diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageBuilder.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageBuilder.java index 9d8be47..9e1c9c0 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageBuilder.java +++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageBuilder.java @@ -232,7 +232,7 @@ public class GridCoverageBuilder { * @return {@code this} for method invocation chaining. * * @see #flipGridAxis(int) - * @see GridGeometry#GridGeometry(GridExtent, Envelope) + * @see GridGeometry#GridGeometry(GridExtent, Envelope, GridOrientation) */ public GridCoverageBuilder setDomain(final Envelope domain) { return setDomain(domain == null ? null : new GridGeometry(null, domain, GridOrientation.HOMOTHETY)); diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridDerivation.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridDerivation.java index feed88f..6d921de 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridDerivation.java +++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridDerivation.java @@ -79,7 +79,7 @@ import org.opengis.coverage.PointOutsideCoverageException; * * @author Martin Desruisseaux (Geomatys) * @author Alexis Manin (Geomatys) - * @version 1.1 + * @version 1.2 * * @see GridGeometry#derive() * @see GridGeometry#reduce(int...) @@ -405,94 +405,6 @@ public class GridDerivation { } /** - * Requests a grid geometry where cell sizes have been scaled by the given factors, which result in a change of grid size. - * The new grid geometry is given a <cite>"grid to CRS"</cite> transform computed as the concatenation of given scale factors - * (applied on grid indices) followed by the {@linkplain GridGeometry#getGridToCRS(PixelInCell) grid to CRS} transform of the - * grid geometry specified at construction time. The resulting grid extent can be specified explicitly (typically as an extent - * computed by {@link GridExtent#resize(long...)}) or computed automatically by this method. - * - * <div class="note"><b>Example:</b> - * if the original grid geometry had an extent of [0 … 5] in <var>x</var> and [0 … 8] in <var>y</var>, then a call to - * {@code resize(null, 0.1, 0.1)} will build a grid geometry with an extent of [0 … 50] in <var>x</var> and [0 … 80] in <var>y</var>. - * This new extent covers the same geographic area than the old extent but with pixels having a size of 0.1 times the old pixels size. - * The <cite>grid to CRS</cite> transform of the new grid geometry will be pre-concatenated with scale factors of 0.1 in compensation - * for the shrink in pixels size.</div> - * - * <p>Notes:</p> - * <ul> - * <li>This method can be invoked only once.</li> - * <li>This method can not be used together with a {@code subgrid(…)} method.</li> - * <li>If a non-default rounding mode or a non-default clipping mode is desired, - * they should be {@linkplain #rounding(GridRoundingMode) specified} before to invoke this method.</li> - * <li>If the grid extent is recomputed by this method, then the {@linkplain #margin(int...) margin} and - * {@linkplain #chunkSize(int...)} will be taken in account.</li> - * <li>This method does not reduce the number of dimensions of the grid geometry. - * For dimensionality reduction, see {@link GridGeometry#reduce(int...)}.</li> - * </ul> - * - * The {@code scales} parameter in this method can be seen as an alternative to the {@code resolution} parameter - * in {@link #subgrid(Envelope, double...)} working in grid coordinates space instead of CRS coordinates space. - * - * @param extent the grid extent to set as a result of the given scale, or {@code null} for computing it automatically. - * If non-null, then this given extent is used <i>as-is</i> without checking intersection with the base - * grid geometry. - * @param scales the scale factors to apply on grid indices. If the length of this array is smaller than the number of - * grid dimension, then a scale of 1 is assumed for all missing dimensions. - * @return {@code this} for method call chaining. - * @throws IllegalStateException if a {@link #subgrid(GridGeometry) subgrid(…)} or {@link #slice(DirectPosition) slice(…)} - * method has already been invoked. - * - * @see #subsample(int...) - * @see GridExtent#resize(long...) - * - * @deprecated This method does not handle margin, chunk size and clipping according their contract. - * It is replaced by {@link #subgrid(GridExtent, int...)}. - */ - @Deprecated - @SuppressWarnings("AssignmentToCollectionOrArrayFieldFromParameter") - public GridDerivation resize(GridExtent extent, double... scales) { - ensureSubgridNotSet(); - ArgumentChecks.ensureNonNull("scales", scales); - base.getGridToCRS(PixelInCell.CELL_CENTER); // For making sure that the transform exist. - final int n = base.getDimension(); - if (extent != null) { - final int actual = extent.getDimension(); - if (actual != n) { - throw new IllegalArgumentException(Errors.format( - Errors.Keys.MismatchedDimension_3, "extent", n, actual)); - } - } - subGridSetter = "resize"; - /* - * Computes the affine transform to pre-concatenate with the `gridToCRS` transform. - * This is the simplest calculation done in this class since we are already in grid coordinates. - * The given `scales` array will become identical to `this.scales` after length adjustment. - */ - final int actual = scales.length; - scales = Arrays.copyOf(scales, n); - if (actual < n) { - Arrays.fill(scales, actual, n, 1); - } - toBase = MathTransforms.scale(scales); - /* - * If the user did not specified explicitly the resulting grid extent, compute it now. - * This operation should never fail since we use a known implementation of MathTransform, - * unless some of the given scale factors were too close to zero. - */ - if (extent == null && baseExtent != null) try { - final LinearTransform mt = toBase.inverse(); - final GeneralEnvelope indices = baseExtent.toCRS(mt, mt, null); - extent = new GridExtent(indices, rounding, clipping, margin, chunkSize, null, null); - // PROBLEM! `margin` and `chunkSize` are not in `scaledExtent` unit. - } catch (TransformException e) { - throw new IllegalArgumentException(e); - } - scaledExtent = extent; - // Note: current version does not update `baseExtent`. - return this; - } - - /** * Adapts the base grid for the geographic area and resolution of the given grid geometry. * The new grid geometry will cover the spatiotemporal region given by {@code areaOfInterest} envelope * (coordinate operations are applied as needed if the Coordinate Reference Systems are not the same). @@ -969,13 +881,8 @@ public class GridDerivation { * @see #subgrid(GridExtent, int...) * @see #getSubsampling() * @see GridExtent#subsample(int...) - * - * @deprecated Replaced by {@link #subgrid(GridExtent, int...)} with a {@code null} extent. */ - @Deprecated - // TODO: make private (do not delete) after next SIS release. - public GridDerivation subsample(final int... subsampling) { - ArgumentChecks.ensureNonNull("subsampling", subsampling); + private GridDerivation subsample(final int... subsampling) { if (toBase != null) { throw new IllegalStateException(Errors.format(Errors.Keys.ValueAlreadyDefined_1, "subsampling")); } @@ -1258,25 +1165,6 @@ public class GridDerivation { } /** - * @deprecated Renamed {@link #getSubsampling()} (without "s" because "subsampling" is uncountable). - */ - @Deprecated - public int[] getSubsamplings() { - final int[] subsamplings; - if (toBase == null) { - subsamplings = new int[base.getDimension()]; - Arrays.fill(subsamplings, 1); - } else { - subsamplings = new int[toBase.getSourceDimensions()]; - final Matrix affine = toBase.getMatrix(); - for (int i=0; i < subsamplings.length; i++) { - subsamplings[i] = roundSubsampling(affine.getElement(i,i), i); - } - } - return subsamplings; - } - - /** * Returns the strides for accessing cells along each axis of the base grid. * Those values define part of the conversion from <em>derived</em> grid coordinates * (<var>x</var>, <var>y</var>, <var>z</var>) to {@linkplain #base} grid coordinates @@ -1447,19 +1335,6 @@ public class GridDerivation { } /** - * Returns an <em>estimation</em> of the scale factor when converting sub-grid coordinates to {@link #base} grid coordinates. - * This is for information purpose only since this method combines potentially different scale factors for all dimensions. - * - * @return an <em>estimation</em> of the scale factor for all dimensions. - * - * @deprecated To be removed for avoiding operations that mix potentially unrelated dimensions. - */ - @Deprecated - public double getGlobalScale() { - return java.util.stream.IntStream.of(getSubsampling()).average().getAsDouble(); - } - - /** * Returns a tree representation of this {@code GridDerivation}. * The tree representation is for debugging purpose only and may change in any future SIS version. * diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java index deafcc9..866b38d 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java +++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java @@ -294,10 +294,10 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable * * <p>An optional (nullable) {@code axisTypes} argument can be used for attaching a label to each grid axis. * For example if this {@code GridExtent} is four-dimensional, then the axis types may be - * {{@linkplain DimensionNameType#COLUMN column} (<var>x</var>), - * {@linkplain DimensionNameType#ROW row} (<var>y</var>), - * {@linkplain DimensionNameType#VERTICAL vertical (<var>z</var>), - * {@linkplain DimensionNameType#TIME time} (<var>t</var>)}, + * {{@linkplain DimensionNameType#COLUMN column} (<var>x</var>), + * {@linkplain DimensionNameType#ROW row} (<var>y</var>), + * {@linkplain DimensionNameType#VERTICAL vertical} (<var>z</var>), + * {@linkplain DimensionNameType#TIME time} (<var>t</var>)}, * which means that the last axis is for the temporal dimension, the third axis is for the vertical dimension, <i>etc.</i> * This information is related to the "real world" coordinate reference system axes, but not necessarily in the same order; * it is caller responsibility to ensure that the grid axes are consistent with the CRS axes. @@ -1050,14 +1050,6 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable } /** - * @deprecated Renamed {@link #insertDimension(int, DimensionNameType, long, long, boolean)}. - */ - @Deprecated - public GridExtent insert(final int offset, final DimensionNameType axisType, final long low, long high, final boolean isHighIncluded) { - return insertDimension(offset, axisType, low, high, isHighIncluded); - } - - /** * Returns a new grid envelope with the specified dimension inserted at the given index in this grid envelope. * To append a new dimension after all existing dimensions, set {@code offset} to {@link #getDimension()}. * @@ -1211,7 +1203,7 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable * @return a grid extent having the given sizes, or {@code this} if there is no change. * @throws ArithmeticException if resizing this extent to the given size overflows {@code long} capacity. * - * @see GridDerivation#resize(GridExtent, double...) + * @see GridDerivation#subgrid(GridExtent, int...) */ public GridExtent resize(final long... sizes) { ArgumentChecks.ensureNonNull("sizes", sizes); @@ -1242,14 +1234,6 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable } /** - * @deprecated Renamed {@link #reduceDimension(int...)}. - */ - @Deprecated - public GridExtent reduce(int... dimensions) { - return reduceDimension(dimensions); - } - - /** * Returns a grid extent that encompass only some dimensions of this grid extent. * This method copies the specified dimensions of this grid extent into a new grid extent. * The given dimensions must be in strictly ascending order without duplicated values. diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java index d9e6d8c..8c5e7a1 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java +++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java @@ -125,7 +125,7 @@ import org.apache.sis.xml.NilReason; * The same instance can be shared by different {@link GridCoverage} instances. * * @author Martin Desruisseaux (IRD, Geomatys) - * @version 1.1 + * @version 1.2 * @since 1.0 * @module */ @@ -576,30 +576,6 @@ public class GridGeometry implements LenientComparable, Serializable { } /** - * Creates a grid geometry with an extent and an envelope. - * This constructor can be used when the <cite>grid to CRS</cite> transform is unknown. - * If only the coordinate reference system is known, then the envelope coordinates can be - * {@link GeneralEnvelope#isAllNaN() NaN}. - * - * <p>This constructor is generally not recommended since creating a <cite>grid to CRS</cite> from an envelope - * requires assumption on axis order and axis directions. This constructor assumes that all grid axes are in the - * same order than CRS axes and no axis is flipped. This straightforward approach often results in the <var>y</var> - * axis to be oriented toward up, not down as expected in rendered images. Those assumptions are often not suitable. - * For better control, use one of the constructors expecting a {@link MathTransform} argument instead. - * This constructor is provided mostly as a convenience for testing purposes, or when only the extent is known.</p> - * - * @param extent the valid extent of grid coordinates, or {@code null} if unknown. - * @param envelope the envelope together with CRS of the "real world" coordinates, or {@code null} if unknown. - * @throws NullPointerException if {@code extent} and {@code envelope} arguments are both null. - * - * @deprecated Replaced by {@link #GridGeometry(GridExtent, Envelope, GridOrientation)}. - */ - @Deprecated - public GridGeometry(final GridExtent extent, final Envelope envelope) { - this(extent, envelope, GridOrientation.HOMOTHETY); - } - - /** * Creates an axis-aligned grid geometry with an extent and an envelope. * This constructor can be used when the <cite>grid to CRS</cite> transform is unknown. * If only the coordinate reference system is known, then the envelope coordinates can be diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java index 0d58be9..e269dc3 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java +++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java @@ -97,7 +97,7 @@ import static org.apache.sis.image.PlanarImage.GRID_GEOMETRY_KEY; * Support for tiled images will be added in a future version. * * @author Martin Desruisseaux (Geomatys) - * @version 1.1 + * @version 1.2 * * @see GridCoverage#render(GridExtent) * @@ -542,20 +542,6 @@ public class ImageRenderer { } /** - * @deprecated Replaced by {@link #setData(DataType, Buffer...)}. - * - * @param dataType type of data as one of {@link DataBuffer#TYPE_BYTE}, {@link DataBuffer#TYPE_SHORT TYPE_SHORT} - * {@link DataBuffer#TYPE_USHORT TYPE_USHORT}, {@link DataBuffer#TYPE_INT TYPE_INT}, - * {@link DataBuffer#TYPE_FLOAT TYPE_FLOAT} or {@link DataBuffer#TYPE_DOUBLE TYPE_DOUBLE} constants. - * @param data the buffers wrapping arrays of primitive type. - * @throws RasterFormatException if {@code dataType} is not a supported value. - */ - @Deprecated - public void setData(final int dataType, final Buffer... data) { - setData(DataType.forDataBufferType(dataType), data); - } - - /** * Sets the data as vectors. The number of vectors must be equal to the {@linkplain #getNumBands() expected number of bands}. * All vectors must be backed by arrays (indirectly, through {@linkplain Vector#buffer() buffers} backed by arrays) and have * the same {@linkplain Vector#size() size}. @@ -617,14 +603,6 @@ public class ImageRenderer { } /** - * @deprecated Renamed {@link #createRaster()}. - */ - @Deprecated - public WritableRaster raster() { - return (WritableRaster) createRaster(); - } - - /** * Creates a raster with the data specified by the last call to a {@code setData(…)} method. * The raster upper-left corner is located at the position given by {@link #getBounds()}. * The returned raster is often an instance of {@link WritableRaster}, but read-only rasters are also allowed. @@ -669,14 +647,6 @@ public class ImageRenderer { } /** - * @deprecated Renamed {@link #createImage()}. - */ - @Deprecated - public RenderedImage image() { - return createImage(); - } - - /** * Creates an image with the data specified by the last call to a {@code setData(…)} method. * The image upper-left corner is located at the position given by {@link #getBounds()}. * The two-dimensional {@linkplain #getImageGeometry(int) image geometry} is stored as diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java index 916296f..1189f31 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java @@ -25,8 +25,8 @@ * @since 0.3 * @module */ -@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GTS, xmlns = { - @XmlNs(prefix = "gts", namespaceURI = Namespaces.GTS), +@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = LegacyNamespaces.GTS, xmlns = { + @XmlNs(prefix = "gts", namespaceURI = LegacyNamespaces.GTS), @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO) }) @XmlAccessorType(XmlAccessType.NONE) @@ -37,4 +37,5 @@ import javax.xml.bind.annotation.XmlNsForm; import javax.xml.bind.annotation.XmlSchema; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; +import org.apache.sis.internal.xml.LegacyNamespaces; import org.apache.sis.xml.Namespaces; diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java index 4dd8586..8902b1c 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java @@ -43,7 +43,6 @@ import org.apache.sis.internal.jaxb.FilterByVersion; import org.apache.sis.internal.xml.LegacyNamespaces; import org.apache.sis.util.collection.CheckedContainer; import org.apache.sis.util.resources.Errors; -import org.apache.sis.xml.Namespaces; import static org.apache.sis.util.collection.Containers.isNullOrEmpty; import static org.apache.sis.internal.metadata.MetadataUtilities.valueIfDefined; @@ -537,7 +536,7 @@ public class AbstractElement extends ISOMetadata implements Element { * @return date or range of dates on which a data quality measure was applied. */ @Override - @XmlElement(name = "dateTime", namespace = Namespaces.GMD) + @XmlElement(name = "dateTime", namespace = LegacyNamespaces.GMD) @SuppressWarnings("ReturnOfCollectionOrArrayField") public Collection<Date> getDates() { if (Semaphores.query(Semaphores.NULL_COLLECTION)) { diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java index 3c0e588..4efd56c 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java @@ -23,7 +23,7 @@ import org.opengis.metadata.quality.TemporalAccuracy; import org.opengis.metadata.quality.TemporalValidity; import org.opengis.metadata.quality.TemporalConsistency; import org.opengis.metadata.quality.AccuracyOfATimeMeasurement; -import org.apache.sis.xml.Namespaces; +import org.apache.sis.internal.xml.LegacyNamespaces; /** @@ -48,8 +48,8 @@ import org.apache.sis.xml.Namespaces; * @since 0.3 * @module */ -@XmlType(name = "AbstractDQ_TemporalAccuracy_Type", namespace = Namespaces.GMD) // TODO: renamed TemporalQuality -@XmlRootElement(name = "AbstractDQ_TemporalAccuracy", namespace = Namespaces.GMD) +@XmlType(name = "AbstractDQ_TemporalAccuracy_Type", namespace = LegacyNamespaces.GMD) // TODO: renamed TemporalQuality +@XmlRootElement(name = "AbstractDQ_TemporalAccuracy", namespace = LegacyNamespaces.GMD) @XmlSeeAlso({ DefaultAccuracyOfATimeMeasurement.class, DefaultTemporalConsistency.class, diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java index 78301d2..98d4627 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java @@ -19,7 +19,7 @@ package org.apache.sis.metadata.iso.quality; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlRootElement; import org.opengis.metadata.quality.NonQuantitativeAttributeAccuracy; -import org.apache.sis.xml.Namespaces; +import org.apache.sis.internal.xml.LegacyNamespaces; /** @@ -43,8 +43,8 @@ import org.apache.sis.xml.Namespaces; * @since 0.3 * @module */ -@XmlType(name = "DQ_NonQuantitativeAttributeAccuracy_Type", namespace = Namespaces.GMD) // TODO: renamed NonQuantitativeAttributeCorrectness -@XmlRootElement(name = "DQ_NonQuantitativeAttributeAccuracy", namespace = Namespaces.GMD) +@XmlType(name = "DQ_NonQuantitativeAttributeAccuracy_Type", namespace = LegacyNamespaces.GMD) // TODO: renamed NonQuantitativeAttributeCorrectness +@XmlRootElement(name = "DQ_NonQuantitativeAttributeAccuracy", namespace = LegacyNamespaces.GMD) public class DefaultNonQuantitativeAttributeAccuracy extends AbstractThematicAccuracy implements NonQuantitativeAttributeAccuracy { diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/Namespaces.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/Namespaces.java index be390bb..fcb6af9 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/xml/Namespaces.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/Namespaces.java @@ -87,7 +87,7 @@ import org.apache.sis.internal.xml.LegacyNamespaces; * @author Quentin Boileau (Geomatys) * @author Guilhem Legal (Geomatys) * @author Cullen Rombach (Image Matters) - * @version 1.0 + * @version 1.2 * @since 0.3 * @module */ @@ -443,6 +443,7 @@ public final class Namespaces extends Static { /** * The <code>{@value}</code> URL. * The usual prefix for this namespace is {@code "gmd"}. + * This is a legacy namespace, but still in wide use. * * @category ISO * @@ -453,17 +454,6 @@ public final class Namespaces extends Static { /** * The <code>{@value}</code> URL. - * The usual prefix for this namespace is {@code "gts"}. - * - * @category ISO - * - * @deprecated as of ISO 19115-3, splitted in many different namespaces. - */ - @Deprecated - public static final String GTS = LegacyNamespaces.GTS; - - /** - * The <code>{@value}</code> URL. * The usual prefix for this namespace is {@code "gml"}. * The 3.2 version is equivalent to ISO 19136. * diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/package-info.java index fbfc76b..c12e529 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/xml/package-info.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/package-info.java @@ -59,7 +59,7 @@ * @author Guilhem Legal (Geomatys) * @author Martin Desruisseaux (Geomatys) * @author Cullen Rombach (Image Matters) - * @version 1.1 + * @version 1.2 * @since 0.3 * @module */ diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java index 6c3ae89..39b5f12 100644 --- a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java +++ b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java @@ -293,7 +293,7 @@ public abstract strictfp class AnnotationConsistencyCheck extends TestCase { } case "dateTime": { if (org.opengis.metadata.quality.Element.class.isAssignableFrom(impl)) { - return Namespaces.GMD; + return LegacyNamespaces.GMD; } break; } diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java index c1e847b..5165fbc 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java @@ -98,7 +98,7 @@ import org.apache.sis.referencing.CRS; * transform the position} before to format it.</p> * * @author Martin Desruisseaux (MPO, IRD, Geomatys) - * @version 1.1 + * @version 1.2 * * @see AngleFormat * @see org.apache.sis.measure.UnitFormat @@ -872,20 +872,6 @@ public class CoordinateFormat extends CompoundFormat<DirectPosition> { } /** - * @deprecated Renamed {@link #setGroundPrecision(Quantity)} - * for avoiding confusion with {@link #setPrecisions(double...)}. - * - * @param resolution the desired resolution. - * @param unit unit of the desired resolution. - * - * @since 1.0 - */ - @Deprecated - public void setPrecision(double resolution, Unit<?> unit) { - setGroundPrecision(Quantities.create(resolution, unit)); - } - - /** * Adjusts the number of fraction digits to show in coordinates for achieving the given precision. * The {@link NumberFormat} and {@link AngleFormat} are configured for coordinates expressed in the * coordinate reference system of the position to format. diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/package-info.java index 156708f..16eb301 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/package-info.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/package-info.java @@ -87,7 +87,7 @@ * * @author Martin Desruisseaux (IRD, Geomatys) * @author Alexis Manin (Geomatys) - * @version 1.1 + * @version 1.2 * @since 0.3 * @module */ diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Symbols.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Symbols.java index a10a2b1..40e2a0e 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Symbols.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Symbols.java @@ -73,7 +73,7 @@ import static org.apache.sis.util.ArgumentChecks.*; * Users can create their own {@code Symbols} instance for parsing or formatting a WKT with different symbols. * * @author Martin Desruisseaux (IRD, Geomatys) - * @version 1.1 + * @version 1.3 * * @see WKTFormat#getSymbols() * @see WKTFormat#setSymbols(Symbols) @@ -632,30 +632,6 @@ public class Symbols implements Localized, Cloneable, Serializable { } /** - * Returns {@code true} if the given WKT contains at least one instance of the {@code AXIS[…]} element. - * Invoking this method is equivalent to invoking - * <code>{@linkplain #containsElement(CharSequence, String) containsElement}(wkt, "AXIS")</code>. - * - * <h4>Use case</h4> - * The check for axis elements is of particular interest because the axis order is a frequent cause - * of confusion when processing geographic data. Some applications just ignore any declared axis order - * in favor of their own hard-coded (<var>longitude</var>, <var>latitude</var>) axis order. - * Consequently, the presence of {@code AXIS[…]} elements in a WKT 1 string is an indication - * that the encoded object may not be understood as intended by some external software products. - * - * @param wkt the WKT to inspect. - * @return {@code true} if the given WKT contains at least one instance of the {@code AXIS[…]} element. - * - * @deprecated The {@code AXIS} element is no longer optional in WKT 2. - * Consequently testing for its presence should not be needed anymore. - */ - @Deprecated - public boolean containsAxis(final CharSequence wkt) { - ensureNonNull("wkt", wkt); - return containsElement(wkt, "AXIS", 0); - } - - /** * Implementation of {@link #containsElement(CharSequence, String)} without verification of argument validity. * * @param wkt the WKT to inspect. diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/package-info.java index 169fa18..5d64aeb 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/package-info.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/package-info.java @@ -83,7 +83,7 @@ * @author Martin Desruisseaux (IRD, Geomatys) * @author Rémi Eve (IRD) * @author Rueben Schulz (UBC) - * @version 1.1 + * @version 1.2 * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html">WKT 2 specification</a> * @see <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/doc-files/WKT.html">Legacy WKT 1</a> diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java index 9d86c82..a54013f 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java @@ -61,7 +61,7 @@ elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GML, xmlns = { @XmlNs(prefix = "gml", namespaceURI = Namespaces.GML), - @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD), + @XmlNs(prefix = "gmd", namespaceURI = LegacyNamespaces.GMD), @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO), @XmlNs(prefix = "xsi", namespaceURI = Namespaces.XSI) }) @@ -86,6 +86,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters; import org.apache.sis.xml.Namespaces; +import org.apache.sis.internal.xml.LegacyNamespaces; import org.apache.sis.internal.jaxb.gco.*; import org.apache.sis.internal.jaxb.gml.DateAdapter; import org.apache.sis.internal.jaxb.metadata.*; diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java index 364c304..73383a1 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java @@ -84,7 +84,7 @@ import static org.apache.sis.referencing.operation.builder.ResidualGrid.SOURCE_D * See the <cite>Linearizers</cite> section in {@link LinearTransformBuilder} for more discussion. * * @author Martin Desruisseaux (Geomatys) - * @version 1.1 + * @version 1.2 * * @see InterpolatedTransform * @see LinearTransform @@ -626,21 +626,6 @@ public class LocalizationGridBuilder extends TransformBuilder { } /** - * Adds transforms to potentially apply on target control points before to compute the transform. - * - * @param projections projections from current target coordinates to other spaces which may result in more linear transforms. - * @param projToGrid the target dimensions to project, or null or omitted for projecting all target dimensions. - * - * @deprecated Replaced by {@link #addLinearizers(Map, boolean, int...)} with {@code compensate = true}. - * - * @since 1.0 - */ - @Deprecated - public void addLinearizers(final Map<String,MathTransform> projections, final int... projToGrid) { - addLinearizers(projections, true, projToGrid); - } - - /** * Creates a transform from the source points to the target points. * This method assumes that source points are precise and all uncertainty is in the target points. * If this transform is close enough to an affine transform, then an instance of {@link LinearTransform} is returned. @@ -889,18 +874,6 @@ public class LocalizationGridBuilder extends TransformBuilder { } /** - * @deprecated Replaced by {@link #errors(boolean)}. - * - * @since 1.0 - */ - @Deprecated - public Statistics[] error(final MathTransform mt) throws NoninvertibleTransformException { - if (mt == transform) return errors(false); - if (mt == linearBuilder.transform()) return errors(true); - throw new IllegalArgumentException(); - } - - /** * Returns a string representation of this builder in the given locale. * Current implementation shows the following information: * @@ -950,19 +923,9 @@ public class LocalizationGridBuilder extends TransformBuilder { } /** - * @deprecated Replaced by {@link #toString(boolean, Locale)}. - * - * @since 1.0 - */ - @Deprecated - public String toString(final Locale locale) { - return toString(false, locale); - } - - /** * Returns a string representation of this builder for debugging purpose. * The string representation is for debugging purpose and may change in any future version. - * The default implementation delegates to {@link #toString(Locale)} with a null locale. + * The default implementation delegates to {@link #toString(boolean, Locale)} with a null locale. * * @return a string representation of this builder. * diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/package-info.java index 2ffb543..d326b59 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/package-info.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/package-info.java @@ -30,7 +30,7 @@ * convenience.</p> * * @author Martin Desruisseaux (Geomatys) - * @version 1.1 + * @version 1.2 * @since 0.5 * @module */ diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java index 0d8c8cf..88924ff 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java @@ -102,7 +102,7 @@ elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GML, xmlns = { @XmlNs(prefix = "gml", namespaceURI = Namespaces.GML), - @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD) + @XmlNs(prefix = "gmd", namespaceURI = LegacyNamespaces.GMD) }) @XmlAccessorType(XmlAccessType.NONE) @XmlJavaTypeAdapters({ @@ -123,6 +123,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters; import org.apache.sis.xml.Namespaces; +import org.apache.sis.internal.xml.LegacyNamespaces; import org.apache.sis.internal.jaxb.gco.*; import org.apache.sis.internal.jaxb.metadata.*; import org.apache.sis.internal.jaxb.referencing.RS_Identifier; diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java b/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java index ab72105..e087a2f 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java +++ b/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java @@ -29,7 +29,7 @@ import org.apache.sis.util.resources.Errors; * symbols. For those symbols, constants are declared in this class. * * @author Martin Desruisseaux (Geomatys) - * @version 1.1 + * @version 1.2 * @since 0.3 * @module */ @@ -399,29 +399,7 @@ public final class Characters extends Static { * @return {@code true} if this subset contains the given character. */ public boolean contains(final int codePoint) { - return containsType(Character.getType(codePoint)); - } - - /** - * Returns {@code true} if this subset contains the characters of the given type. - * The given type shall be one of the {@link Character} constants like - * {@link Character#LOWERCASE_LETTER LOWERCASE_LETTER}, - * {@link Character#UPPERCASE_LETTER UPPERCASE_LETTER}, - * {@link Character#DECIMAL_DIGIT_NUMBER DECIMAL_DIGIT_NUMBER} or - * {@link Character#SPACE_SEPARATOR SPACE_SEPARATOR}. - * - * @param type one of the {@link Character} constants. - * @return {@code true} if this subset contains the characters of the given type. - * - * @see Character#getType(int) - * - * @deprecated to be removed because not used (only {@link #contains(int)} is used in practice) - * and consistency with {@link #contains(int)} is not guaranteed between different - * Java versions. - */ - @Deprecated - public final boolean containsType(final int type) { - return (types & Numerics.bitmask(type)) != 0; + return (types & Numerics.bitmask(Character.getType(codePoint))) != 0; } /** diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java b/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java index a13392c..4e2de91 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java +++ b/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java @@ -50,7 +50,7 @@ import org.apache.sis.util.ArgumentChecks; * </ul> * * @author Martin Desruisseaux (Geomatys) - * @version 1.1 + * @version 1.2 * @since 0.3 * @module */ @@ -61,17 +61,6 @@ public final class PerformanceLevel extends Level { private static final long serialVersionUID = -6547125008284983701L; /** - * The level for logging all time measurements, regardless of their duration. - * The {@linkplain #intValue() value} of this level is 600. - * - * @deprecated Replaced by {@link Level#FINE}. - * - * @see <a href="https://issues.apache.org/jira/browse/SIS-504">SIS-504</a> - */ - @Deprecated - public static final PerformanceLevel PERFORMANCE = new PerformanceLevel("PERFORMANCE", 600, 0); - - /** * The level for logging relatively slow events. By default, only events having an execution * time equals or greater than 1 second are logged at this level. However this threshold can * be changed by a call to <code>SLOW.{@linkplain #setMinDuration(long, TimeUnit)}</code>. @@ -87,16 +76,6 @@ public final class PerformanceLevel extends Level { public static final PerformanceLevel SLOWER = new PerformanceLevel("SLOWER", 630, 10_000_000_000L); /** - * The level for logging only slowest events. - * - * @deprecated Removed for simplification. - * - * @see <a href="https://issues.apache.org/jira/browse/SIS-504">SIS-504</a> - */ - @Deprecated - public static final PerformanceLevel SLOWEST = SLOWER; - - /** * The minimal duration (in nanoseconds) for logging the record. */ private volatile long minDuration; @@ -158,10 +137,6 @@ public final class PerformanceLevel extends Level { @Configuration @SuppressWarnings("fallthrough") public void setMinDuration(long duration, final TimeUnit unit) throws IllegalArgumentException { - if (this == PERFORMANCE) { - SLOW.setMinDuration(duration, unit); - return; - } ArgumentChecks.ensureStrictlyPositive("duration", duration); duration = unit.toNanos(duration); final int value = intValue(); diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java b/core/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java index 34c5b64..5838f8a 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java +++ b/core/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java @@ -50,7 +50,7 @@ * order to give SIS a chance to redirect log events to an other logging framework. * * @author Martin Desruisseaux (Geomatys) - * @version 1.1 + * @version 1.2 * * @see <a href="http://download.oracle.com/javase/6/docs/technotes/guides/logging/overview.html">Java Logging Overview</a> * diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/package-info.java b/core/sis-utility/src/main/java/org/apache/sis/util/package-info.java index e7ef5f6..5c6bf92 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/util/package-info.java +++ b/core/sis-utility/src/main/java/org/apache/sis/util/package-info.java @@ -39,7 +39,7 @@ * * @author Martin Desruisseaux (Geomatys) * @author Alexis Manin (Geomatys) - * @version 1.1 + * @version 1.2 * @since 0.3 * @module */ diff --git a/core/sis-utility/src/test/java/org/apache/sis/util/logging/PerformanceLevelTest.java b/core/sis-utility/src/test/java/org/apache/sis/util/logging/PerformanceLevelTest.java index 6b1da85..5f2a118 100644 --- a/core/sis-utility/src/test/java/org/apache/sis/util/logging/PerformanceLevelTest.java +++ b/core/sis-utility/src/test/java/org/apache/sis/util/logging/PerformanceLevelTest.java @@ -29,7 +29,7 @@ import static org.apache.sis.util.logging.PerformanceLevel.*; * Tests the {@link PerformanceLevel} class. * * @author Martin Desruisseaux (Geomatys) - * @version 1.1 + * @version 1.2 * @since 0.3 * @module */ @@ -39,7 +39,6 @@ public final strictfp class PerformanceLevelTest extends TestCase { */ @Test public void testGetMinDuration() { - assertEquals(0, PERFORMANCE.getMinDuration(TimeUnit.NANOSECONDS)); assertEquals(1, SLOW .getMinDuration(TimeUnit.SECONDS)); assertEquals(10, SLOWER.getMinDuration(TimeUnit.SECONDS)); } @@ -53,17 +52,14 @@ public final strictfp class PerformanceLevelTest extends TestCase { final long t2 = SLOWER.getMinDuration(TimeUnit.SECONDS); try { SLOW.setMinDuration(80, TimeUnit.SECONDS); - assertEquals( 0, PERFORMANCE.getMinDuration(TimeUnit.SECONDS)); assertEquals(80, SLOW .getMinDuration(TimeUnit.SECONDS)); assertEquals(80, SLOWER.getMinDuration(TimeUnit.SECONDS)); SLOWER.setMinDuration(4, TimeUnit.SECONDS); - assertEquals(0, PERFORMANCE.getMinDuration(TimeUnit.SECONDS)); assertEquals(4, SLOW .getMinDuration(TimeUnit.SECONDS)); assertEquals(4, SLOWER.getMinDuration(TimeUnit.SECONDS)); - PERFORMANCE.setMinDuration(6, TimeUnit.SECONDS); - assertEquals(0, PERFORMANCE.getMinDuration(TimeUnit.SECONDS)); + SLOW.setMinDuration(6, TimeUnit.SECONDS); assertEquals(6, SLOW .getMinDuration(TimeUnit.SECONDS)); assertEquals(6, SLOWER.getMinDuration(TimeUnit.SECONDS)); } finally { diff --git a/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java b/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java deleted file mode 100644 index 7d82b5e..0000000 --- a/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java +++ /dev/null @@ -1,73 +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.sis.storage.earthobservation; - -import org.apache.sis.storage.DataStoreException; -import org.apache.sis.storage.StorageConnector; -import org.apache.sis.storage.landsat.LandsatStoreProvider; - - -/** - * Parses Landsat metadata as {@linkplain org.apache.sis.metadata.iso.DefaultMetadata ISO 19115 Metadata} object. - * Landsat data are distributed as a collection of TIFF files, together with a single - * text file like below: - * - * {@preformat text - * GROUP = L1_METADATA_FILE - * GROUP = METADATA_FILE_INFO - * ORIGIN = "Image courtesy of the U.S. Geological Survey" - * REQUEST_ID = "0501403126384_00011" - * LANDSAT_SCENE_ID = "LC81230522014071LGN00" - * FILE_DATE = 2014-03-12T06:06:35Z - * STATION_ID = "LGN" - * PROCESSING_SOFTWARE_VERSION = "LPGS_2.3.0" - * END_GROUP = METADATA_FILE_INFO - * GROUP = PRODUCT_METADATA - * DATA_TYPE = "L1T" - * ELEVATION_SOURCE = "GLS2000" - * OUTPUT_FORMAT = "GEOTIFF" - * SPACECRAFT_ID = "LANDSAT_8" - * SENSOR_ID = "OLI_TIRS" - * etc... - * } - * - * This class reads the content from the given input until the first occurrence of the {@code END} keyword. - * Lines beginning with the {@code #} character (ignoring spaces) are treated as comment lines and ignored. - * - * @author Thi Phuong Hao Nguyen (VNSC) - * @author Martin Desruisseaux (Geomatys) - * @version 1.1 - * @since 0.8 - * @module - * - * @deprecated Moved to the {@link org.apache.sis.storage.landsat} package. - */ -@Deprecated -public class LandsatStore extends org.apache.sis.storage.landsat.LandsatStore { - /** - * Creates a new Landsat store from the given file, URL, stream or character reader. - * This constructor invokes {@link StorageConnector#closeAllExcept(Object)}, - * keeping open only the needed resource. - * - * @param provider the factory that created this {@code DataStore} instance, or {@code null} if unspecified. - * @param connector information about the storage (URL, stream, reader instance, <i>etc</i>). - * @throws DataStoreException if an error occurred while opening the Landsat file. - */ - public LandsatStore(final LandsatStoreProvider provider, final StorageConnector connector) throws DataStoreException { - super(provider, connector); - } -} diff --git a/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStoreProvider.java b/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStoreProvider.java deleted file mode 100644 index 6b34933..0000000 --- a/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStoreProvider.java +++ /dev/null @@ -1,44 +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.sis.storage.earthobservation; - -import org.apache.sis.storage.StorageConnector; - - -/** - * The provider of {@link LandsatStore} instances. Given a {@link StorageConnector} input, - * this class tries to instantiate a {@code LandsatStore}. - * - * <h2>Thread safety</h2> - * The same {@code LandsatStoreProvider} instance can be safely used by many threads without synchronization on - * the part of the caller. However the {@link LandsatStore} instances created by this factory are not thread-safe. - * - * @author Martin Desruisseaux (Geomatys) - * @version 1.1 - * @since 0.8 - * @module - * - * @deprecated Moved to the {@link org.apache.sis.storage.landsat} package. - */ -@Deprecated -public class LandsatStoreProvider extends org.apache.sis.storage.landsat.LandsatStoreProvider { - /** - * Creates a new provider. - */ - public LandsatStoreProvider() { - } -} diff --git a/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/package-info.java b/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/package-info.java deleted file mode 100644 index 14748f7..0000000 --- a/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/package-info.java +++ /dev/null @@ -1,45 +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. - */ - -/** - * Metadata readers for some format used in Earth observation (Landsat, MODIS). - * This package includes mapping from the following formats to ISO 19115 metadata: - * - * <table class="sis"> - * <caption>Earth observation formats</caption> - * <tr> - * <th>Format</th> - * <th>Provider</th> - * <th>Apache SIS notes</th> - * </tr><tr> - * <td>Landsat 8 level 1</td> - * <td>U.S. Geological Survey (USGS)</td> - * <td><a href="../landsat/doc-files/MetadataMapping.html">Mapping from/to ISO 19115</a></td> - * </tr> - * </table> - * - * @author Thi Phuong Hao Nguyen (VNSC) - * @author Minh Chinh Vu (VNSC) - * @author Martin Desruisseaux (Geomatys) - * @version 1.1 - * @since 1.1 - * @module - * - * @deprecated Moved to {@link org.apache.sis.storage.landsat}. - */ -@Deprecated -package org.apache.sis.storage.earthobservation; diff --git a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Database.java b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Database.java index 713d7a3..533fc31 100644 --- a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Database.java +++ b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Database.java @@ -128,14 +128,14 @@ public class Database<G> extends Syntax { /** * All tables known to this {@code Database} in declaration order. * This array contains only the tables specified at initialization time, not the dependencies. - * This field is initialized by {@link #analyze(SQLStore, Connection, GenericName[])} and shall - * not be modified after that point. + * This field is initialized by {@link #analyze(SQLStore, Connection, ResourceDefinition...)} + * and shall not be modified after that point. */ private Table[] tables; /** * {@code true} if this database contains at least one geometry column. - * This field is initialized by {@link #analyze(SQLStore, Connection, GenericName[])} + * This field is initialized by {@link #analyze(SQLStore, Connection, ResourceDefinition...)} * and shall not be modified after that point. * * @see #hasGeometry() diff --git a/storage/sis-sqlstore/src/main/java/org/apache/sis/storage/sql/SQLStore.java b/storage/sis-sqlstore/src/main/java/org/apache/sis/storage/sql/SQLStore.java index 79b0684..5a0f9be 100644 --- a/storage/sis-sqlstore/src/main/java/org/apache/sis/storage/sql/SQLStore.java +++ b/storage/sis-sqlstore/src/main/java/org/apache/sis/storage/sql/SQLStore.java @@ -56,7 +56,7 @@ import org.apache.sis.util.Exceptions; * * @author Johann Sorel (Geomatys) * @author Martin Desruisseaux (Geomatys) - * @version 1.1 + * @version 1.2 * @since 1.0 * @module */ @@ -122,37 +122,6 @@ public class SQLStore extends DataStore implements Aggregate { private final SchemaModifier customizer; /** - * Creates a new instance for the given storage. - * The given {@code connector} shall contain a {@link DataSource}. - * The given table names shall be qualified names of 1, 2 or 3 components. - * The name components are {@code <catalog>.<schema pattern>.<table pattern>} where: - * - * <ul> - * <li>{@code <catalog>}, if present, is the name of a catalog as stored in the database.</li> - * <li>{@code <schema pattern>}, if present, is the pattern of a schema. - * The pattern can use {@code '_'} and {@code '%'} wildcards characters.</li> - * <li>{@code <table pattern>} (mandatory) is the pattern of a table. - * The pattern can use {@code '_'} and {@code '%'} wildcards characters.</li> - * </ul> - * - * Qualified table names can be created by the {@link SQLStoreProvider#createTableName(String, String, String)} - * convenience method. Only the main tables need to be specified; dependencies will be followed automatically. - * - * @param provider the factory that created this {@code DataStore} instance, or {@code null} if unspecified. - * @param connector information about the storage (JDBC data source, <i>etc</i>). - * @param tableNames fully qualified names (including catalog and schema) of the tables to include in this store. - * @throws DataStoreException if an error occurred while creating the data store for the given storage. - * - * @deprecated Replaced by {@link #SQLStore(SQLStoreProvider, StorageConnector, ResourceDefinition...)}. - */ - @Deprecated - public SQLStore(final SQLStoreProvider provider, final StorageConnector connector, GenericName... tableNames) - throws DataStoreException - { - this(provider, connector, ResourceDefinition.wrap(tableNames, null)); - } - - /** * Creates a new {@code SQLStore} for the given data source and tables, views or queries. * The given {@code connector} shall contain a {@link DataSource} instance. * Tables or views to include in the store are specified by the {@code resources} argument. diff --git a/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java b/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java index 60c46b7..ffc73b6 100644 --- a/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java +++ b/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java @@ -141,25 +141,6 @@ public abstract class DataStore implements Resource, Localized, AutoCloseable { /** * Creates a new instance as a child of another data store instance. - * The new instance inherits the parent {@linkplain #getProvider() provider}. - * Events created by this {@code DataStore} are forwarded to listeners registered - * into the parent data store too. - * - * @param parent the parent data store, or {@code null} if none. - * @param connector information about the storage (URL, stream, reader instance, <i>etc</i>). - * @throws DataStoreException if an error occurred while creating the data store for the given storage. - * - * @since 0.8 - * - * @deprecated Replaced by {@link #DataStore(DataStore, DataStoreProvider, StorageConnector, boolean)}. - */ - @Deprecated - protected DataStore(final DataStore parent, final StorageConnector connector) throws DataStoreException { - this(parent, (parent != null) ? parent.provider : null, connector, false); - } - - /** - * Creates a new instance as a child of another data store instance. * Events will be sent not only to {@linkplain #addListener registered listeners} of this {@code DataStore}, * but also to listeners of the {@code parent} data store. Each listener will be notified only once, even if * the same listener is registered in the two places.
