Skip to content

Commit

Permalink
Merge branch 'release-5.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhihang Yao committed Nov 16, 2023
2 parents 17984ed + 42fd4ce commit b308c91
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 30 deletions.
8 changes: 5 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
Change Log
==========
### 5.4.0 - tba
### 5.4.0 - 2023-09-21

#### Additions
* Added UI options to set the dataset metadata e.g. name, description and bounding box. [#278](https://github.com/3dcitydb/importer-exporter/pull/278)
* Added UI preferences dialog to customize XML namespaces for CityGML exports. [#279](https://github.com/3dcitydb/importer-exporter/pull/279)
* Added option to specify default start mode for plugins. [#293](https://github.com/3dcitydb/importer-exporter/pull/293)
* Added support for XSLT/XPath 2.0 and 3.0 through Saxon-HE.
* Improved exception handling when loading plugins fails.

#### Fixes
* Fixed query builder to correctly determine whether to use left joins in case `<not>` is used. [#281](https://github.com/3dcitydb/importer-exporter/pull/281)
* Fixed NPE due to duplicate ZIP entries. [#292](https://github.com/3dcitydb/importer-exporter/pull/292)
* Fixed a bug in the SrsComboBox component.
* Fixed display of plugin extensions to include extension interfaces defined for a super class.
* Fixed NPE when recalculating envelope in case the LoD filter is used.
* Fixed a bug when creating a solid surfaces with inner rings.
* Fixed inconsistent value of the `gen:dateAttribute` attribute after database import and export.

#### Miscellaneous
* Updated FlatLaf to 3.2
* Updated FlatLaf to 3.2.1
* Updated rsyntaxtextarea to 3.3.4
* Updated picocli to 4.7.5
* Updated sql-formatter to 2.0.4
Expand All @@ -26,7 +28,7 @@ Change Log
* Updated PostgreSQL JDBC drivers to 42.6.0
* Updated GeoTools to 28.4
* Updated tomcat-jdbc to 10.0.27
* Updated commons-compress to 1.22
* Updated commons-compress to 1.24.0
* Updated tika-core to 2.8.0
* Updated h2 to 2.2.220

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ previous release of the 3D City Database Importer/Exporter under Apache License

Latest release
--------------
The latest stable release of the 3D City Database Importer/Exporter is 5.3.0.
The latest stable release of the 3D City Database Importer/Exporter is 5.4.0.

Download the software [here](https://github.com/3dcitydb/importer-exporter/releases/download/v5.3.0/3DCityDB-Importer-Exporter-5.3.0.zip).
Download the software [here](https://github.com/3dcitydb/importer-exporter/releases/download/v5.4.0/3DCityDB-Importer-Exporter-5.4.0.zip).
Previous releases are available from the [releases section](https://github.com/3dcitydb/importer-exporter/releases).

System requirements
Expand All @@ -65,7 +65,7 @@ The 3D City Database Importer/Exporter can be run on any platform providing appr
Documentation and literature
----------------------------
A complete and comprehensive user manual on the 3D City Database and the Importer/Exporter is available
[online](https://3dcitydb-docs.readthedocs.io/en/version-2022.2/).
[online](https://3dcitydb-docs.readthedocs.io/en/version-2023.0/).

An Open Access paper on the 3DCityDB has been published in the International Journal on Open Geospatial Data,
Software and Standards 3 (5), 2018: [Z. Yao, C. Nagel, F. Kunde, G. Hudra, P. Willkomm, A. Donaubauer, T. Adolphi, T. H. Kolbe: 3DCityDB - a 3D geodatabase solution for the management, analysis, and visualization of semantic 3D city models based on CityGML](https://doi.org/10.1186/s40965-018-0046-7). Please use this reference when citing the 3DCityDB project.
Expand All @@ -82,7 +82,7 @@ The easiest way to get the Importer/Exporter running on your computer is to down
[3D City Database Suite installer](https://github.com/3dcitydb/3dcitydb-suite/releases). In addition to the
Importer/Exporter software, this installer also bundles the 3D City Database scripts, the 3D Web Map Client,
Importer/Exporter plugins, test datasets, etc. A setup wizard will guide you through the separate steps of the
installation process. Please refer to the [user manual](https://3dcitydb-docs.readthedocs.io/en/version-2022.2/)
installation process. Please refer to the [user manual](https://3dcitydb-docs.readthedocs.io/en/version-2023.0/)
for more information on how to install and use the tool.

After successful installation, start scripts are available in the installation directory to run the application.
Expand Down Expand Up @@ -135,7 +135,7 @@ Using the Docker image of the Importer/Exporter is simple:
This will show the help message and all available commands of the Importer/Exporter.

More details on how to use the Importer/Exporter with Docker can be found in the
[online documentation](https://3dcitydb-docs.readthedocs.io/en/version-2022.2/).
[online documentation](https://3dcitydb-docs.readthedocs.io/en/version-2023.0/).

Cooperation partners and supporters
-----------------------------------
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ subprojects {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
url project.citydbMavenUrl
url 'https://3dcitydb.org/maven'
}
mavenCentral()
}
Expand Down Expand Up @@ -104,7 +104,7 @@ subprojects {
}
repositories {
maven {
url project.citydbMavenUrl
url 'https://3dcitydb.org/maven'
name 'gitlab-maven'
credentials(HttpHeaderCredentials) {
name = 'Private-Token'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ private void initializeEnvironment(Config config) {
for (Plugin plugin : pluginManager.getExternalPlugins()) {
boolean enable = enabledPlugins != null ?
enabledPlugins.getOrDefault(plugin.getClass().getName(), false) :
config.isPluginEnabled(plugin.getClass().getName());
config.isPluginEnabled(plugin.getClass().getName(), plugin.getMetadata().isStartEnabled());

plugins.put(plugin, enable);
}
Expand Down
6 changes: 3 additions & 3 deletions impexp-client-gui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ configurations {

dependencies {
api project(':impexp-client-cli')
api 'com.formdev:flatlaf:3.2'
api 'com.formdev:flatlaf-extras:3.2'
api 'com.formdev:flatlaf-swingx:3.2'
api 'com.formdev:flatlaf:3.2.1'
api 'com.formdev:flatlaf-extras:3.2.1'
api 'com.formdev:flatlaf-swingx:3.2.1'
api 'com.fifesoft:rsyntaxtextarea:3.3.4'
api 'com.github.vertical-blank:sql-formatter:2.0.4'
api ('org.citydb:swingx-ws:1.1.5') {
Expand Down
4 changes: 2 additions & 2 deletions impexp-config/src/main/java/org/citydb/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public void setGlobalConfig(GlobalConfig globalConfig) {
projectConfig.setGlobalConfig(globalConfig);
}

public boolean isPluginEnabled(String pluginClass) {
return projectConfig.isPluginEnabled(pluginClass);
public boolean isPluginEnabled(String pluginClass, boolean defaultValue) {
return projectConfig.isPluginEnabled(pluginClass, defaultValue);
}

public void setPluginEnabled(String pluginClass, boolean enable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ void setGlobalConfig(GlobalConfig globalConfig) {
}
}

boolean isPluginEnabled(String pluginClass) {
return plugins.getOrDefault(pluginClass, true);
boolean isPluginEnabled(String pluginClass, boolean defaultValue) {
return plugins.getOrDefault(pluginClass, defaultValue);
}

void setPluginEnabled(String pluginClass, boolean enable) {
Expand Down
2 changes: 1 addition & 1 deletion impexp-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
implementation 'com.h2database:h2:2.2.220'
implementation 'net.sf.saxon:Saxon-HE:12.3'
implementation 'org.apache.tomcat:tomcat-jdbc:10.0.27'
implementation 'org.apache.commons:commons-compress:1.22'
implementation 'org.apache.commons:commons-compress:1.24.0'
}

javadoc {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Set;
import java.util.zip.Deflater;

public class ScatterZipOutputStream implements Closeable {
Expand Down Expand Up @@ -65,7 +66,7 @@ void addArchiveEntry(ZipArchiveEntry zipArchiveEntry, InputStreamSupplier source
}
}

void writeTo(ZipArchiveOutputStream target) throws IOException {
void writeTo(ZipArchiveOutputStream target, Set<String> entries) throws IOException {
entryStore.closeForWriting();
backingStore.closeForWriting();
String line;
Expand All @@ -77,14 +78,18 @@ void writeTo(ZipArchiveOutputStream target) throws IOException {
if (values.length != 5)
throw new IOException("Failed to read temporary zip entry.");

ZipArchiveEntry entry = new ZipArchiveEntry(values[0]);
entry.setMethod(Integer.parseInt(values[1]));
entry.setCrc(Long.parseLong(values[2]));
entry.setCompressedSize(Long.parseLong(values[3]));
entry.setSize(Long.parseLong(values[4]));
if (entries.add(values[0])) {
ZipArchiveEntry entry = new ZipArchiveEntry(values[0]);
entry.setMethod(Integer.parseInt(values[1]));
entry.setCrc(Long.parseLong(values[2]));
entry.setCompressedSize(Long.parseLong(values[3]));
entry.setSize(Long.parseLong(values[4]));

try (BoundedInputStream rawStream = new BoundedInputStream(stream, entry.getCompressedSize())) {
target.addRawArchiveEntry(entry, rawStream);
try (BoundedInputStream rawStream = new BoundedInputStream(stream, entry.getCompressedSize())) {
target.addRawArchiveEntry(entry, rawStream);
}
} else {
stream.skip(Long.parseLong(values[3]));
}
}
} catch (NumberFormatException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.zip.ZipEntry;
Expand Down Expand Up @@ -130,8 +131,9 @@ public void close() throws IOException {

// merge scatter screams into final zip
log.info("Merging temporary files to target ZIP file...");
Set<String> entries = new HashSet<>();
for (ScatterZipOutputStream scatterStream : scatterStreams) {
scatterStream.writeTo(out);
scatterStream.writeTo(out, entries);
scatterStream.close();
}
} catch (InterruptedException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class PluginMetadata {
private PluginVendor vendor;
@XmlElement(name = "ade-support", defaultValue = "false")
private Boolean adeSupport;
private Boolean startEnabled;

public String getName() {
return name;
Expand Down Expand Up @@ -82,4 +83,12 @@ public boolean hasADESupport() {
public void setADESupport(boolean adeSupport) {
this.adeSupport = adeSupport;
}

public boolean isStartEnabled() {
return startEnabled != null ? startEnabled : true;
}

public void setStartEnabled(boolean startEnabled) {
this.startEnabled = startEnabled;
}
}
3 changes: 1 addition & 2 deletions properties.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ ext {
citydbVersion = '4.4.x'
citydbWebsiteUrl = 'https://www.3dcitydb.org'
citydbVcsUrl = 'https://github.com/3dcitydb'
citydbMavenUrl = 'https://gitlab.lrz.de/api/v4/projects/150792/packages/maven'

// Importer/Exporter
impexpShortName = 'Importer/Exporter'
Expand All @@ -29,5 +28,5 @@ ext {
appCliName = 'impexp'

// documentation
docUrl = 'https://3dcitydb-docs.readthedocs.io/en/version-2022.2/'
docUrl = 'https://3dcitydb-docs.readthedocs.io/en/version-2023.0/'
}

0 comments on commit b308c91

Please sign in to comment.