diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/numbers/numbers.xsd b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/numbers/numbers.xsd
new file mode 100644
index 0000000000..3330310ba3
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/numbers/numbers.xsd
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/shiporder/shiporder.xml b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/shiporder/shiporder.xml
index 776d5006a7..7e9c8186d7 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/shiporder/shiporder.xml
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/shiporder/shiporder.xml
@@ -14,11 +14,16 @@ xsi:schemaLocation="http://www.example.com shiporder.xsd">
Empire Burlesque
Special Edition
1
- 10.90
+ 0E-11
-
Hide your heart
1
9.90
+ 123
+ 12.3
+ 123.456
+ 1234567890123456789
+ 12345
\ No newline at end of file
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/shiporder/shiporder.xsd b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/shiporder/shiporder.xsd
index e8f282e49d..3d649b00d9 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/shiporder/shiporder.xsd
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/data/shiporder/shiporder.xsd
@@ -22,6 +22,11 @@
+
+
+
+
+
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/eu/esdihumboldt/hale/io/gml/reader/internal/GmlInstanceCollectionTest.java b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/eu/esdihumboldt/hale/io/gml/reader/internal/GmlInstanceCollectionTest.java
index e8ed0e3ea3..49bd7cf475 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/eu/esdihumboldt/hale/io/gml/reader/internal/GmlInstanceCollectionTest.java
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/eu/esdihumboldt/hale/io/gml/reader/internal/GmlInstanceCollectionTest.java
@@ -22,6 +22,7 @@
import static org.junit.Assert.assertTrue;
import java.io.IOException;
+import java.math.BigDecimal;
import java.net.URI;
import java.util.Collection;
@@ -160,10 +161,12 @@ public void testLoadShiporder() throws Exception {
Instance instance = it.next();
assertNotNull(instance);
- Object[] orderid = instance.getProperty(new QName("orderid")); // attribute
- // form
- // not
- // qualified
+ Object[] orderid = instance.getProperty(new QName("orderid"));
+ // attribute
+ // form
+ // not
+ // qualified
+
assertNotNull(orderid);
assertEquals(1, orderid.length);
assertEquals("889923", orderid[0]);
@@ -213,6 +216,11 @@ public void testLoadShiporder() throws Exception {
assertEquals(1, title1.length);
assertEquals("Empire Burlesque", title1[0]);
+ Object[] price1 = ((Instance) item1).getProperty(new QName(ns, "price"));
+ assertNotNull(price1);
+ BigDecimal bigDecimal = new BigDecimal("0.00000000000");
+ assertEquals(bigDecimal, price1[0]);
+
// item 2
Object item2 = items[1];
assertTrue(item2 instanceof Instance);
@@ -222,6 +230,35 @@ public void testLoadShiporder() throws Exception {
assertEquals(1, title2.length);
assertEquals("Hide your heart", title2[0]);
+ Object[] price2 = ((Instance) item2).getProperty(new QName(ns, "price"));
+ assertNotNull(price2);
+ bigDecimal = new BigDecimal("9.90");
+ assertEquals(bigDecimal, price2[0]);
+
+ Object[] priceInteger = ((Instance) item2).getProperty(new QName(ns, "priceInteger"));
+ int intNumber = 123;
+ assertEquals(intNumber, priceInteger[0]);
+
+ // Double
+ Object[] priceDouble = ((Instance) item2).getProperty(new QName(ns, "priceDouble"));
+ double doubleNumber = 12.3;
+ assertEquals(doubleNumber, priceDouble[0]);
+
+ // Float
+ Object[] priceFloat = ((Instance) item2).getProperty(new QName(ns, "priceFloat"));
+ float floatNumber = 123.456F;
+ assertEquals(floatNumber, priceFloat[0]);
+
+ // Long
+ Object[] priceLong = ((Instance) item2).getProperty(new QName(ns, "priceLong"));
+ long longNumber = 1234567890123456789L;
+ assertEquals(longNumber, priceLong[0]);
+
+ // short
+ Object[] priceShort = ((Instance) item2).getProperty(new QName(ns, "priceShort"));
+ short shortNumber = 12345;
+ assertEquals(shortNumber, priceShort[0]);
+
// only one object
assertFalse(it.hasNext());
} finally {
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/eu/esdihumboldt/hale/io/gml/writer/internal/StreamGmlWriter2Test.groovy b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/eu/esdihumboldt/hale/io/gml/writer/internal/StreamGmlWriter2Test.groovy
index 247b7d44cd..8f4b8e72e4 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/eu/esdihumboldt/hale/io/gml/writer/internal/StreamGmlWriter2Test.groovy
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml.test/src/eu/esdihumboldt/hale/io/gml/writer/internal/StreamGmlWriter2Test.groovy
@@ -381,4 +381,151 @@ class StreamGmlWriter2Test {
result
}
+
+ @Test
+ void testNumbers() throws Exception {
+ /**test DOUBLE numbers*/
+ testNumber("doubleNumber", 12345.123456789, null)
+ testNumber("doubleNumber", 12345.123456789, "12345.123456789")
+ double doubleNumber = 123456789.123456789
+ double expected = java.lang.Double.parseDouble(doubleNumber.toString())
+ testNumber("doubleSimpleNumber", doubleNumber, expected)
+ testNumber("doubleSimpleNumber", doubleNumber, expected.toString())
+ testFloatingPointNumber(doubleNumber, "doubleNumber")
+
+ /**test INT, SHORT numbers*/
+ testNumber("integerNumber", 12345, null)
+ testNumber("integerNumber", 12345, "12345")
+ testNumber("shortNumber", 12345 as short, null)
+ testNumber("shortNumber", 12345 as short, "12345")
+
+ float smallDecimal = 0.12345F
+ float largeDecimal = 12345.6789F
+ float verySmall = 0.0000001F
+ float veryLarge = 12345678.9F
+ float negative = -98765.4321F
+ float scientific = 1.23E4F
+ float maxFloat = Float.MAX_VALUE
+ float minFloat = Float.MIN_VALUE
+
+ // for Float and Double we are expecting to use using scientific notation
+ testFloatingPointNumber(smallDecimal, "floatNumber")
+ testNumber("floatNumber", smallDecimal, "0.12345")
+ testFloatingPointNumber(largeDecimal, "floatNumber")
+ testNumber("floatNumber", largeDecimal, "12345.679")
+ testFloatingPointNumber(verySmall, "floatNumber")
+ testNumber("floatNumber", verySmall, "1.0E-7")
+ testFloatingPointNumber(veryLarge, "floatNumber")
+ testNumber("floatNumber", veryLarge, "1.2345679E7")
+ testFloatingPointNumber(negative, "floatNumber")
+ testFloatingPointNumber(scientific, "floatNumber")
+ testFloatingPointNumber(maxFloat, "floatNumber")
+ testFloatingPointNumber(minFloat, "floatNumber")
+
+ /**test LONG numbers*/
+ long smallPositive = 12345L
+ long largePositive = 1234567890123456789L
+ long smallNegative = -12345L
+ long largeNegative = -1234567890123456789L
+ long maxLong = Long.MAX_VALUE
+ long minLong = Long.MIN_VALUE
+ long zero = 0L
+ long powerOfTwo = 1024L
+ long negativePowerOfTwo = -1024L
+ long nearMaxLong = 9223372036854775806L
+ long nearMinLong = -9223372036854775807L
+
+ testNumber("longNumber", smallPositive, "12345")
+ testNumber("longNumber", largePositive, "1234567890123456789")
+ testNumber("longNumber", smallNegative, null)
+ testNumber("longNumber", largeNegative, null)
+ testNumber("longNumber", maxLong, null)
+ testNumber("longNumber", minLong, null)
+ testNumber("longNumber", zero, null)
+ testNumber("longNumber", powerOfTwo, null)
+ testNumber("longNumber", negativePowerOfTwo, null)
+ testNumber("longNumber", nearMaxLong, null)
+ testNumber("longNumber", nearMinLong, null)
+
+ /**test DECIMAL numbers*/
+ testNumber("decimalNumber", new BigDecimal("1234567890.123456789"), null)
+ testNumber("decimalNumber", new BigDecimal(doubleNumber), null)
+
+ doubleNumber = 1.23456789123456789E8
+ testNumber("decimalNumber", new BigDecimal(doubleNumber), null)
+
+ String numberAsString = "1.23456789123456789E8"
+ testNumber("decimalNumber", new BigDecimal(numberAsString), null)
+ testNumber("decimalNumber", new BigDecimal(numberAsString), "123456789.123456789")
+ }
+
+ void testNumber(String elementName, number, expected) throws Exception {
+ def schema = loadSchema(getClass().getResource("/data/numbers/numbers.xsd").toURI())
+
+ def instance = new InstanceBuilder(types: schema).PrimitiveTestType {
+ "$elementName"(number)
+ }
+
+ def writer = new GmlInstanceWriter()
+ File outFile = writeFile(instance, schema, writer)
+ def xmlFile = outFile.getAbsolutePath()
+ def xml = new XmlSlurper().parse(xmlFile)
+
+ String actualText = xml.featureMember.PrimitiveTest."$elementName".text()
+ if (expected != null) {
+ if (expected instanceof String) {
+ assertEquals(expected.toString(), xml.featureMember.PrimitiveTest."$elementName".text())
+ } else {
+ compareValues(expected, actualText)
+ }
+ } else {
+ compareValues(number, actualText)
+ }
+
+
+ if (DEL_TEMP_FILES) {
+ outFile.delete()
+ }
+ }
+
+ @CompileStatic
+ private File writeFile(Instance instance, Schema schema, InstanceWriter writer) {
+ writer.setParameter(GmlInstanceWriter.PARAM_PRETTY_PRINT, Value.of((Boolean)true))
+ writer.setParameter(GeoInstanceWriter.PARAM_UNIFY_WINDING_ORDER, Value.simple('noChanges'))
+ writer.setInstances(new DefaultInstanceCollection([instance]))
+ DefaultSchemaSpace schemaSpace = new DefaultSchemaSpace()
+ schemaSpace.addSchema(schema)
+ writer.setTargetSchema(schemaSpace)
+ File outFile = File.createTempFile('gml-writer', '.gml')
+ writer.setTarget(new FileIOSupplier(outFile))
+
+ IOReport report = writer.execute(null);
+ List extends Locatable> validationSchemas = writer.getValidationSchemas()
+
+ return outFile;
+ }
+
+ void testFloatingPointNumber(floatNumber, type) {
+ def expected = java.lang.Double.parseDouble(floatNumber.toString())
+ println expected
+ testNumber(type, floatNumber, expected)
+ }
+
+ void compareValues(expected, actualText) {
+ if (expected instanceof BigDecimal) {
+ assertEquals(((BigDecimal) expected), new BigDecimal(actualText))
+ } else if (expected instanceof Double || expected instanceof Float) {
+ assertEquals(expected.doubleValue(), new Double(actualText).doubleValue(), 0.0000001)
+ } else if (expected instanceof Long) {
+ assertEquals(expected.longValue(), new Long(actualText).longValue())
+ } else if (expected instanceof Integer) {
+ assertEquals(expected.intValue(), (new Integer(actualText)).intValue())
+ } else if (expected instanceof BigInteger) {
+ assertEquals(expected, new BigInteger(actualText))
+ } else if (expected instanceof Short) {
+ assertEquals(expected.shortValue(), (new Short(actualText)).shortValue())
+ } else {
+ assertEquals(expected, actual)
+ }
+ }
}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/plugin.xml b/io/plugins/eu.esdihumboldt.hale.io.gml/plugin.xml
index 0503892d80..5ba0406bc5 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.gml/plugin.xml
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/plugin.xml
@@ -1533,6 +1533,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/SimpleTypeUtil.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/SimpleTypeUtil.java
index 32d403a186..b95ca3f3c6 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/SimpleTypeUtil.java
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/SimpleTypeUtil.java
@@ -29,6 +29,13 @@
import org.apache.xmlbeans.XmlAnySimpleType;
import org.apache.xmlbeans.XmlDate;
import org.apache.xmlbeans.XmlDateTime;
+import org.apache.xmlbeans.XmlDecimal;
+import org.apache.xmlbeans.XmlDouble;
+import org.apache.xmlbeans.XmlFloat;
+import org.apache.xmlbeans.XmlInt;
+import org.apache.xmlbeans.XmlInteger;
+import org.apache.xmlbeans.XmlLong;
+import org.apache.xmlbeans.XmlShort;
import org.apache.xmlbeans.XmlTime;
import org.springframework.core.convert.ConversionException;
import org.springframework.core.convert.ConversionService;
@@ -62,6 +69,14 @@ public class SimpleTypeUtil {
TYPE_MAP.put("dateTime", XmlDateTime.class); //$NON-NLS-1$
TYPE_MAP.put("date", XmlDate.class); //$NON-NLS-1$
TYPE_MAP.put("time", XmlTime.class); //$NON-NLS-1$
+
+ TYPE_MAP.put("decimal", XmlDecimal.class); //$NON-NLS-1$
+ TYPE_MAP.put("double", XmlDouble.class); //$NON-NLS-1$
+ TYPE_MAP.put("float", XmlFloat.class); //$NON-NLS-1$
+ TYPE_MAP.put("int", XmlInt.class); //$NON-NLS-1$
+ TYPE_MAP.put("integer", XmlInteger.class); //$NON-NLS-1$
+ TYPE_MAP.put("long", XmlLong.class); //$NON-NLS-1$
+ TYPE_MAP.put("short", XmlShort.class); //$NON-NLS-1$
}
/**
@@ -110,8 +125,8 @@ else if (simpleTypeValue instanceof XmlDateTime) {
xmlDateTime.setGDateValue(gdate);
}
-
- if (simpleTypeValue != null) {
+ else if (simpleTypeValue != null && simpleTypeValue instanceof XmlAnySimpleType) {
+ // Numbers should be handled here
return simpleTypeValue.getStringValue();
}
} catch (ConversionException e) {
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/BigDecimalToXmlDecimal.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/BigDecimalToXmlDecimal.java
new file mode 100644
index 0000000000..55fe904035
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/BigDecimalToXmlDecimal.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import java.math.BigDecimal;
+
+import org.apache.xmlbeans.XmlDecimal;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:BigDecimal to {@link XmlDecimal}
+ */
+public class BigDecimalToXmlDecimal implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public XmlDecimal convert(BigDecimal value) {
+ if (value == null) {
+ return null;
+ }
+
+ // Convert BigDecimal to string
+ String stringValue = value.toPlainString();
+
+ XmlDecimal xmlDecimalValue = XmlDecimal.Factory.newInstance();
+ xmlDecimalValue.setStringValue(stringValue);
+ return xmlDecimalValue;
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/BigIntegerToXmlInteger.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/BigIntegerToXmlInteger.java
new file mode 100644
index 0000000000..a01ae09aab
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/BigIntegerToXmlInteger.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import java.math.BigInteger;
+
+import org.apache.xmlbeans.XmlInteger;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:BigInteger to {@link XmlInteger}
+ */
+public class BigIntegerToXmlInteger implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public XmlInteger convert(BigInteger value) {
+ if (value == null) {
+ return null;
+ }
+ return XmlInteger.Factory.newValue(value);
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/DoubleToXmlDouble.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/DoubleToXmlDouble.java
new file mode 100644
index 0000000000..99f505b237
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/DoubleToXmlDouble.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlDouble;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:Double to {@link XmlDouble}
+ */
+public class DoubleToXmlDouble implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public XmlDouble convert(Double value) {
+ if (value == null) {
+ return null;
+ }
+ return XmlDouble.Factory.newValue(value);
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/FloatToXmlFloat.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/FloatToXmlFloat.java
new file mode 100644
index 0000000000..22f8ee8441
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/FloatToXmlFloat.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlFloat;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:Float to {@link XmlFloat}
+ */
+public class FloatToXmlFloat implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public XmlFloat convert(Float value) {
+ if (value == null) {
+ return null;
+ }
+ return XmlFloat.Factory.newValue(value);
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/IntegerToXmlInt.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/IntegerToXmlInt.java
new file mode 100644
index 0000000000..798565745e
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/IntegerToXmlInt.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlInt;
+import org.apache.xmlbeans.XmlInteger;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:Int to {@link XmlInteger}
+ */
+public class IntegerToXmlInt implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public XmlInt convert(Integer value) {
+ if (value == null) {
+ return null;
+ }
+ return XmlInt.Factory.newValue(value);
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/IntegerToXmlInteger.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/IntegerToXmlInteger.java
new file mode 100644
index 0000000000..bf73804e86
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/IntegerToXmlInteger.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlInteger;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:Integer to {@link XmlInteger}
+ */
+public class IntegerToXmlInteger implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public XmlInteger convert(Integer value) {
+ if (value == null) {
+ return null;
+ }
+ return XmlInteger.Factory.newValue(value);
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/LongToXmlLong.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/LongToXmlLong.java
new file mode 100644
index 0000000000..e5f810fbfb
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/LongToXmlLong.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlLong;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:Long to {@link XmlLong}
+ */
+public class LongToXmlLong implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public XmlLong convert(Long value) {
+ if (value == null) {
+ return null;
+ }
+ return XmlLong.Factory.newValue(value);
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/ShortToXmlShort.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/ShortToXmlShort.java
new file mode 100644
index 0000000000..755770afa9
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/ShortToXmlShort.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlDecimal;
+import org.apache.xmlbeans.XmlShort;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:BigDecimal to {@link XmlDecimal}
+ */
+public class ShortToXmlShort implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public XmlShort convert(Short value) {
+ if (value == null) {
+ return null;
+ }
+ return XmlShort.Factory.newValue(value);
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlDecimalToBigDecimal.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlDecimalToBigDecimal.java
new file mode 100644
index 0000000000..c21d76f784
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlDecimalToBigDecimal.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import java.math.BigDecimal;
+
+import org.apache.xmlbeans.XmlDecimal;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:XmlDecimal to {@link BigDecimal}
+ */
+public class XmlDecimalToBigDecimal implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public BigDecimal convert(XmlDecimal value) {
+ if (value == null) {
+ return null;
+ }
+ return value.getBigDecimalValue();
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlDoubleToDouble.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlDoubleToDouble.java
new file mode 100644
index 0000000000..ef40b16562
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlDoubleToDouble.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlDouble;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:XmlDouble to {@link Double}
+ */
+public class XmlDoubleToDouble implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public Double convert(XmlDouble value) {
+ if (value == null) {
+ return null;
+ }
+ return value.getDoubleValue();
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlFloatToFloat.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlFloatToFloat.java
new file mode 100644
index 0000000000..2b170a971d
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlFloatToFloat.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlFloat;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:XmlFloat to {@link Float}
+ */
+public class XmlFloatToFloat implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public Float convert(XmlFloat value) {
+ if (value == null) {
+ return null;
+ }
+ return value.getFloatValue();
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlIntToInteger.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlIntToInteger.java
new file mode 100644
index 0000000000..116737dd6c
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlIntToInteger.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlInt;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:XmlInteger to {@link Integer}
+ */
+public class XmlIntToInteger implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public Integer convert(XmlInt value) {
+ if (value == null) {
+ return null;
+ }
+ return value.getBigIntegerValue().intValue();
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlIntegerToBigInteger.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlIntegerToBigInteger.java
new file mode 100644
index 0000000000..92099fc83c
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlIntegerToBigInteger.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import java.math.BigInteger;
+
+import org.apache.xmlbeans.XmlInteger;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:XmlInteger to {@link BigInteger}
+ */
+public class XmlIntegerToBigInteger implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public BigInteger convert(XmlInteger value) {
+ if (value == null) {
+ return null;
+ }
+ return value.getBigIntegerValue();
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlIntegerToInteger.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlIntegerToInteger.java
new file mode 100644
index 0000000000..611952c48f
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlIntegerToInteger.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlInteger;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:XmlInteger to {@link Integer}
+ */
+public class XmlIntegerToInteger implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public Integer convert(XmlInteger value) {
+ if (value == null) {
+ return null;
+ }
+ return value.getBigIntegerValue().intValue();
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlLongToLong.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlLongToLong.java
new file mode 100644
index 0000000000..b58c02a443
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlLongToLong.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlLong;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:XmlLong to {@link Long}
+ */
+public class XmlLongToLong implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public Long convert(XmlLong value) {
+ if (value == null) {
+ return null;
+ }
+ return value.getLongValue();
+ }
+
+}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlShortToShort.java b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlShortToShort.java
new file mode 100644
index 0000000000..0bfe395bd2
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/src/eu/esdihumboldt/hale/io/gml/internal/simpletype/converters/XmlShortToShort.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2024 wetransform GmbH
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution. If not, see .
+ *
+ * Contributors:
+ * wetransform GmbH
+ */
+
+package eu.esdihumboldt.hale.io.gml.internal.simpletype.converters;
+
+import org.apache.xmlbeans.XmlShort;
+import org.geotools.xml.xsi.XSISimpleTypes.Decimal;
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Convert xs:XmlDecimal to {@link Decimal}
+ */
+public class XmlShortToShort implements Converter {
+
+ /**
+ * @see Converter#convert(Object)
+ */
+ @Override
+ public Short convert(XmlShort value) {
+ if (value == null) {
+ return null;
+ }
+ return value.getShortValue();
+ }
+
+}