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 609d7f75da94c0da1ddab8568116cf8896de49bf Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Thu Feb 9 10:34:07 2023 +0100 Documentation about static methods. --- .../org/apache/sis/metadata/sql/Citations.sql | 2 +- .../sis/metadata/iso/citation/CitationsTest.java | 2 +- .../sis/metadata/sql/MetadataSourceTest.java | 2 +- .../referencing/PositionalAccuracyConstant.java | 2 +- .../org/apache/sis/internal/util/DoubleDouble.java | 2 +- .../src/main/java/org/apache/sis/io/IO.java | 2 +- .../src/main/java/org/apache/sis/util/Static.java | 100 +++++++++++---------- .../sis/internal/storage/io/IOUtilities.java | 5 +- 8 files changed, 62 insertions(+), 55 deletions(-) diff --git a/core/sis-metadata/src/main/resources/org/apache/sis/metadata/sql/Citations.sql b/core/sis-metadata/src/main/resources/org/apache/sis/metadata/sql/Citations.sql index a6d7c9ab69..2d0626052e 100644 --- a/core/sis-metadata/src/main/resources/org/apache/sis/metadata/sql/Citations.sql +++ b/core/sis-metadata/src/main/resources/org/apache/sis/metadata/sql/Citations.sql @@ -4,7 +4,7 @@ -- -- --- This script creates some tables needed for SIS pre-defined Citation constants. +-- This script creates some tables needed for SIS predefined Citation constants. -- We do not need to create all tables or all table columns here; missing tables -- and columns will be added on-the-fly by SIS as needed. Enumeration values are -- replaced by VARCHAR on databases that do not support the ENUM type. diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java index dbd8b6da7d..ff10ed037c 100644 --- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java +++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java @@ -256,7 +256,7 @@ public final class CitationsTest extends TestCase { assertNotNull(identifiers); try { identifiers.add(null); - fail("Pre-defined metadata shall be unmodifiable."); + fail("Predefined metadata shall be unmodifiable."); } catch (UnsupportedOperationException e) { // This is the expected exception. } diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/sql/MetadataSourceTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/sql/MetadataSourceTest.java index 199df45513..b7ba03d295 100644 --- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/sql/MetadataSourceTest.java +++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/sql/MetadataSourceTest.java @@ -165,7 +165,7 @@ public final class MetadataSourceTest extends TestCase { final InternationalString more = new SimpleInternationalString("An open source project."); try { titles.add(more); - fail("Pre-defined metadata should be unmodifiable."); + fail("Predefined metadata should be unmodifiable."); } catch (UnsupportedOperationException e) { // This is the expected exception. } diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java index 246bdfb7ab..6d28f93f21 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java @@ -41,7 +41,7 @@ import org.apache.sis.util.resources.Vocabulary; /** - * Pre-defined positional accuracy resulting from some coordinate operations. + * Predefined positional accuracy resulting from some coordinate operations. * * @author Martin Desruisseaux (Geomatys) * @version 1.1 diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java index f3a0f85679..a9a5063e85 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java +++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java @@ -91,7 +91,7 @@ public final class DoubleDouble extends Number implements Comparable<DoubleDoubl private static final int ZERO_THRESHOLD = 2; /** - * Pre-defined constants frequently used in SIS, sorted in increasing order. This table contains only + * Predefined constants frequently used in SIS, sorted in increasing order. This table contains only * constants that cannot be inferred by {@link DecimalFunctions#deltaForDoubleToDecimal(double)}, * for example some transcendental values. * diff --git a/core/sis-utility/src/main/java/org/apache/sis/io/IO.java b/core/sis-utility/src/main/java/org/apache/sis/io/IO.java index 736aa2d2d0..b4a36aeb7b 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/io/IO.java +++ b/core/sis-utility/src/main/java/org/apache/sis/io/IO.java @@ -27,7 +27,7 @@ import org.apache.sis.util.resources.Vocabulary; /** - * Utilities methods working on {@link java.io} objects. + * Utilities methods working on {@link Appendable} objects. * * @author Martin Desruisseaux (Geomatys) * @version 0.3 diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/Static.java b/core/sis-utility/src/main/java/org/apache/sis/util/Static.java index 01ca58fb69..29cdbeefe7 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/util/Static.java +++ b/core/sis-utility/src/main/java/org/apache/sis/util/Static.java @@ -18,71 +18,79 @@ package org.apache.sis.util; /** - * Parent of SIS classes that contain only static utility methods, for documentation purpose. + * Parent of SIS classes that contain only static utility methods. + * This parent class is used for documentation purpose only. * The list below summarizes some of the utility classes: * * <table class="sis"> * <caption>Static utility classes (non exhaustive list)</caption> - * <tr><th colspan="2">Classes of the Java language</th></tr> - * <tr><td>{@link Characters}</td> - * <td>Find subscript and superscript digit characters.</td></tr> - * <tr><td>{@link CharSequences}</td> - * <td>Methods working on {@link CharSequence} or {@link String} instances.</td></tr> - * <tr><td>{@link StringBuilders}</td> - * <td>Methods modifying {@link StringBuilder} content in-place.</td></tr> - * <tr><td>{@link Numbers}</td> - * <td>Methods working with {@link Number} instances (include conversions between different types).</td></tr> - * <tr><td>{@link Classes}</td> - * <td>Methods working with {@link Class} instances.</td></tr> - * <tr><td>{@link org.apache.sis.util.collection.Containers}</td> - * <td>Additions to the JDK {@link java.util.Collections} methods, also related to the - * {@link org.apache.sis.util.collection.CheckedContainer} interface.</td></tr> - * <tr><td>{@link ArraysExt}</td> - * <td>Additions to the JDK {@link java.util.Arrays} methods - * (include insert or remove of elements in the middle of arrays).</td></tr> - * - * <tr><th colspan="2" class="hsep">Mathematics and units of measurement</th></tr> - * <tr><td>{@link org.apache.sis.math.MathFunctions}</td> - * <td>Additions to the {@link java.lang.Math} methods.</td></tr> - * <tr><td>{@link org.apache.sis.math.DecimalFunctions}</td> - * <td>Mathematical methods related to base 10 representation of numbers.</td></tr> - * <tr><td>{@link org.apache.sis.referencing.operation.matrix.Matrices}</td> - * <td>Create and compare {@link org.opengis.referencing.operation.Matrix} objects</td></tr> - * <tr><td>{@link org.apache.sis.measure.Units}</td> - * <td>Get a {@linkplain javax.measure.Unit unit} from a symbol or EPSG code, - * and test if a unit is angular, linear or temporal.</td></tr> - * * <tr><th colspan="2" class="hsep">OGC/ISO objects (metadata, referencing, geometries)</th></tr> - * <tr><td>{@link org.apache.sis.util.iso.Types}</td> - * <td>UML identifier and description for GeoAPI types.</td></tr> - * <tr><td>{@link org.apache.sis.util.iso.Names}</td> - * <td>Simple creation and operations on {@link org.opengis.util.GenericName} objects.</td></tr> * <tr><td>{@link org.apache.sis.metadata.iso.citation.Citations}</td> - * <td>Pre-defined {@link org.opengis.metadata.citation.Citation} + * <td>Predefined {@link org.opengis.metadata.citation.Citation} * and methods for comparing against titles or identifiers.</td></tr> - * <tr><td>{@link org.apache.sis.metadata.iso.extent.Extents}</td> - * <td>Extract information from {@link org.opengis.metadata.extent.Extent} objects.</td></tr> + * <tr><td>{@link org.apache.sis.referencing.cs.CoordinateSystems}</td> + * <td>Parses axis names and creates transforms between {@link org.opengis.referencing.cs.CoordinateSystem} + * instances.</td></tr> + * <tr><td>{@link org.apache.sis.referencing.CRS}</td> + * <td>Instantiates or provides information about {@link org.opengis.referencing.crs.CoordinateReferenceSystem}.</td></tr> * <tr><td>{@link org.apache.sis.geometry.Envelopes}</td> * <td>Parse, format and transform {@link org.opengis.geometry.Envelope} objects.</td></tr> + * <tr><td>{@link org.apache.sis.metadata.iso.extent.Extents}</td> + * <td>Extract information from {@link org.opengis.metadata.extent.Extent} objects.</td></tr> * <tr><td>{@link org.apache.sis.referencing.IdentifiedObjects}</td> * <td>Handle names, identifiers or properties of * {@link org.opengis.referencing.IdentifiedObject} instances.</td></tr> - * <tr><td>{@link org.apache.sis.referencing.cs.CoordinateSystems}</td> - * <td>Parses axis names and creates transforms between {@link org.opengis.referencing.cs.CoordinateSystem} - * instances.</td></tr> + * <tr><td>{@link org.apache.sis.util.iso.Names}</td> + * <td>Simple creation and operations on {@link org.opengis.util.GenericName} objects.</td></tr> * <tr><td>{@link org.apache.sis.parameter.Parameters}</td> * <td>Creates, searches or modifies {@link org.opengis.parameter.ParameterValue} instances * in a group of parameters.</td></tr> + * <tr><td>{@link org.apache.sis.util.iso.Types}</td> + * <td>UML identifier and description for GeoAPI types.</td></tr> + * + * <tr><th colspan="2" class="hsep">Mathematics and units of measurement</th></tr> + * <tr><td>{@link org.apache.sis.math.DecimalFunctions}</td> + * <td>Mathematical methods related to base 10 representation of numbers.</td></tr> + * <tr><td>{@link org.apache.sis.math.MathFunctions}</td> + * <td>Additions to the {@link java.lang.Math} methods.</td></tr> + * <tr><td>{@link org.apache.sis.referencing.operation.matrix.Matrices}</td> + * <td>Create and compare {@link org.opengis.referencing.operation.Matrix} objects</td></tr> + * <tr><td>{@link org.apache.sis.measure.Quantities}</td> + * <td>Operations on {@linkplain javax.measure.Quantity quantities} + * (values with units of measurement).</td></tr> + * <tr><td>{@link org.apache.sis.measure.Units}</td> + * <td>Get a {@linkplain javax.measure.Unit unit} from a symbol or EPSG code, + * and test if a unit is angular, linear or temporal.</td></tr> * * <tr><th colspan="2" class="hsep">Input / Output (including CRS, XML, images)</th></tr> - * <tr><td>{@link org.apache.sis.io.IO}</td> - * <td>Methods working on {@link Appendable} instances.</td></tr> * <tr><td>{@link org.apache.sis.storage.DataStores}</td> * <td>Read or write geospatial data in various backends.</td></tr> - * <tr><td>{@link org.apache.sis.xml.XML}</td> - * <td>Marshal or unmarshal ISO 19115 objects.</td></tr> + * <tr><td>{@link org.apache.sis.io.IO}</td> + * <td>Methods working on {@link Appendable} instances.</td></tr> * <tr><td>{@link org.apache.sis.xml.Namespaces}</td> * <td>{@code String} constants for commonly used namespaces.</td></tr> + * <tr><td>{@link org.apache.sis.xml.XML}</td> + * <td>Marshal or unmarshal ISO 19115 objects.</td></tr> + * + * <tr><th colspan="2">Miscellaneous utilities</th></tr> + * <tr><td>{@link ArraysExt}</td> + * <td>Additions to the JDK {@link java.util.Arrays} methods + * (include insert or remove of elements in the middle of arrays).</td></tr> + * <tr><td>{@link Characters}</td> + * <td>Find subscript and superscript digit characters.</td></tr> + * <tr><td>{@link CharSequences}</td> + * <td>Methods working on {@link CharSequence} or {@link String} instances.</td></tr> + * <tr><td>{@link Classes}</td> + * <td>Methods working with {@link Class} instances.</td></tr> + * <tr><td>{@link org.apache.sis.util.collection.Containers}</td> + * <td>Additions to the JDK {@link java.util.Collections} methods, also related to the + * {@link org.apache.sis.util.collection.CheckedContainer} interface.</td></tr> + * <tr><td>{@link Numbers}</td> + * <td>Methods working with {@link Number} instances (include conversions between different types).</td></tr> + * <tr><td>{@link ObjectConverters}</td> + * <td>Create {@link ObjectConverter} instances, or collection views using object converters.</td></tr> + * <tr><td>{@link StringBuilders}</td> + * <td>Methods modifying {@link StringBuilder} content in-place.</td></tr> * * <tr><th colspan="2" class="hsep">Loggings and exceptions</th></tr> * <tr><td>{@link ArgumentChecks}</td> @@ -92,10 +100,6 @@ package org.apache.sis.util; * <tr><td>{@link org.apache.sis.util.logging.Logging}</td> * <td>Get a JDK {@linkplain java.util.logging.Logger logger}, which may be a wrapper around * the <cite>Apache Commons Logging</cite> or <cite>Log4J</cite> framework.</td></tr> - * - * <tr><th colspan="2" class="hsep">Factories</th></tr> - * <tr><td>{@link ObjectConverters}</td> - * <td>Create {@link ObjectConverter} instances, or collection views using object converters.</td></tr> * </table> * * @author Martin Desruisseaux (Geomatys) diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/IOUtilities.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/IOUtilities.java index 7e4ca240b6..e11700a9bf 100644 --- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/IOUtilities.java +++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/IOUtilities.java @@ -61,7 +61,10 @@ import org.apache.sis.internal.storage.Resources; * @author Martin Desruisseaux (Geomatys) * @author Johann Sorel (Geomatys) * @version 1.4 - * @since 0.3 + * + * @see org.apache.sis.io.IO + * + * @since 0.3 */ public final class IOUtilities extends Static { /**