Skip to content
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

Remove support for legacy XML model #359

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
41 changes: 1 addition & 40 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>fr.ign.validator</groupId>
<artifactId>validator</artifactId>
<packaging>pom</packaging>
<version>4.4.6-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<name>Validator</name>

<scm>
Expand Down Expand Up @@ -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>9.1-901-1.jdbc4</postgresql.version>
<sqlite-jdbc.version>3.46.0.1</sqlite-jdbc.version>
Expand All @@ -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>
Expand Down Expand Up @@ -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>

<!--
################################################################
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion validator-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>fr.ign.validator</groupId>
<artifactId>validator</artifactId>
<version>4.4.6-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<name>validator-cli</name>
<artifactId>validator-cli</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion validator-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>fr.ign.validator</groupId>
<artifactId>validator</artifactId>
<version>4.4.6-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>validator-core</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.net.URL;

import fr.ign.validator.exception.InvalidModelException;

/**
* Create ModelReader instances
*
Expand All @@ -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();
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading