Skip to content

Remove support for legacy XML model #359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -37,10 +37,6 @@
<apache-common-cli.version>1.8.0</apache-common-cli.version>
<apache-commons-csv.version>1.11.0</apache-commons-csv.version>
<apache-commons-lang.version>2.6</apache-commons-lang.version>
<!-- jaxb -->
<jaxb-core.version>2.3.0.1</jaxb-core.version>
<jaxb-impl.version>2.3.9</jaxb-impl.version>
<jaxb-api.version>2.3.1</jaxb-api.version>
<!-- JDBC -->
<postgresql.version>42.7.5</postgresql.version>
<sqlite-jdbc.version>3.46.0.1</sqlite-jdbc.version>
@@ -53,9 +49,6 @@
<maven-surefire-plugin.version>3.3.1</maven-surefire-plugin.version>
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<!-- JDK 8 features -->
<javax.annotation.version>1.3.2</javax.annotation.version>
<javax.activation.version>1.1.1</javax.activation.version>

<!-- sonarqube -->
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
@@ -225,22 +218,6 @@
<version>${jaxen.version}</version>
</dependency>

<!-- JABX is required by XmlModelReader -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>${jaxb-core.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb-impl.version}</version>
</dependency>

<!--
################################################################
@@ -261,22 +238,6 @@
<version>${postgresql.version}</version>
</dependency>

<!--
################################################################
JDK 8 libraries
################################################################
-->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax.annotation.version}</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${javax.activation.version}</version>
</dependency>

<!--
################################################################
Test dependencies
Original file line number Diff line number Diff line change
@@ -20,8 +20,6 @@
import org.apache.logging.log4j.MarkerManager;
import org.locationtech.jts.geom.Geometry;

import com.ctc.wstx.util.StringUtil;

import fr.ign.validator.Context;
import fr.ign.validator.Version;
import fr.ign.validator.command.options.DocumentEmpriseOption;
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
import fr.ign.validator.tools.ModelHelper;

/**
* Common implementation for JSON and XML ModelReader.
* Common implementation for JSON and XML ModelReader (removed).
*
* @author MBorne
*/
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ public interface ModelReader {
public String getFormat();

/**
* Read File as a DocumentModel (files.xml)
* Read File as a DocumentModel
*
* @param documentModelPath
* @return
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@

import java.net.URL;

import fr.ign.validator.exception.InvalidModelException;

/**
* Create ModelReader instances
*
@@ -26,7 +28,9 @@ private ModelReaderFactory() {
*/
public static ModelReader createModelReader(URL url) {
if (url.toString().endsWith(".xml")) {
return new XmlModelReader();
throw new InvalidModelException(
"Fail to load " + url + " (XML model support has been removed, use JSON format)"
);
} else {
return new JsonModelReader();
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading