(Coordinates.class, this, GeoJsonPackage.GEO_JSON_OBJECT__BOUNDING_BOX);
+ }
+ return boundingBox;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.GEO_JSON_OBJECT__BOUNDING_BOX:
+ return ((InternalEList>)getBoundingBox()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.GEO_JSON_OBJECT__BBOX:
+ return getBbox();
+ case GeoJsonPackage.GEO_JSON_OBJECT__BOUNDING_BOX:
+ return getBoundingBox();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.GEO_JSON_OBJECT__BBOX:
+ getBbox().clear();
+ getBbox().addAll((Collection extends double[]>)newValue);
+ return;
+ case GeoJsonPackage.GEO_JSON_OBJECT__BOUNDING_BOX:
+ getBoundingBox().clear();
+ getBoundingBox().addAll((Collection extends Coordinates>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.GEO_JSON_OBJECT__BBOX:
+ getBbox().clear();
+ return;
+ case GeoJsonPackage.GEO_JSON_OBJECT__BOUNDING_BOX:
+ getBoundingBox().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.GEO_JSON_OBJECT__BBOX:
+ return !getBbox().isEmpty();
+ case GeoJsonPackage.GEO_JSON_OBJECT__BOUNDING_BOX:
+ return boundingBox != null && !boundingBox.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //GeoJsonObjectImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/GeoJsonPackageImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/GeoJsonPackageImpl.java
new file mode 100644
index 00000000..313d24db
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/GeoJsonPackageImpl.java
@@ -0,0 +1,1234 @@
+/**
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Map.Entry;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.sensinact.gateway.core.geojson.Coordinates;
+import org.eclipse.sensinact.gateway.core.geojson.Feature;
+import org.eclipse.sensinact.gateway.core.geojson.FeatureCollection;
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonFactory;
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonObject;
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.Geometry;
+import org.eclipse.sensinact.gateway.core.geojson.GeometryCollection;
+import org.eclipse.sensinact.gateway.core.geojson.Hole;
+import org.eclipse.sensinact.gateway.core.geojson.LineString;
+import org.eclipse.sensinact.gateway.core.geojson.MultiLineString;
+import org.eclipse.sensinact.gateway.core.geojson.MultiPoint;
+import org.eclipse.sensinact.gateway.core.geojson.MultiPolygon;
+import org.eclipse.sensinact.gateway.core.geojson.Point;
+import org.eclipse.sensinact.gateway.core.geojson.Polygon;
+import org.eclipse.sensinact.gateway.core.geojson.Ring;
+import org.eclipse.sensinact.gateway.core.geojson.SimpleLineString;
+import org.eclipse.sensinact.gateway.core.geojson.SimplePolygon;
+
+/**
+ *
+ * An implementation of the model Package.
+ *
+ * @generated
+ */
+public class GeoJsonPackageImpl extends EPackageImpl implements GeoJsonPackage {
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass coordinatesEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass pointEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass geoJsonObjectEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass propertiesEntryEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass geometryEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass lineStringEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass simpleLineStringEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass featureEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass featureCollectionEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass geometryCollectionEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass multiPointEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass polygonEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass ringEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass holeEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass multiPolygonEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass simplePolygonEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass multiLineStringEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EDataType doubleArray1DEDataType = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EDataType doubleArray2DEDataType = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EDataType doubleArray3DEDataType = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EDataType doubleArray4DEDataType = null;
+
+ /**
+ * Creates an instance of the model Package, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ *
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private GeoJsonPackageImpl() {
+ super(eNS_URI, GeoJsonFactory.eINSTANCE);
+ }
+ /**
+ *
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the Package for this model, and for any others upon which it depends.
+ *
+ *
This method is used to initialize {@link GeoJsonPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ *
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static GeoJsonPackage init() {
+ if (isInited) return (GeoJsonPackage)EPackage.Registry.INSTANCE.getEPackage(GeoJsonPackage.eNS_URI);
+
+ // Obtain or create and register package
+ Object registeredGeoJsonPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
+ GeoJsonPackageImpl theGeoJsonPackage = registeredGeoJsonPackage instanceof GeoJsonPackageImpl ? (GeoJsonPackageImpl)registeredGeoJsonPackage : new GeoJsonPackageImpl();
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theGeoJsonPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theGeoJsonPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theGeoJsonPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(GeoJsonPackage.eNS_URI, theGeoJsonPackage);
+ return theGeoJsonPackage;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getCoordinates() {
+ return coordinatesEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getCoordinates_Longitude() {
+ return (EAttribute)coordinatesEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getCoordinates_Latitude() {
+ return (EAttribute)coordinatesEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getCoordinates_Elevation() {
+ return (EAttribute)coordinatesEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getPoint() {
+ return pointEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getPoint_Data() {
+ return (EAttribute)pointEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getPoint_Coordinates() {
+ return (EReference)pointEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getPoint__SetData__double() {
+ return pointEClass.getEOperations().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getGeoJsonObject() {
+ return geoJsonObjectEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getGeoJsonObject_Bbox() {
+ return (EAttribute)geoJsonObjectEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getGeoJsonObject_BoundingBox() {
+ return (EReference)geoJsonObjectEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getPropertiesEntry() {
+ return propertiesEntryEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getPropertiesEntry_Key() {
+ return (EAttribute)propertiesEntryEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getPropertiesEntry_Value() {
+ return (EAttribute)propertiesEntryEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getGeometry() {
+ return geometryEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getLineString() {
+ return lineStringEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getSimpleLineString() {
+ return simpleLineStringEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getSimpleLineString_Data() {
+ return (EAttribute)simpleLineStringEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getSimpleLineString_Coordinates() {
+ return (EReference)simpleLineStringEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getFeature() {
+ return featureEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getFeature_Id() {
+ return (EAttribute)featureEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getFeature_Geometry() {
+ return (EReference)featureEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getFeature_Properties() {
+ return (EReference)featureEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getFeatureCollection() {
+ return featureCollectionEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getFeatureCollection_Features() {
+ return (EReference)featureCollectionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getGeometryCollection() {
+ return geometryCollectionEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getGeometryCollection_Geometries() {
+ return (EReference)geometryCollectionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getMultiPoint() {
+ return multiPointEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getMultiPoint_Data() {
+ return (EAttribute)multiPointEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getMultiPoint_Coordinates() {
+ return (EReference)multiPointEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getPolygon() {
+ return polygonEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getRing() {
+ return ringEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getRing_Coordinates() {
+ return (EReference)ringEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getHole() {
+ return holeEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getMultiPolygon() {
+ return multiPolygonEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getMultiPolygon_Data() {
+ return (EAttribute)multiPolygonEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getMultiPolygon_Polygons() {
+ return (EReference)multiPolygonEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getMultiPolygon__SetData__double() {
+ return multiPolygonEClass.getEOperations().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getSimplePolygon() {
+ return simplePolygonEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getSimplePolygon_Data() {
+ return (EAttribute)simplePolygonEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getSimplePolygon_ExteriorRing() {
+ return (EReference)simplePolygonEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getSimplePolygon_InteriorHoles() {
+ return (EReference)simplePolygonEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getSimplePolygon__SetData__double() {
+ return simplePolygonEClass.getEOperations().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getMultiLineString() {
+ return multiLineStringEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getMultiLineString_Data() {
+ return (EAttribute)multiLineStringEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getMultiLineString_LinesStrings() {
+ return (EReference)multiLineStringEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getMultiLineString__SetData__double() {
+ return multiLineStringEClass.getEOperations().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EDataType getDoubleArray1D() {
+ return doubleArray1DEDataType;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EDataType getDoubleArray2D() {
+ return doubleArray2DEDataType;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EDataType getDoubleArray3D() {
+ return doubleArray3DEDataType;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EDataType getDoubleArray4D() {
+ return doubleArray4DEDataType;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public GeoJsonFactory getGeoJsonFactory() {
+ return (GeoJsonFactory)getEFactoryInstance();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ *
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ coordinatesEClass = createEClass(COORDINATES);
+ createEAttribute(coordinatesEClass, COORDINATES__LONGITUDE);
+ createEAttribute(coordinatesEClass, COORDINATES__LATITUDE);
+ createEAttribute(coordinatesEClass, COORDINATES__ELEVATION);
+
+ pointEClass = createEClass(POINT);
+ createEAttribute(pointEClass, POINT__DATA);
+ createEReference(pointEClass, POINT__COORDINATES);
+ createEOperation(pointEClass, POINT___SET_DATA__DOUBLE);
+
+ geoJsonObjectEClass = createEClass(GEO_JSON_OBJECT);
+ createEAttribute(geoJsonObjectEClass, GEO_JSON_OBJECT__BBOX);
+ createEReference(geoJsonObjectEClass, GEO_JSON_OBJECT__BOUNDING_BOX);
+
+ propertiesEntryEClass = createEClass(PROPERTIES_ENTRY);
+ createEAttribute(propertiesEntryEClass, PROPERTIES_ENTRY__KEY);
+ createEAttribute(propertiesEntryEClass, PROPERTIES_ENTRY__VALUE);
+
+ geometryEClass = createEClass(GEOMETRY);
+
+ lineStringEClass = createEClass(LINE_STRING);
+
+ simpleLineStringEClass = createEClass(SIMPLE_LINE_STRING);
+ createEAttribute(simpleLineStringEClass, SIMPLE_LINE_STRING__DATA);
+ createEReference(simpleLineStringEClass, SIMPLE_LINE_STRING__COORDINATES);
+
+ featureEClass = createEClass(FEATURE);
+ createEAttribute(featureEClass, FEATURE__ID);
+ createEReference(featureEClass, FEATURE__GEOMETRY);
+ createEReference(featureEClass, FEATURE__PROPERTIES);
+
+ featureCollectionEClass = createEClass(FEATURE_COLLECTION);
+ createEReference(featureCollectionEClass, FEATURE_COLLECTION__FEATURES);
+
+ geometryCollectionEClass = createEClass(GEOMETRY_COLLECTION);
+ createEReference(geometryCollectionEClass, GEOMETRY_COLLECTION__GEOMETRIES);
+
+ multiPointEClass = createEClass(MULTI_POINT);
+ createEAttribute(multiPointEClass, MULTI_POINT__DATA);
+ createEReference(multiPointEClass, MULTI_POINT__COORDINATES);
+
+ polygonEClass = createEClass(POLYGON);
+
+ ringEClass = createEClass(RING);
+ createEReference(ringEClass, RING__COORDINATES);
+
+ holeEClass = createEClass(HOLE);
+
+ multiPolygonEClass = createEClass(MULTI_POLYGON);
+ createEAttribute(multiPolygonEClass, MULTI_POLYGON__DATA);
+ createEReference(multiPolygonEClass, MULTI_POLYGON__POLYGONS);
+ createEOperation(multiPolygonEClass, MULTI_POLYGON___SET_DATA__DOUBLE);
+
+ simplePolygonEClass = createEClass(SIMPLE_POLYGON);
+ createEAttribute(simplePolygonEClass, SIMPLE_POLYGON__DATA);
+ createEReference(simplePolygonEClass, SIMPLE_POLYGON__EXTERIOR_RING);
+ createEReference(simplePolygonEClass, SIMPLE_POLYGON__INTERIOR_HOLES);
+ createEOperation(simplePolygonEClass, SIMPLE_POLYGON___SET_DATA__DOUBLE);
+
+ multiLineStringEClass = createEClass(MULTI_LINE_STRING);
+ createEAttribute(multiLineStringEClass, MULTI_LINE_STRING__DATA);
+ createEReference(multiLineStringEClass, MULTI_LINE_STRING__LINES_STRINGS);
+ createEOperation(multiLineStringEClass, MULTI_LINE_STRING___SET_DATA__DOUBLE);
+
+ // Create data types
+ doubleArray1DEDataType = createEDataType(DOUBLE_ARRAY1_D);
+ doubleArray2DEDataType = createEDataType(DOUBLE_ARRAY2_D);
+ doubleArray3DEDataType = createEDataType(DOUBLE_ARRAY3_D);
+ doubleArray4DEDataType = createEDataType(DOUBLE_ARRAY4_D);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ *
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ pointEClass.getESuperTypes().add(this.getGeometry());
+ geometryEClass.getESuperTypes().add(this.getGeoJsonObject());
+ lineStringEClass.getESuperTypes().add(this.getGeometry());
+ lineStringEClass.getESuperTypes().add(this.getSimpleLineString());
+ featureEClass.getESuperTypes().add(this.getGeoJsonObject());
+ featureCollectionEClass.getESuperTypes().add(this.getGeoJsonObject());
+ geometryCollectionEClass.getESuperTypes().add(this.getGeometry());
+ multiPointEClass.getESuperTypes().add(this.getGeometry());
+ polygonEClass.getESuperTypes().add(this.getGeometry());
+ polygonEClass.getESuperTypes().add(this.getSimplePolygon());
+ holeEClass.getESuperTypes().add(this.getRing());
+ multiPolygonEClass.getESuperTypes().add(this.getGeometry());
+ multiLineStringEClass.getESuperTypes().add(this.getGeometry());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(coordinatesEClass, Coordinates.class, "Coordinates", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCoordinates_Longitude(), ecorePackage.getEDouble(), "longitude", null, 1, 1, Coordinates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCoordinates_Latitude(), ecorePackage.getEDouble(), "latitude", null, 1, 1, Coordinates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCoordinates_Elevation(), ecorePackage.getEDouble(), "elevation", "0.0d", 0, 1, Coordinates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(pointEClass, Point.class, "Point", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPoint_Data(), this.getDoubleArray1D(), "data", null, 0, 1, Point.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPoint_Coordinates(), this.getCoordinates(), null, "coordinates", null, 0, 1, Point.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ EOperation op = initEOperation(getPoint__SetData__double(), null, "setData", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, this.getDoubleArray1D(), "data", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(geoJsonObjectEClass, GeoJsonObject.class, "GeoJsonObject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getGeoJsonObject_Bbox(), this.getDoubleArray1D(), "bbox", null, 0, -1, GeoJsonObject.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGeoJsonObject_BoundingBox(), this.getCoordinates(), null, "boundingBox", null, 0, -1, GeoJsonObject.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(propertiesEntryEClass, Entry.class, "PropertiesEntry", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPropertiesEntry_Key(), ecorePackage.getEString(), "key", null, 1, 1, Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPropertiesEntry_Value(), ecorePackage.getEJavaObject(), "value", null, 1, 1, Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(geometryEClass, Geometry.class, "Geometry", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(lineStringEClass, LineString.class, "LineString", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(simpleLineStringEClass, SimpleLineString.class, "SimpleLineString", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSimpleLineString_Data(), this.getDoubleArray1D(), "data", null, 0, -1, SimpleLineString.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSimpleLineString_Coordinates(), this.getCoordinates(), null, "coordinates", null, 0, -1, SimpleLineString.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(featureEClass, Feature.class, "Feature", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getFeature_Id(), ecorePackage.getEString(), "id", null, 1, 1, Feature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getFeature_Geometry(), this.getGeometry(), null, "geometry", null, 0, 1, Feature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getFeature_Properties(), ecorePackage.getEObject(), null, "properties", null, 0, 1, Feature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(featureCollectionEClass, FeatureCollection.class, "FeatureCollection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getFeatureCollection_Features(), this.getFeature(), null, "features", null, 0, -1, FeatureCollection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(geometryCollectionEClass, GeometryCollection.class, "GeometryCollection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getGeometryCollection_Geometries(), this.getGeometry(), null, "geometries", null, 0, -1, GeometryCollection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(multiPointEClass, MultiPoint.class, "MultiPoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getMultiPoint_Data(), this.getDoubleArray1D(), "data", null, 0, -1, MultiPoint.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getMultiPoint_Coordinates(), this.getCoordinates(), null, "coordinates", null, 0, -1, MultiPoint.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(polygonEClass, Polygon.class, "Polygon", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(ringEClass, Ring.class, "Ring", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRing_Coordinates(), this.getCoordinates(), null, "coordinates", null, 0, -1, Ring.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(holeEClass, Hole.class, "Hole", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(multiPolygonEClass, MultiPolygon.class, "MultiPolygon", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getMultiPolygon_Data(), this.getDoubleArray4D(), "data", null, 0, 1, MultiPolygon.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getMultiPolygon_Polygons(), this.getSimplePolygon(), null, "polygons", null, 0, -1, MultiPolygon.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ op = initEOperation(getMultiPolygon__SetData__double(), null, "setData", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, this.getDoubleArray4D(), "data", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(simplePolygonEClass, SimplePolygon.class, "SimplePolygon", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSimplePolygon_Data(), this.getDoubleArray3D(), "data", null, 0, 1, SimplePolygon.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSimplePolygon_ExteriorRing(), this.getRing(), null, "exteriorRing", null, 0, 1, SimplePolygon.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSimplePolygon_InteriorHoles(), this.getHole(), null, "interiorHoles", null, 0, -1, SimplePolygon.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ op = initEOperation(getSimplePolygon__SetData__double(), null, "setData", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, this.getDoubleArray3D(), "data", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(multiLineStringEClass, MultiLineString.class, "MultiLineString", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getMultiLineString_Data(), this.getDoubleArray3D(), "data", null, 0, 1, MultiLineString.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getMultiLineString_LinesStrings(), this.getSimpleLineString(), null, "linesStrings", null, 0, -1, MultiLineString.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ op = initEOperation(getMultiLineString__SetData__double(), null, "setData", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, this.getDoubleArray3D(), "data", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ // Initialize data types
+ initEDataType(doubleArray1DEDataType, double[].class, "DoubleArray1D", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+ initEDataType(doubleArray2DEDataType, double[][].class, "DoubleArray2D", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+ initEDataType(doubleArray3DEDataType, double[][][].class, "DoubleArray3D", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+ initEDataType(doubleArray4DEDataType, double[][][][].class, "DoubleArray4D", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // Version
+ createVersionAnnotations();
+ // http://www.eclipse.org/emf/2002/GenModel
+ createGenModelAnnotations();
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for Version.
+ *
+ *
+ * @generated
+ */
+ protected void createVersionAnnotations() {
+ String source = "Version";
+ addAnnotation
+ (this,
+ source,
+ new String[] {
+ "value", "1.0"
+ });
+ }
+
+ /**
+ * Initializes the annotations for http://www.eclipse.org/emf/2002/GenModel.
+ *
+ *
+ * @generated
+ */
+ protected void createGenModelAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/GenModel";
+ addAnnotation
+ (this,
+ source,
+ new String[] {
+ "publicConstructors", "true"
+ });
+ addAnnotation
+ (pointEClass,
+ source,
+ new String[] {
+ "documentation", "A GeoJSON point object as defined in\nthe GeoJSON\nspecification"
+ });
+ addAnnotation
+ (getPoint__SetData__double(),
+ source,
+ new String[] {
+ "body", "setCoordinates(org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.toCoordinates(data));",
+ "suppressedVisibility", "true"
+ });
+ addAnnotation
+ (getPoint_Data(),
+ source,
+ new String[] {
+ "suppressedGetVisibility", "true",
+ "suppressedIsSetVisibility", "true",
+ "suppressedSetVisibility", "true",
+ "suppressedUnsetVisibility", "true",
+ "get", "return org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.convertCoordinates(getCoordinates());"
+ });
+ addAnnotation
+ (getGeoJsonObject_Bbox(),
+ source,
+ new String[] {
+ "suppressedGetVisibility", "true",
+ "suppressedIsSetVisibility", "false",
+ "suppressedSetVisibility", "true",
+ "suppressedUnsetVisibility", "true",
+ "get", "return new org.eclipse.sensinact.gateway.core.geojson.util.GenericConvertingList(getBoundingBox(), org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::toCoordinates, org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::convertCoordinates);"
+ });
+ addAnnotation
+ (lineStringEClass,
+ source,
+ new String[] {
+ "documentation", " A GeoJSON line string object as defined in\nthe GeoJSON specification"
+ });
+ addAnnotation
+ (getSimpleLineString_Data(),
+ source,
+ new String[] {
+ "suppressedGetVisibility", "true",
+ "suppressedIsSetVisibility", "false",
+ "suppressedSetVisibility", "true",
+ "suppressedUnsetVisibility", "true",
+ "get", "return new org.eclipse.sensinact.gateway.core.geojson.util.GenericConvertingList(getCoordinates(), org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::toCoordinates, org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::convertCoordinates);"
+ });
+ addAnnotation
+ (geometryCollectionEClass,
+ source,
+ new String[] {
+ "documentation", "A GeoJSON geometry collection object as defined in\nthe GeoJSON\nspecification"
+ });
+ addAnnotation
+ (multiPointEClass,
+ source,
+ new String[] {
+ "documentation", " A GeoJSON multi point object as defined in\nthe GeoJSON specification"
+ });
+ addAnnotation
+ (getMultiPoint_Data(),
+ source,
+ new String[] {
+ "suppressedGetVisibility", "true",
+ "suppressedIsSetVisibility", "false",
+ "suppressedSetVisibility", "true",
+ "suppressedUnsetVisibility", "true",
+ "get", "return new org.eclipse.sensinact.gateway.core.geojson.util.GenericConvertingList(getCoordinates(), org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::toCoordinates, org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::convertCoordinates);"
+ });
+ addAnnotation
+ (polygonEClass,
+ source,
+ new String[] {
+ "documentation", " A GeoJSON Polygone object as defined in\nthe GeoJSON specification"
+ });
+ addAnnotation
+ (ringEClass,
+ source,
+ new String[] {
+ "documentation", "Represents a List of Coordinates that follow the right-hand rule and run counterclockwise"
+ });
+ addAnnotation
+ (holeEClass,
+ source,
+ new String[] {
+ "documentation", "Represents a List of Coordinates that follow the right-hand rule and run clockwise."
+ });
+ addAnnotation
+ (multiPolygonEClass,
+ source,
+ new String[] {
+ "documentation", " A GeoJSON Polygone object as defined in\nthe GeoJSON specification"
+ });
+ addAnnotation
+ (getMultiPolygon__SetData__double(),
+ source,
+ new String[] {
+ "body", "for (int i = 0; i < data.length; i++) {\n\tdouble[][][] d = data[i];\n\tSimplePolygonImpl polygon = (SimplePolygonImpl) org.eclipse.sensinact.gateway.core.geojson.GeoJsonFactory.eINSTANCE.createSimplePolygon();\n\tpolygon.setData(d);\n\tgetPolygons().add(polygon);\n}",
+ "suppressedVisibility", "true"
+ });
+ addAnnotation
+ (getMultiPolygon_Data(),
+ source,
+ new String[] {
+ "suppressedGetVisibility", "true",
+ "suppressedIsSetVisibility", "false",
+ "suppressedSetVisibility", "true",
+ "suppressedUnsetVisibility", "true",
+ "get", "double[][][][] result = new double[getPolygons().size()][][][];\nfor (int i = 0; i < getPolygons().size(); i++) {\n\tSimplePolygonImpl polygon = (SimplePolygonImpl) getPolygons().get(i);\n\tresult[i] = polygon.getData();\n}\nreturn result;"
+ });
+ addAnnotation
+ (simplePolygonEClass,
+ source,
+ new String[] {
+ "documentation", " A GeoJSON Polygone object as defined in\nthe GeoJSON specification"
+ });
+ addAnnotation
+ (getSimplePolygon__SetData__double(),
+ source,
+ new String[] {
+ "body", "for (int i = 0; i < data.length; i++) {\n\tdouble[][] d = data[i];\n\tif(i == 0) {\n\t\tsetExteriorRing(org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.toRing(d));\n\t} else {\n\t\tgetInteriorHoles().add(org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.toHole(d));\n\t}\n}",
+ "suppressedVisibility", "true"
+ });
+ addAnnotation
+ (getSimplePolygon_Data(),
+ source,
+ new String[] {
+ "suppressedGetVisibility", "true",
+ "suppressedIsSetVisibility", "false",
+ "suppressedSetVisibility", "true",
+ "suppressedUnsetVisibility", "true",
+ "get", "double[][][] result = new double[1 + getInteriorHoles().size()][][];\nresult[0] = org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.convertRing(getExteriorRing());\nfor (int i = 0; i < getInteriorHoles().size(); i++) {\n\tHole hole = getInteriorHoles().get(i);\n\tresult[i +1 ] = org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.convertRing(hole);\n}\nreturn result;"
+ });
+ addAnnotation
+ (multiLineStringEClass,
+ source,
+ new String[] {
+ "documentation", " A GeoJSON Polygone object as defined in\nthe GeoJSON specification"
+ });
+ addAnnotation
+ (getMultiLineString__SetData__double(),
+ source,
+ new String[] {
+ "body", "for (int i = 0; i < data.length; i++) {\n\tdouble[][] d = data[i];\n\tSimpleLineStringImpl line = (SimpleLineStringImpl) org.eclipse.sensinact.gateway.core.geojson.GeoJsonFactory.eINSTANCE.createSimpleLineString();\n\tfor (double[] e : d) {\n\t\tline.getData().add(e);\n\t}\n}",
+ "suppressedVisibility", "true"
+ });
+ addAnnotation
+ (getMultiLineString_Data(),
+ source,
+ new String[] {
+ "suppressedGetVisibility", "true",
+ "suppressedIsSetVisibility", "false",
+ "suppressedSetVisibility", "true",
+ "suppressedUnsetVisibility", "true",
+ "get", "double[][][] result = new double[getLinesStrings().size()][][];\nfor (int i = 0; i < getLinesStrings().size(); i++) {\n\tSimpleLineStringImpl line = (SimpleLineStringImpl) getLinesStrings().get(i);\n\tresult[i] = line.getData().toArray(new double[line.getCoordinates().size()][]);\n}\nreturn result;"
+ });
+ }
+
+ /**
+ * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData.
+ *
+ *
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations() {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ addAnnotation
+ (getPoint_Data(),
+ source,
+ new String[] {
+ "name", "coordinates"
+ });
+ addAnnotation
+ (getGeoJsonObject_Bbox(),
+ source,
+ new String[] {
+ "name", "bbox"
+ });
+ addAnnotation
+ (getSimpleLineString_Data(),
+ source,
+ new String[] {
+ "name", "coordinates"
+ });
+ addAnnotation
+ (getMultiPoint_Data(),
+ source,
+ new String[] {
+ "name", "coordinates"
+ });
+ addAnnotation
+ (getMultiPolygon_Data(),
+ source,
+ new String[] {
+ "name", "coordinates"
+ });
+ addAnnotation
+ (getSimplePolygon_Data(),
+ source,
+ new String[] {
+ "name", "coordinates"
+ });
+ addAnnotation
+ (getMultiLineString_Data(),
+ source,
+ new String[] {
+ "name", "coordinates"
+ });
+ }
+
+} //GeoJsonPackageImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/GeometryCollectionImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/GeometryCollectionImpl.java
new file mode 100644
index 00000000..4de28ca2
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/GeometryCollectionImpl.java
@@ -0,0 +1,151 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.Geometry;
+import org.eclipse.sensinact.gateway.core.geojson.GeometryCollection;
+
+/**
+ *
+ * An implementation of the model object 'Geometry Collection'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.GeometryCollectionImpl#getGeometries Geometries}
+ *
+ *
+ * @generated
+ */
+public class GeometryCollectionImpl extends GeoJsonObjectImpl implements GeometryCollection {
+ /**
+ * The cached value of the '{@link #getGeometries() Geometries}' containment reference list.
+ *
+ *
+ * @see #getGeometries()
+ * @generated
+ * @ordered
+ */
+ protected EList geometries;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public GeometryCollectionImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.GEOMETRY_COLLECTION;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getGeometries() {
+ if (geometries == null) {
+ geometries = new EObjectContainmentEList(Geometry.class, this, GeoJsonPackage.GEOMETRY_COLLECTION__GEOMETRIES);
+ }
+ return geometries;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.GEOMETRY_COLLECTION__GEOMETRIES:
+ return ((InternalEList>)getGeometries()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.GEOMETRY_COLLECTION__GEOMETRIES:
+ return getGeometries();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.GEOMETRY_COLLECTION__GEOMETRIES:
+ getGeometries().clear();
+ getGeometries().addAll((Collection extends Geometry>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.GEOMETRY_COLLECTION__GEOMETRIES:
+ getGeometries().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.GEOMETRY_COLLECTION__GEOMETRIES:
+ return geometries != null && !geometries.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //GeometryCollectionImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/HoleImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/HoleImpl.java
new file mode 100644
index 00000000..40dfbf17
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/HoleImpl.java
@@ -0,0 +1,37 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.Hole;
+
+/**
+ *
+ * An implementation of the model object 'Hole'.
+ *
+ *
+ * @generated
+ */
+public class HoleImpl extends RingImpl implements Hole {
+ /**
+ *
+ *
+ * @generated
+ */
+ public HoleImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.HOLE;
+ }
+
+} //HoleImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/LineStringImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/LineStringImpl.java
new file mode 100644
index 00000000..60249d95
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/LineStringImpl.java
@@ -0,0 +1,207 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sensinact.gateway.core.geojson.Coordinates;
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.LineString;
+import org.eclipse.sensinact.gateway.core.geojson.SimpleLineString;
+
+/**
+ *
+ * An implementation of the model object 'Line String'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.LineStringImpl#getData Data}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.LineStringImpl#getCoordinates Coordinates}
+ *
+ *
+ * @generated
+ */
+public class LineStringImpl extends GeoJsonObjectImpl implements LineString {
+ /**
+ * The cached value of the '{@link #getCoordinates() Coordinates}' containment reference list.
+ *
+ *
+ * @see #getCoordinates()
+ * @generated
+ * @ordered
+ */
+ protected EList coordinates;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public LineStringImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.LINE_STRING;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EList getData() {
+ return new org.eclipse.sensinact.gateway.core.geojson.util.GenericConvertingList(getCoordinates(), org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::toCoordinates, org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::convertCoordinates);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getCoordinates() {
+ if (coordinates == null) {
+ coordinates = new EObjectContainmentEList(Coordinates.class, this, GeoJsonPackage.LINE_STRING__COORDINATES);
+ }
+ return coordinates;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.LINE_STRING__COORDINATES:
+ return ((InternalEList>)getCoordinates()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.LINE_STRING__DATA:
+ return getData();
+ case GeoJsonPackage.LINE_STRING__COORDINATES:
+ return getCoordinates();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.LINE_STRING__DATA:
+ getData().clear();
+ getData().addAll((Collection extends double[]>)newValue);
+ return;
+ case GeoJsonPackage.LINE_STRING__COORDINATES:
+ getCoordinates().clear();
+ getCoordinates().addAll((Collection extends Coordinates>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.LINE_STRING__DATA:
+ getData().clear();
+ return;
+ case GeoJsonPackage.LINE_STRING__COORDINATES:
+ getCoordinates().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.LINE_STRING__DATA:
+ return !getData().isEmpty();
+ case GeoJsonPackage.LINE_STRING__COORDINATES:
+ return coordinates != null && !coordinates.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
+ if (baseClass == SimpleLineString.class) {
+ switch (derivedFeatureID) {
+ case GeoJsonPackage.LINE_STRING__DATA: return GeoJsonPackage.SIMPLE_LINE_STRING__DATA;
+ case GeoJsonPackage.LINE_STRING__COORDINATES: return GeoJsonPackage.SIMPLE_LINE_STRING__COORDINATES;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
+ if (baseClass == SimpleLineString.class) {
+ switch (baseFeatureID) {
+ case GeoJsonPackage.SIMPLE_LINE_STRING__DATA: return GeoJsonPackage.LINE_STRING__DATA;
+ case GeoJsonPackage.SIMPLE_LINE_STRING__COORDINATES: return GeoJsonPackage.LINE_STRING__COORDINATES;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+} //LineStringImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/MultiLineStringImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/MultiLineStringImpl.java
new file mode 100644
index 00000000..963b9280
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/MultiLineStringImpl.java
@@ -0,0 +1,201 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.MultiLineString;
+import org.eclipse.sensinact.gateway.core.geojson.SimpleLineString;
+
+/**
+ *
+ * An implementation of the model object 'Multi Line String'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.MultiLineStringImpl#getData Data}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.MultiLineStringImpl#getLinesStrings Lines Strings}
+ *
+ *
+ * @generated
+ */
+public class MultiLineStringImpl extends GeoJsonObjectImpl implements MultiLineString {
+ /**
+ * The default value of the '{@link #getData() Data}' attribute.
+ *
+ *
+ * @see #getData()
+ * @generated
+ * @ordered
+ */
+ protected static final double[][][] DATA_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLinesStrings() Lines Strings}' containment reference list.
+ *
+ *
+ * @see #getLinesStrings()
+ * @generated
+ * @ordered
+ */
+ protected EList linesStrings;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public MultiLineStringImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.MULTI_LINE_STRING;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public double[][][] getData() {
+ double[][][] result = new double[getLinesStrings().size()][][];
+ for (int i = 0; i < getLinesStrings().size(); i++) {
+ SimpleLineStringImpl line = (SimpleLineStringImpl) getLinesStrings().get(i);
+ result[i] = line.getData().toArray(new double[line.getCoordinates().size()][]);
+ }
+ return result;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setData(double[][][] data) {
+ for (int i = 0; i < data.length; i++) {
+ double[][] d = data[i];
+ SimpleLineStringImpl line = (SimpleLineStringImpl) org.eclipse.sensinact.gateway.core.geojson.GeoJsonFactory.eINSTANCE.createSimpleLineString();
+ for (double[] e : d) {
+ line.getData().add(e);
+ }
+ }
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getLinesStrings() {
+ if (linesStrings == null) {
+ linesStrings = new EObjectContainmentEList(SimpleLineString.class, this, GeoJsonPackage.MULTI_LINE_STRING__LINES_STRINGS);
+ }
+ return linesStrings;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_LINE_STRING__LINES_STRINGS:
+ return ((InternalEList>)getLinesStrings()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_LINE_STRING__DATA:
+ return getData();
+ case GeoJsonPackage.MULTI_LINE_STRING__LINES_STRINGS:
+ return getLinesStrings();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_LINE_STRING__DATA:
+ setData((double[][][])newValue);
+ return;
+ case GeoJsonPackage.MULTI_LINE_STRING__LINES_STRINGS:
+ getLinesStrings().clear();
+ getLinesStrings().addAll((Collection extends SimpleLineString>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_LINE_STRING__DATA:
+ setData(DATA_EDEFAULT);
+ return;
+ case GeoJsonPackage.MULTI_LINE_STRING__LINES_STRINGS:
+ getLinesStrings().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_LINE_STRING__DATA:
+ return DATA_EDEFAULT == null ? getData() != null : !DATA_EDEFAULT.equals(getData());
+ case GeoJsonPackage.MULTI_LINE_STRING__LINES_STRINGS:
+ return linesStrings != null && !linesStrings.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //MultiLineStringImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/MultiPointImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/MultiPointImpl.java
new file mode 100644
index 00000000..2358a956
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/MultiPointImpl.java
@@ -0,0 +1,172 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sensinact.gateway.core.geojson.Coordinates;
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.MultiPoint;
+
+/**
+ *
+ * An implementation of the model object 'Multi Point'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.MultiPointImpl#getData Data}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.MultiPointImpl#getCoordinates Coordinates}
+ *
+ *
+ * @generated
+ */
+public class MultiPointImpl extends GeoJsonObjectImpl implements MultiPoint {
+ /**
+ * The cached value of the '{@link #getCoordinates() Coordinates}' containment reference list.
+ *
+ *
+ * @see #getCoordinates()
+ * @generated
+ * @ordered
+ */
+ protected EList coordinates;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public MultiPointImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.MULTI_POINT;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EList getData() {
+ return new org.eclipse.sensinact.gateway.core.geojson.util.GenericConvertingList(getCoordinates(), org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::toCoordinates, org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::convertCoordinates);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getCoordinates() {
+ if (coordinates == null) {
+ coordinates = new EObjectContainmentEList(Coordinates.class, this, GeoJsonPackage.MULTI_POINT__COORDINATES);
+ }
+ return coordinates;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POINT__COORDINATES:
+ return ((InternalEList>)getCoordinates()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POINT__DATA:
+ return getData();
+ case GeoJsonPackage.MULTI_POINT__COORDINATES:
+ return getCoordinates();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POINT__DATA:
+ getData().clear();
+ getData().addAll((Collection extends double[]>)newValue);
+ return;
+ case GeoJsonPackage.MULTI_POINT__COORDINATES:
+ getCoordinates().clear();
+ getCoordinates().addAll((Collection extends Coordinates>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POINT__DATA:
+ getData().clear();
+ return;
+ case GeoJsonPackage.MULTI_POINT__COORDINATES:
+ getCoordinates().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POINT__DATA:
+ return !getData().isEmpty();
+ case GeoJsonPackage.MULTI_POINT__COORDINATES:
+ return coordinates != null && !coordinates.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //MultiPointImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/MultiPolygonImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/MultiPolygonImpl.java
new file mode 100644
index 00000000..30237171
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/MultiPolygonImpl.java
@@ -0,0 +1,200 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.MultiPolygon;
+import org.eclipse.sensinact.gateway.core.geojson.SimplePolygon;
+
+/**
+ *
+ * An implementation of the model object 'Multi Polygon'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.MultiPolygonImpl#getData Data}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.MultiPolygonImpl#getPolygons Polygons}
+ *
+ *
+ * @generated
+ */
+public class MultiPolygonImpl extends GeoJsonObjectImpl implements MultiPolygon {
+ /**
+ * The default value of the '{@link #getData() Data}' attribute.
+ *
+ *
+ * @see #getData()
+ * @generated
+ * @ordered
+ */
+ protected static final double[][][][] DATA_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPolygons() Polygons}' containment reference list.
+ *
+ *
+ * @see #getPolygons()
+ * @generated
+ * @ordered
+ */
+ protected EList polygons;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public MultiPolygonImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.MULTI_POLYGON;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public double[][][][] getData() {
+ double[][][][] result = new double[getPolygons().size()][][][];
+ for (int i = 0; i < getPolygons().size(); i++) {
+ SimplePolygonImpl polygon = (SimplePolygonImpl) getPolygons().get(i);
+ result[i] = polygon.getData();
+ }
+ return result;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setData(double[][][][] data) {
+ for (int i = 0; i < data.length; i++) {
+ double[][][] d = data[i];
+ SimplePolygonImpl polygon = (SimplePolygonImpl) org.eclipse.sensinact.gateway.core.geojson.GeoJsonFactory.eINSTANCE.createSimplePolygon();
+ polygon.setData(d);
+ getPolygons().add(polygon);
+ }
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getPolygons() {
+ if (polygons == null) {
+ polygons = new EObjectContainmentEList(SimplePolygon.class, this, GeoJsonPackage.MULTI_POLYGON__POLYGONS);
+ }
+ return polygons;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POLYGON__POLYGONS:
+ return ((InternalEList>)getPolygons()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POLYGON__DATA:
+ return getData();
+ case GeoJsonPackage.MULTI_POLYGON__POLYGONS:
+ return getPolygons();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POLYGON__DATA:
+ setData((double[][][][])newValue);
+ return;
+ case GeoJsonPackage.MULTI_POLYGON__POLYGONS:
+ getPolygons().clear();
+ getPolygons().addAll((Collection extends SimplePolygon>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POLYGON__DATA:
+ setData(DATA_EDEFAULT);
+ return;
+ case GeoJsonPackage.MULTI_POLYGON__POLYGONS:
+ getPolygons().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.MULTI_POLYGON__DATA:
+ return DATA_EDEFAULT == null ? getData() != null : !DATA_EDEFAULT.equals(getData());
+ case GeoJsonPackage.MULTI_POLYGON__POLYGONS:
+ return polygons != null && !polygons.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //MultiPolygonImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/PointImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/PointImpl.java
new file mode 100644
index 00000000..b0641287
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/PointImpl.java
@@ -0,0 +1,216 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.sensinact.gateway.core.geojson.Coordinates;
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.Point;
+
+/**
+ *
+ * An implementation of the model object 'Point'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.PointImpl#getData Data}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.PointImpl#getCoordinates Coordinates}
+ *
+ *
+ * @generated
+ */
+public class PointImpl extends GeoJsonObjectImpl implements Point {
+ /**
+ * The default value of the '{@link #getData() Data}' attribute.
+ *
+ *
+ * @see #getData()
+ * @generated
+ * @ordered
+ */
+ protected static final double[] DATA_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCoordinates() Coordinates}' containment reference.
+ *
+ *
+ * @see #getCoordinates()
+ * @generated
+ * @ordered
+ */
+ protected Coordinates coordinates;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public PointImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.POINT;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public double[] getData() {
+ return org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.convertCoordinates(getCoordinates());
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setData(double[] data) {
+ setCoordinates(org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.toCoordinates(data));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Coordinates getCoordinates() {
+ return coordinates;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public NotificationChain basicSetCoordinates(Coordinates newCoordinates, NotificationChain msgs) {
+ Coordinates oldCoordinates = coordinates;
+ coordinates = newCoordinates;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GeoJsonPackage.POINT__COORDINATES, oldCoordinates, newCoordinates);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setCoordinates(Coordinates newCoordinates) {
+ if (newCoordinates != coordinates) {
+ NotificationChain msgs = null;
+ if (coordinates != null)
+ msgs = ((InternalEObject)coordinates).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GeoJsonPackage.POINT__COORDINATES, null, msgs);
+ if (newCoordinates != null)
+ msgs = ((InternalEObject)newCoordinates).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GeoJsonPackage.POINT__COORDINATES, null, msgs);
+ msgs = basicSetCoordinates(newCoordinates, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GeoJsonPackage.POINT__COORDINATES, newCoordinates, newCoordinates));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.POINT__COORDINATES:
+ return basicSetCoordinates(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.POINT__DATA:
+ return getData();
+ case GeoJsonPackage.POINT__COORDINATES:
+ return getCoordinates();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.POINT__DATA:
+ setData((double[])newValue);
+ return;
+ case GeoJsonPackage.POINT__COORDINATES:
+ setCoordinates((Coordinates)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.POINT__DATA:
+ setData(DATA_EDEFAULT);
+ return;
+ case GeoJsonPackage.POINT__COORDINATES:
+ setCoordinates((Coordinates)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.POINT__DATA:
+ return DATA_EDEFAULT == null ? getData() != null : !DATA_EDEFAULT.equals(getData());
+ case GeoJsonPackage.POINT__COORDINATES:
+ return coordinates != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PointImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/PolygonImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/PolygonImpl.java
new file mode 100644
index 00000000..9d2ba7a1
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/PolygonImpl.java
@@ -0,0 +1,312 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.Hole;
+import org.eclipse.sensinact.gateway.core.geojson.Polygon;
+import org.eclipse.sensinact.gateway.core.geojson.Ring;
+import org.eclipse.sensinact.gateway.core.geojson.SimplePolygon;
+
+/**
+ *
+ * An implementation of the model object 'Polygon'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.PolygonImpl#getData Data}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.PolygonImpl#getExteriorRing Exterior Ring}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.PolygonImpl#getInteriorHoles Interior Holes}
+ *
+ *
+ * @generated
+ */
+public class PolygonImpl extends GeoJsonObjectImpl implements Polygon {
+ /**
+ * The default value of the '{@link #getData() Data}' attribute.
+ *
+ *
+ * @see #getData()
+ * @generated
+ * @ordered
+ */
+ protected static final double[][][] DATA_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getExteriorRing() Exterior Ring}' containment reference.
+ *
+ *
+ * @see #getExteriorRing()
+ * @generated
+ * @ordered
+ */
+ protected Ring exteriorRing;
+
+ /**
+ * The cached value of the '{@link #getInteriorHoles() Interior Holes}' containment reference list.
+ *
+ *
+ * @see #getInteriorHoles()
+ * @generated
+ * @ordered
+ */
+ protected EList interiorHoles;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public PolygonImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.POLYGON;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public double[][][] getData() {
+ double[][][] result = new double[1 + getInteriorHoles().size()][][];
+ result[0] = org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.convertRing(getExteriorRing());
+ for (int i = 0; i < getInteriorHoles().size(); i++) {
+ Hole hole = getInteriorHoles().get(i);
+ result[i +1 ] = org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.convertRing(hole);
+ }
+ return result;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setData(double[][][] data) {
+ for (int i = 0; i < data.length; i++) {
+ double[][] d = data[i];
+ if(i == 0) {
+ setExteriorRing(org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.toRing(d));
+ } else {
+ getInteriorHoles().add(org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.toHole(d));
+ }
+ }
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Ring getExteriorRing() {
+ return exteriorRing;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public NotificationChain basicSetExteriorRing(Ring newExteriorRing, NotificationChain msgs) {
+ Ring oldExteriorRing = exteriorRing;
+ exteriorRing = newExteriorRing;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GeoJsonPackage.POLYGON__EXTERIOR_RING, oldExteriorRing, newExteriorRing);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setExteriorRing(Ring newExteriorRing) {
+ if (newExteriorRing != exteriorRing) {
+ NotificationChain msgs = null;
+ if (exteriorRing != null)
+ msgs = ((InternalEObject)exteriorRing).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GeoJsonPackage.POLYGON__EXTERIOR_RING, null, msgs);
+ if (newExteriorRing != null)
+ msgs = ((InternalEObject)newExteriorRing).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GeoJsonPackage.POLYGON__EXTERIOR_RING, null, msgs);
+ msgs = basicSetExteriorRing(newExteriorRing, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GeoJsonPackage.POLYGON__EXTERIOR_RING, newExteriorRing, newExteriorRing));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getInteriorHoles() {
+ if (interiorHoles == null) {
+ interiorHoles = new EObjectContainmentEList(Hole.class, this, GeoJsonPackage.POLYGON__INTERIOR_HOLES);
+ }
+ return interiorHoles;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.POLYGON__EXTERIOR_RING:
+ return basicSetExteriorRing(null, msgs);
+ case GeoJsonPackage.POLYGON__INTERIOR_HOLES:
+ return ((InternalEList>)getInteriorHoles()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.POLYGON__DATA:
+ return getData();
+ case GeoJsonPackage.POLYGON__EXTERIOR_RING:
+ return getExteriorRing();
+ case GeoJsonPackage.POLYGON__INTERIOR_HOLES:
+ return getInteriorHoles();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.POLYGON__DATA:
+ setData((double[][][])newValue);
+ return;
+ case GeoJsonPackage.POLYGON__EXTERIOR_RING:
+ setExteriorRing((Ring)newValue);
+ return;
+ case GeoJsonPackage.POLYGON__INTERIOR_HOLES:
+ getInteriorHoles().clear();
+ getInteriorHoles().addAll((Collection extends Hole>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.POLYGON__DATA:
+ setData(DATA_EDEFAULT);
+ return;
+ case GeoJsonPackage.POLYGON__EXTERIOR_RING:
+ setExteriorRing((Ring)null);
+ return;
+ case GeoJsonPackage.POLYGON__INTERIOR_HOLES:
+ getInteriorHoles().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.POLYGON__DATA:
+ return DATA_EDEFAULT == null ? getData() != null : !DATA_EDEFAULT.equals(getData());
+ case GeoJsonPackage.POLYGON__EXTERIOR_RING:
+ return exteriorRing != null;
+ case GeoJsonPackage.POLYGON__INTERIOR_HOLES:
+ return interiorHoles != null && !interiorHoles.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
+ if (baseClass == SimplePolygon.class) {
+ switch (derivedFeatureID) {
+ case GeoJsonPackage.POLYGON__DATA: return GeoJsonPackage.SIMPLE_POLYGON__DATA;
+ case GeoJsonPackage.POLYGON__EXTERIOR_RING: return GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING;
+ case GeoJsonPackage.POLYGON__INTERIOR_HOLES: return GeoJsonPackage.SIMPLE_POLYGON__INTERIOR_HOLES;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
+ if (baseClass == SimplePolygon.class) {
+ switch (baseFeatureID) {
+ case GeoJsonPackage.SIMPLE_POLYGON__DATA: return GeoJsonPackage.POLYGON__DATA;
+ case GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING: return GeoJsonPackage.POLYGON__EXTERIOR_RING;
+ case GeoJsonPackage.SIMPLE_POLYGON__INTERIOR_HOLES: return GeoJsonPackage.POLYGON__INTERIOR_HOLES;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+} //PolygonImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/PropertiesEntryImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/PropertiesEntryImpl.java
new file mode 100644
index 00000000..b1a16cc7
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/PropertiesEntryImpl.java
@@ -0,0 +1,304 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.BasicEMap;
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+
+/**
+ *
+ * An implementation of the model object 'Properties Entry'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.PropertiesEntryImpl#getTypedKey Key}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.PropertiesEntryImpl#getTypedValue Value}
+ *
+ *
+ * @generated
+ */
+public class PropertiesEntryImpl extends MinimalEObjectImpl.Container implements BasicEMap.Entry {
+ /**
+ * The default value of the '{@link #getTypedKey() Key}' attribute.
+ *
+ *
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected static final String KEY_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTypedKey() Key}' attribute.
+ *
+ *
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected String key = KEY_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getTypedValue() Value}' attribute.
+ *
+ *
+ * @see #getTypedValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Object VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTypedValue() Value}' attribute.
+ *
+ *
+ * @see #getTypedValue()
+ * @generated
+ * @ordered
+ */
+ protected Object value = VALUE_EDEFAULT;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public PropertiesEntryImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.PROPERTIES_ENTRY;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public String getTypedKey() {
+ return key;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setTypedKey(String newKey) {
+ String oldKey = key;
+ key = newKey;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GeoJsonPackage.PROPERTIES_ENTRY__KEY, oldKey, key));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public Object getTypedValue() {
+ return value;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setTypedValue(Object newValue) {
+ Object oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GeoJsonPackage.PROPERTIES_ENTRY__VALUE, oldValue, value));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.PROPERTIES_ENTRY__KEY:
+ return getTypedKey();
+ case GeoJsonPackage.PROPERTIES_ENTRY__VALUE:
+ return getTypedValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.PROPERTIES_ENTRY__KEY:
+ setTypedKey((String)newValue);
+ return;
+ case GeoJsonPackage.PROPERTIES_ENTRY__VALUE:
+ setTypedValue(newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.PROPERTIES_ENTRY__KEY:
+ setTypedKey(KEY_EDEFAULT);
+ return;
+ case GeoJsonPackage.PROPERTIES_ENTRY__VALUE:
+ setTypedValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.PROPERTIES_ENTRY__KEY:
+ return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
+ case GeoJsonPackage.PROPERTIES_ENTRY__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuilder result = new StringBuilder(super.toString());
+ result.append(" (key: ");
+ result.append(key);
+ result.append(", value: ");
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected int hash = -1;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int getHash() {
+ if (hash == -1) {
+ Object theKey = getKey();
+ hash = (theKey == null ? 0 : theKey.hashCode());
+ }
+ return hash;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setHash(int hash) {
+ this.hash = hash;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String getKey() {
+ return getTypedKey();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setKey(String key) {
+ setTypedKey(key);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object getValue() {
+ return getTypedValue();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object setValue(Object value) {
+ Object oldValue = getValue();
+ setTypedValue(value);
+ return oldValue;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EMap getEMap() {
+ EObject container = eContainer();
+ return container == null ? null : (EMap)container.eGet(eContainmentFeature());
+ }
+
+} //PropertiesEntryImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/RingImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/RingImpl.java
new file mode 100644
index 00000000..369419cf
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/RingImpl.java
@@ -0,0 +1,153 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sensinact.gateway.core.geojson.Coordinates;
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.Ring;
+
+/**
+ *
+ * An implementation of the model object 'Ring'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.RingImpl#getCoordinates Coordinates}
+ *
+ *
+ * @generated
+ */
+public class RingImpl extends MinimalEObjectImpl.Container implements Ring {
+ /**
+ * The cached value of the '{@link #getCoordinates() Coordinates}' containment reference list.
+ *
+ *
+ * @see #getCoordinates()
+ * @generated
+ * @ordered
+ */
+ protected EList coordinates;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public RingImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.RING;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getCoordinates() {
+ if (coordinates == null) {
+ coordinates = new EObjectContainmentEList(Coordinates.class, this, GeoJsonPackage.RING__COORDINATES);
+ }
+ return coordinates;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.RING__COORDINATES:
+ return ((InternalEList>)getCoordinates()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.RING__COORDINATES:
+ return getCoordinates();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.RING__COORDINATES:
+ getCoordinates().clear();
+ getCoordinates().addAll((Collection extends Coordinates>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.RING__COORDINATES:
+ getCoordinates().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.RING__COORDINATES:
+ return coordinates != null && !coordinates.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //RingImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/SimpleLineStringImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/SimpleLineStringImpl.java
new file mode 100644
index 00000000..f8586260
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/SimpleLineStringImpl.java
@@ -0,0 +1,174 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sensinact.gateway.core.geojson.Coordinates;
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.SimpleLineString;
+
+/**
+ *
+ * An implementation of the model object 'Simple Line String'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.SimpleLineStringImpl#getData Data}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.SimpleLineStringImpl#getCoordinates Coordinates}
+ *
+ *
+ * @generated
+ */
+public class SimpleLineStringImpl extends MinimalEObjectImpl.Container implements SimpleLineString {
+ /**
+ * The cached value of the '{@link #getCoordinates() Coordinates}' containment reference list.
+ *
+ *
+ * @see #getCoordinates()
+ * @generated
+ * @ordered
+ */
+ protected EList coordinates;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public SimpleLineStringImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.SIMPLE_LINE_STRING;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EList getData() {
+ return new org.eclipse.sensinact.gateway.core.geojson.util.GenericConvertingList(getCoordinates(), org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::toCoordinates, org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper::convertCoordinates);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getCoordinates() {
+ if (coordinates == null) {
+ coordinates = new EObjectContainmentEList(Coordinates.class, this, GeoJsonPackage.SIMPLE_LINE_STRING__COORDINATES);
+ }
+ return coordinates;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_LINE_STRING__COORDINATES:
+ return ((InternalEList>)getCoordinates()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_LINE_STRING__DATA:
+ return getData();
+ case GeoJsonPackage.SIMPLE_LINE_STRING__COORDINATES:
+ return getCoordinates();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_LINE_STRING__DATA:
+ getData().clear();
+ getData().addAll((Collection extends double[]>)newValue);
+ return;
+ case GeoJsonPackage.SIMPLE_LINE_STRING__COORDINATES:
+ getCoordinates().clear();
+ getCoordinates().addAll((Collection extends Coordinates>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_LINE_STRING__DATA:
+ getData().clear();
+ return;
+ case GeoJsonPackage.SIMPLE_LINE_STRING__COORDINATES:
+ getCoordinates().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_LINE_STRING__DATA:
+ return !getData().isEmpty();
+ case GeoJsonPackage.SIMPLE_LINE_STRING__COORDINATES:
+ return coordinates != null && !coordinates.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //SimpleLineStringImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/SimplePolygonImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/SimplePolygonImpl.java
new file mode 100644
index 00000000..e308470c
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/SimplePolygonImpl.java
@@ -0,0 +1,276 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+import org.eclipse.sensinact.gateway.core.geojson.Hole;
+import org.eclipse.sensinact.gateway.core.geojson.Ring;
+import org.eclipse.sensinact.gateway.core.geojson.SimplePolygon;
+
+/**
+ *
+ * An implementation of the model object 'Simple Polygon'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.SimplePolygonImpl#getData Data}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.SimplePolygonImpl#getExteriorRing Exterior Ring}
+ * - {@link org.eclipse.sensinact.gateway.core.geojson.impl.SimplePolygonImpl#getInteriorHoles Interior Holes}
+ *
+ *
+ * @generated
+ */
+public class SimplePolygonImpl extends MinimalEObjectImpl.Container implements SimplePolygon {
+ /**
+ * The default value of the '{@link #getData() Data}' attribute.
+ *
+ *
+ * @see #getData()
+ * @generated
+ * @ordered
+ */
+ protected static final double[][][] DATA_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getExteriorRing() Exterior Ring}' containment reference.
+ *
+ *
+ * @see #getExteriorRing()
+ * @generated
+ * @ordered
+ */
+ protected Ring exteriorRing;
+
+ /**
+ * The cached value of the '{@link #getInteriorHoles() Interior Holes}' containment reference list.
+ *
+ *
+ * @see #getInteriorHoles()
+ * @generated
+ * @ordered
+ */
+ protected EList interiorHoles;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public SimplePolygonImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GeoJsonPackage.Literals.SIMPLE_POLYGON;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public double[][][] getData() {
+ double[][][] result = new double[1 + getInteriorHoles().size()][][];
+ result[0] = org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.convertRing(getExteriorRing());
+ for (int i = 0; i < getInteriorHoles().size(); i++) {
+ Hole hole = getInteriorHoles().get(i);
+ result[i +1 ] = org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.convertRing(hole);
+ }
+ return result;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setData(double[][][] data) {
+ for (int i = 0; i < data.length; i++) {
+ double[][] d = data[i];
+ if(i == 0) {
+ setExteriorRing(org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.toRing(d));
+ } else {
+ getInteriorHoles().add(org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonHelper.toHole(d));
+ }
+ }
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Ring getExteriorRing() {
+ return exteriorRing;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public NotificationChain basicSetExteriorRing(Ring newExteriorRing, NotificationChain msgs) {
+ Ring oldExteriorRing = exteriorRing;
+ exteriorRing = newExteriorRing;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING, oldExteriorRing, newExteriorRing);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setExteriorRing(Ring newExteriorRing) {
+ if (newExteriorRing != exteriorRing) {
+ NotificationChain msgs = null;
+ if (exteriorRing != null)
+ msgs = ((InternalEObject)exteriorRing).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING, null, msgs);
+ if (newExteriorRing != null)
+ msgs = ((InternalEObject)newExteriorRing).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING, null, msgs);
+ msgs = basicSetExteriorRing(newExteriorRing, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING, newExteriorRing, newExteriorRing));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getInteriorHoles() {
+ if (interiorHoles == null) {
+ interiorHoles = new EObjectContainmentEList(Hole.class, this, GeoJsonPackage.SIMPLE_POLYGON__INTERIOR_HOLES);
+ }
+ return interiorHoles;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING:
+ return basicSetExteriorRing(null, msgs);
+ case GeoJsonPackage.SIMPLE_POLYGON__INTERIOR_HOLES:
+ return ((InternalEList>)getInteriorHoles()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_POLYGON__DATA:
+ return getData();
+ case GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING:
+ return getExteriorRing();
+ case GeoJsonPackage.SIMPLE_POLYGON__INTERIOR_HOLES:
+ return getInteriorHoles();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_POLYGON__DATA:
+ setData((double[][][])newValue);
+ return;
+ case GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING:
+ setExteriorRing((Ring)newValue);
+ return;
+ case GeoJsonPackage.SIMPLE_POLYGON__INTERIOR_HOLES:
+ getInteriorHoles().clear();
+ getInteriorHoles().addAll((Collection extends Hole>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_POLYGON__DATA:
+ setData(DATA_EDEFAULT);
+ return;
+ case GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING:
+ setExteriorRing((Ring)null);
+ return;
+ case GeoJsonPackage.SIMPLE_POLYGON__INTERIOR_HOLES:
+ getInteriorHoles().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GeoJsonPackage.SIMPLE_POLYGON__DATA:
+ return DATA_EDEFAULT == null ? getData() != null : !DATA_EDEFAULT.equals(getData());
+ case GeoJsonPackage.SIMPLE_POLYGON__EXTERIOR_RING:
+ return exteriorRing != null;
+ case GeoJsonPackage.SIMPLE_POLYGON__INTERIOR_HOLES:
+ return interiorHoles != null && !interiorHoles.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //SimplePolygonImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/package-info.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/package-info.java
new file mode 100644
index 00000000..c5a39d84
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/impl/package-info.java
@@ -0,0 +1,5 @@
+/*
+ */
+@org.osgi.annotation.bundle.Export
+@org.osgi.annotation.versioning.Version("1.0")
+package org.eclipse.sensinact.gateway.core.geojson.impl;
\ No newline at end of file
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/package-info.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/package-info.java
new file mode 100644
index 00000000..13884fcd
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src-gen/org/eclipse/sensinact/gateway/core/geojson/package-info.java
@@ -0,0 +1,5 @@
+/*
+ */
+@org.osgi.annotation.bundle.Export
+@org.osgi.annotation.versioning.Version("1.0")
+package org.eclipse.sensinact.gateway.core.geojson;
\ No newline at end of file
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GenericConvertingList.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GenericConvertingList.java
new file mode 100644
index 00000000..40e62b2c
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GenericConvertingList.java
@@ -0,0 +1,169 @@
+/**
+ * Copyright (c) 2012 - 2024 Data In Motion and others.
+ * All rights reserved.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Data In Motion - initial API and implementation
+ */
+package org.eclipse.sensinact.gateway.core.geojson.util;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+import org.eclipse.emf.common.util.AbstractEList;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ *
+ * @author Juergen Albert
+ * @since 29 Nov 2024
+ */
+public class GenericConvertingList extends AbstractEList{
+
+
+ private EList backingList;
+ private Function tToE;
+ private Function eToT;
+
+ /**
+ * Creates a new instance.
+ */
+ public GenericConvertingList(EList backingList, Function tToE, Function eToT) {
+ this.backingList = backingList;
+ this.tToE = tToE;
+ this.eToT = eToT;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see java.util.List#size()
+ */
+ @Override
+ public int size() {
+ return backingList.size();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#primitiveGet(int)
+ */
+ @Override
+ protected T primitiveGet(int index) {
+ return eToT.apply(backingList.get(index));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#setUnique(int, java.lang.Object)
+ */
+ @Override
+ public T setUnique(int index, T object) {
+ E set = backingList.set(index, tToE.apply(object));
+ return set == null ? null : eToT.apply(set);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#addUnique(java.lang.Object)
+ */
+ @Override
+ public void addUnique(T object) {
+ backingList.add(tToE.apply(object));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#addUnique(int, java.lang.Object)
+ */
+ @Override
+ public void addUnique(int index, T object) {
+ backingList.add(index, tToE.apply(object));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#addAllUnique(java.util.Collection)
+ */
+ @Override
+ public boolean addAllUnique(Collection extends T> collection) {
+ Collection convert = collection.stream().map(tToE).collect(Collectors.toList());
+ return backingList.addAll(convert);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#addAllUnique(int, java.util.Collection)
+ */
+ @Override
+ public boolean addAllUnique(int index, Collection extends T> collection) {
+ Collection convert = collection.stream().map(tToE).collect(Collectors.toList());
+ return backingList.addAll(index, convert);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#addAllUnique(java.lang.Object[], int, int)
+ */
+ @Override
+ public boolean addAllUnique(Object[] objects, int start, int end) {
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#addAllUnique(int, java.lang.Object[], int, int)
+ */
+ @Override
+ public boolean addAllUnique(int index, Object[] objects, int start, int end) {
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#remove(int)
+ */
+ @Override
+ public T remove(int index) {
+ E removed = backingList.remove(index);
+ return removed == null ? null : eToT.apply(removed);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#move(int, int)
+ */
+ @Override
+ public T move(int targetIndex, int sourceIndex) {
+ E moved = backingList.move(targetIndex, sourceIndex);
+ return moved == null ? null : eToT.apply(moved);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.common.util.AbstractEList#basicList()
+ */
+ @Override
+ protected List basicList() {
+ return backingList.stream().map(eToT).collect(Collectors.toList());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.util.AbstractList#get(int)
+ */
+ @Override
+ public T get(int index) {
+ E get = backingList.get(index);
+ return get == null ? null : eToT.apply(get);
+ }
+
+}
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GeoJsonHelper.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GeoJsonHelper.java
new file mode 100644
index 00000000..f1a7c8a3
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GeoJsonHelper.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) 2012 - 2024 Data In Motion and others.
+ * All rights reserved.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Data In Motion - initial API and implementation
+ */
+package org.eclipse.sensinact.gateway.core.geojson.util;
+
+import org.eclipse.sensinact.gateway.core.geojson.Coordinates;
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonFactory;
+import org.eclipse.sensinact.gateway.core.geojson.Hole;
+import org.eclipse.sensinact.gateway.core.geojson.Ring;
+import org.eclipse.sensinact.gateway.core.geojson.impl.CoordinatesImpl;
+
+/**
+ *
+ * @author Juergen Albert
+ * @since 29 Nov 2024
+ */
+public class GeoJsonHelper {
+
+ public static double[] convertCoordinates(Coordinates coordinates) {
+ return convertCoordinates(coordinates, false);
+ }
+
+
+ public static double[] convertCoordinates(Coordinates coordinates, boolean ignoreElevation) {
+ if(coordinates == null) {
+ return new double[0];
+ }
+ double[] array = Double.isNaN(coordinates.getElevation()) || ignoreElevation ? new double[] { coordinates.getLongitude(), coordinates.getLatitude()}
+ : new double[] { coordinates.getLongitude(), coordinates.getLatitude(), coordinates.getElevation() };
+ return array;
+ }
+
+ public static Coordinates toCoordinates(double[] data) {
+ if(data == null) {
+ return null;
+ }
+ Coordinates c = new CoordinatesImpl();
+ c.setLongitude(data[0]);
+ c.setLatitude(data[1]);
+ if (data.length >= 3) {
+ c.setElevation(data[2]);
+ }
+ return c;
+ }
+
+ public static double[][] convertRing(Ring ring) {
+ if(ring == null) {
+ return new double[0][0];
+ }
+ boolean ringClosed = checkRingClosed(ring);
+ int size = ringClosed ? ring.getCoordinates().size() : ring.getCoordinates().size() + 1;
+ double[][] result = new double[size][2];
+
+ for (int i = 0; i < ring.getCoordinates().size(); i++) {
+ Coordinates coordinates = ring.getCoordinates().get(i);
+ result[i] = convertCoordinates(coordinates, true);
+ }
+ if(!ringClosed) {
+ Coordinates coordinates = ring.getCoordinates().get(0);
+ result[ring.getCoordinates().size()] = convertCoordinates(coordinates, true);
+ }
+
+ return result;
+ }
+
+ private static boolean checkRingClosed(Ring ring) {
+ Coordinates start = ring.getCoordinates().get(0);
+ Coordinates end = ring.getCoordinates().get(ring.getCoordinates().size() -1 );
+ return start.getLatitude() == end.getLatitude() && start.getLongitude() == end.getLongitude();
+ }
+
+
+ public static Ring toRing(double[][] data) {
+ if(data == null) {
+ return null;
+ }
+ Ring ring = GeoJsonFactory.eINSTANCE.createRing();
+ for (int i = 0; i < data.length; i++) {
+ ring.getCoordinates().add(toCoordinates(data[i]));
+ }
+ return ring;
+ }
+
+ public static Hole toHole(double[][] data) {
+ if(data == null) {
+ return null;
+ }
+ Hole hole = GeoJsonFactory.eINSTANCE.createHole();
+ for (int i = 0; i < data.length; i++) {
+ hole.getCoordinates().add(toCoordinates(data[i]));
+ }
+ return hole;
+ }
+}
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GeoJsonResourceFactoryImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GeoJsonResourceFactoryImpl.java
new file mode 100644
index 00000000..175f8417
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GeoJsonResourceFactoryImpl.java
@@ -0,0 +1,66 @@
+/*
+ */
+package org.eclipse.sensinact.gateway.core.geojson.util;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+import org.eclipse.sensinact.gateway.core.geojson.GeoJsonPackage;
+
+import org.gecko.emf.osgi.constants.EMFNamespaces;
+import org.osgi.service.component.annotations.Component;
+
+/**
+ *
+ * The Resource Factory associated with the package.
+ *
+ * @see org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonResourceImpl
+ * @generated
+ */
+@Component(property = {
+ EMFNamespaces.EMF_CONFIGURATOR_NAME + "=" + GeoJsonPackage.eNAME,
+ EMFNamespaces.EMF_MODEL_FILE_EXT + "=" + "geojson",
+ EMFNamespaces.EMF_MODEL_VERSION + "=" + "1.0"
+})
+public class GeoJsonResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ *
+ *
+ * @generated
+ */
+ public GeoJsonResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new GeoJsonResourceImpl(uri);
+ return result;
+ }
+
+ /**
+ * A method providing the Properties the services around this ResourceFactory should be registered with.
+ * @generated
+ */
+ public Map getServiceProperties() {
+ Map properties = new HashMap();
+ properties.put(EMFNamespaces.EMF_CONFIGURATOR_NAME, GeoJsonPackage.eNAME);
+ properties.put(EMFNamespaces.EMF_MODEL_FILE_EXT, "geojson");
+ properties.put(EMFNamespaces.EMF_MODEL_VERSION, "1.0");
+ return properties;
+ }
+
+} //GeoJsonResourceFactoryImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GeoJsonResourceImpl.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GeoJsonResourceImpl.java
new file mode 100644
index 00000000..4974f853
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/GeoJsonResourceImpl.java
@@ -0,0 +1,40 @@
+/**
+ */
+package org.eclipse.sensinact.gateway.core.geojson.util;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emfcloud.jackson.annotations.EcoreTypeInfo;
+import org.gecko.emf.json.configuration.ConfigurableJsonResource;
+import org.gecko.emf.json.constants.EMFJs;
+
+/**
+ *
+ * The Resource associated with the package.
+ *
+ * @see org.eclipse.sensinact.gateway.core.geojson.util.GeoJsonResourceFactoryImpl
+ * @generated
+ */
+public class GeoJsonResourceImpl extends ConfigurableJsonResource {
+
+ private static Map GEOJSON_DEFAULT_OPTIONS = new HashMap<>();
+ static {
+ GEOJSON_DEFAULT_OPTIONS.put(EMFJs.OPTION_SERIALIZE_DEFAULT_VALUE, true);
+ GEOJSON_DEFAULT_OPTIONS.put(EMFJs.OPTION_TYPE_FIELD, "type");
+ GEOJSON_DEFAULT_OPTIONS.put(EMFJs.OPTION_TYPE_USE, EcoreTypeInfo.USE.NAME);
+ }
+
+ /**
+ * Creates an instance of the resource.
+ *
+ *
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public GeoJsonResourceImpl(URI uri) {
+ super(uri, new ConfigurableJsonResource(uri).configureMapper(GEOJSON_DEFAULT_OPTIONS));
+ }
+
+} //GeoJsonResourceImpl
diff --git a/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/package-info.java b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/package-info.java
new file mode 100644
index 00000000..2d26085e
--- /dev/null
+++ b/backend/org.eclipse.sensinact.gateway.core.geo-json.model/src/org/eclipse/sensinact/gateway/core/geojson/util/package-info.java
@@ -0,0 +1,5 @@
+/*
+ */
+@org.osgi.annotation.bundle.Export
+@org.osgi.annotation.versioning.Version("1.0")
+package org.eclipse.sensinact.gateway.core.geojson.util;
\ No newline at end of file