You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2024/02/28 14:05:19 UTC
(sis) branch geoapi-4.0 updated (54f785e8f6 -> 1e3b96aaa1)
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a change to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
from 54f785e8f6 Tune the log messages: more appropriate logger in `AbstractProvider`, fix the locale used by WKT store, catch more logs during the tests. Opportunistically add a link to metadata in Landsat Javadoc.
new d6ebef6dd4 Publish the `sis-coveragejson` to Maven local repository. Remove the `sis-shapefile` exclusion from resources compiler.
new 1e3b96aaa1 Documentation fixes and formatting.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/sis/buildtools/gradle/Dependency.java | 1 +
.../sis/buildtools/gradle/ModularCompilation.java | 13 ---------
.../resources/IndexedResourceCompiler.java | 14 +---------
.../org/apache/sis/util/iso/DefaultRecordType.java | 9 +++---
.../apache/sis/referencing/cs/AxesConvention.java | 32 ++++++++++++----------
incubator/build.gradle.kts | 12 ++++++++
6 files changed, 36 insertions(+), 45 deletions(-)
(sis) 02/02: Documentation fixes and formatting.
Posted by de...@apache.org.
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 1e3b96aaa1246daa06c20ff32d194aea8512eaf9
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Wed Feb 28 15:04:54 2024 +0100
Documentation fixes and formatting.
---
.../org/apache/sis/util/iso/DefaultRecordType.java | 9 +++---
.../apache/sis/referencing/cs/AxesConvention.java | 32 ++++++++++++----------
2 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/util/iso/DefaultRecordType.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/util/iso/DefaultRecordType.java
index fff042ed4f..69646b3a26 100644
--- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/util/iso/DefaultRecordType.java
+++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/util/iso/DefaultRecordType.java
@@ -113,7 +113,7 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
*
* @param other the {@code RecordType} to copy.
*/
- @SuppressWarnings("deprecation")
+ @SuppressWarnings({"deprecation", "this-escape"})
public DefaultRecordType(final RecordType other) {
typeName = other.getTypeName();
container = other.getContainer();
@@ -201,6 +201,7 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
this.typeName = typeName;
this.container = container;
final NameSpace namespace = nameFactory.createNameSpace(typeName, null);
+ @SuppressWarnings("LocalVariableHidesMemberVariable")
final Map<MemberName,Type> fieldTypes = JDK19.newLinkedHashMap(fields.size());
for (final Map.Entry<? extends CharSequence, ? extends Type> entry : fields.entrySet()) {
final Type type = entry.getValue();
@@ -387,7 +388,7 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
/**
* Determines if the given record is compatible with this record type. This method returns {@code true}
- * if the given {@code record} argument is non-null and the following condition holds:
+ * if the given {@code record} argument is non-null and the following condition is true:
*
* {@snippet lang="java" :
* Set<MemberName> attributeNames = record.getAttributes().keySet();
@@ -398,8 +399,8 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
* We do not require that {@code record.getRecordType() == this} in order to allow record
* "sub-types" to define additional fields, in a way similar to Java sub-classing.
*
- * @param record the record to test for compatibility.
- * @return {@code true} if the given record is compatible with this {@code RecordType}.
+ * @param record the record to test for compatibility with this type, or {@code null}.
+ * @return {@code true} if the given record is non-null and compatible with this record type.
*/
@Override
public boolean isInstance(final Record record) {
diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AxesConvention.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AxesConvention.java
index 19bee52858..6261a1b041 100644
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AxesConvention.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AxesConvention.java
@@ -37,37 +37,39 @@ import org.apache.sis.measure.Units;
* <table class="sis">
* <caption>Coordinate system properties changed by enum values</caption>
* <tr>
- * <th>Property</th>
- * <th>Example</th>
- * <th>{@linkplain #NORMALIZED Normalized}</th>
- * <th>{@link #DISPLAY_ORIENTED Display<br>oriented}</th>
- * <th>{@linkplain #RIGHT_HANDED Right<br>handed}</th>
- * <th>{@linkplain #POSITIVE_RANGE Positive<br>range}</th>
+ * <th rowspan="2">Property</th>
+ * <th class="sep" rowspan="2">Example</th>
+ * <th class="sep" colspan="4">Modified by:</th>
+ * </tr><tr>
+ * <th class="sep">{@linkplain #NORMALIZED Normalized}</th>
+ * <th>{@linkplain #DISPLAY_ORIENTED Display<br>oriented}</th>
+ * <th>{@linkplain #RIGHT_HANDED Right<br>handed}</th>
+ * <th>{@linkplain #POSITIVE_RANGE Positive<br>range}</th>
* </tr><tr>
* <td>Axis order</td>
- * <td>(<var>longitude</var>, <var>latitude</var>)</td>
- * <td style="text-align:center">✔</td>
+ * <td> class="sep"(<var>longitude</var>, <var>latitude</var>)</td>
+ * <td class="sep" style="text-align:center">✔</td>
* <td style="text-align:center">✔</td>
* <td style="text-align:center">✔</td>
* <td></td>
* </tr><tr>
* <td>Axis direction</td>
- * <td>({@linkplain AxisDirection#EAST east}, {@linkplain AxisDirection#NORTH north})</td>
- * <td style="text-align:center">✔</td>
+ * <td> class="sep"({@linkplain AxisDirection#EAST east}, {@linkplain AxisDirection#NORTH north})</td>
+ * <td class="sep" style="text-align:center">✔</td>
* <td style="text-align:center">✔</td>
* <td></td>
* <td></td>
* </tr><tr>
* <td>Unit of measurement</td>
- * <td>Angular degrees & metres</td>
- * <td style="text-align:center">✔</td>
+ * <td> class="sep"Angular degrees & metres</td>
+ * <td class="sep" style="text-align:center">✔</td>
* <td></td>
* <td></td>
* <td></td>
* </tr><tr>
* <td>Range of values</td>
- * <td>[0 … 360]° of longitude</td>
- * <td></td>
+ * <td> class="sep"[0 … 360]° of longitude</td>
+ * <td> class="sep"</td>
* <td></td>
* <td></td>
* <td style="text-align:center">✔</td>
@@ -78,7 +80,7 @@ import org.apache.sis.measure.Units;
* The axis order is specified by the authority (typically a national agency) defining the Coordinate Reference System
* (CRS). The order depends on the CRS type and the country defining the CRS. In the case of geographic CRS, the
* (<var>latitude</var>, <var>longitude</var>) axis order is widely used by geographers and pilots for centuries.
- * However, software developers tend to consistently use the (<var>x</var>,<var>y</var>) order for every kind of CRS.
+ * However, software developers tend to consistently use the (<var>x</var>,<var>y</var>) order for every kinds of CRS.
* Those different practices resulted in contradictory definitions of axis order for almost every CRS of kind
* {@code GeographicCRS}, for some {@code ProjectedCRS} in the South hemisphere (South Africa, Australia, <i>etc.</i>)
* and for some polar projections among others.
(sis) 01/02: Publish the `sis-coveragejson` to Maven local repository. Remove the `sis-shapefile` exclusion from resources compiler.
Posted by de...@apache.org.
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 d6ebef6dd435b0f21d1e09860a162ee964039f79
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Wed Feb 28 15:03:21 2024 +0100
Publish the `sis-coveragejson` to Maven local repository.
Remove the `sis-shapefile` exclusion from resources compiler.
---
.../java/org/apache/sis/buildtools/gradle/Dependency.java | 1 +
.../apache/sis/buildtools/gradle/ModularCompilation.java | 13 -------------
.../sis/buildtools/resources/IndexedResourceCompiler.java | 14 +-------------
incubator/build.gradle.kts | 12 ++++++++++++
4 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/buildSrc/src/main/java/org/apache/sis/buildtools/gradle/Dependency.java b/buildSrc/src/main/java/org/apache/sis/buildtools/gradle/Dependency.java
index 8a055ff750..5abc18adbc 100644
--- a/buildSrc/src/main/java/org/apache/sis/buildtools/gradle/Dependency.java
+++ b/buildSrc/src/main/java/org/apache/sis/buildtools/gradle/Dependency.java
@@ -70,6 +70,7 @@ public final class Dependency {
Map.entry("gui", "application:sis-javafx"), // Optional.
Map.entry("cql", "core:sis-cql"), // Incubator.
Map.entry("storage.shapefile", "core:sis-shapefile"),
+ Map.entry("storage.coveragejson", "core:sis-coveragejson"),
Map.entry("portrayal.map", "core:sis-portrayal-map"),
Map.entry("webapp", "application:sis-webapp")
);
diff --git a/buildSrc/src/main/java/org/apache/sis/buildtools/gradle/ModularCompilation.java b/buildSrc/src/main/java/org/apache/sis/buildtools/gradle/ModularCompilation.java
index 92b39907f4..3f6486cdf3 100644
--- a/buildSrc/src/main/java/org/apache/sis/buildtools/gradle/ModularCompilation.java
+++ b/buildSrc/src/main/java/org/apache/sis/buildtools/gradle/ModularCompilation.java
@@ -160,12 +160,6 @@ final class ModularCompilation extends Conventions {
* └───────────────────────────────────────────────────────────────────┘
*/
- /**
- * Modules to exclude. This is a temporary workaround for a SIS module
- * not yet well integrated with other SIS modules.
- */
- private static final Set<String> EXCLUDE_MODULES = Set.of("org.apache.sis.storage.shapefile");
-
/**
* File extensions of resources to not copy.
* In addition, everything in {@code doc-files} sub-directories will be excluded.
@@ -210,13 +204,6 @@ final class ModularCompilation extends Conventions {
results.put(target, source);
}
}
- @Override protected boolean acceptCompilableResource(File source) {
- while (source != null) {
- if (EXCLUDE_MODULES.contains(source.getName())) return false;
- source = source.getParentFile();
- }
- return true;
- }
};
try {
errors += compiler.onJavaSourceDirectory();
diff --git a/buildSrc/src/main/java/org/apache/sis/buildtools/resources/IndexedResourceCompiler.java b/buildSrc/src/main/java/org/apache/sis/buildtools/resources/IndexedResourceCompiler.java
index 3e4cfa64f5..ac991b2504 100644
--- a/buildSrc/src/main/java/org/apache/sis/buildtools/resources/IndexedResourceCompiler.java
+++ b/buildSrc/src/main/java/org/apache/sis/buildtools/resources/IndexedResourceCompiler.java
@@ -266,7 +266,7 @@ public class IndexedResourceCompiler {
filterLanguages(resourcesToProcess, true);
for (final Map.Entry<File,Boolean> entry : resourcesToProcess.entrySet()) {
final File source = entry.getKey();
- if (entry.getValue() && acceptCompilableResource(source)) {
+ if (entry.getValue()) {
onJavaSource(new File(source.getParentFile(), getBaseName(source) + JAVA_EXT));
} else {
otherResource(source, sourceToTarget(source));
@@ -709,18 +709,6 @@ search: for (int i=0; i<buffer.length(); i++) { // Length of `bu
}
}
- /**
- * Invoked for each resource file that {@code IndexedResourceCompiler} thinks is compilable.
- * Subclasses can override this method for excluding some false positives.
- * The default implementation always returns {@code true}.
- *
- * @param source the {@code .properties} file that may be compiled.
- * @return whether to compile the specified file.
- */
- protected boolean acceptCompilableResource(final File source) {
- return true;
- }
-
/**
* Invoked when a file is not a Java source file, a properties file being compiled or a directory.
* The default implementation does nothing.
diff --git a/incubator/build.gradle.kts b/incubator/build.gradle.kts
index 214aeeaf21..c10f193705 100644
--- a/incubator/build.gradle.kts
+++ b/incubator/build.gradle.kts
@@ -175,6 +175,18 @@ publishing {
description = "Read and write files in the Shapefile format."
}
}
+ create<MavenPublication>("storage.coveragejson") {
+ var module = "org.apache.sis.storage.coveragejson"
+ groupId = "org.apache.sis.storage"
+ artifactId = "sis-coveragejson"
+ artifact(layout.buildDirectory.file("libs/${module}.jar"))
+ artifact(layout.buildDirectory.file("docs/${module}-sources.jar")) {classifier = "sources"}
+ artifact(layout.buildDirectory.file("docs/${module}-javadoc.jar")) {classifier = "javadoc"}
+ pom {
+ name = "Apache SIS JSON Coverage storage"
+ description = "Read and write files in the JSON Coverage format."
+ }
+ }
create<MavenPublication>("portrayal.map") {
var module = "org.apache.sis.portrayal.map"
groupId = "org.apache.sis.core"