From bf8e3598a5851a23a8ca8a43c62d0440ed1e0d64 Mon Sep 17 00:00:00 2001 From: Hylke van der Schaaf Date: Wed, 8 May 2024 17:49:34 +0200 Subject: [PATCH] Added initial model files --- .../plugincoremodelv2/model/Datastream.json | 168 ++++++++++++++++++ .../plugincoremodelv2/model/Feature.json | 119 +++++++++++++ .../plugincoremodelv2/model/FeatureType.json | 79 ++++++++ .../model/HistoricalLocation.json | 69 +++++++ .../plugincoremodelv2/model/Location.json | 119 +++++++++++++ .../plugincoremodelv2/model/Observation.json | 143 +++++++++++++++ .../model/ObservedProperty.json | 109 ++++++++++++ .../plugincoremodelv2/model/Sensor.json | 90 ++++++++++ .../plugincoremodelv2/model/Thing.json | 96 ++++++++++ 9 files changed, 992 insertions(+) create mode 100644 Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Datastream.json create mode 100644 Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Feature.json create mode 100644 Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/FeatureType.json create mode 100644 Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/HistoricalLocation.json create mode 100644 Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Location.json create mode 100644 Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Observation.json create mode 100644 Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/ObservedProperty.json create mode 100644 Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Sensor.json create mode 100644 Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Thing.json diff --git a/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Datastream.json b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Datastream.json new file mode 100644 index 000000000..b57a829de --- /dev/null +++ b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Datastream.json @@ -0,0 +1,168 @@ +{ + "conformance": [], + "simplePropertyTypes": [], + "entityTypes": [ + { + "name": "Datastream", + "plural": "Datastreams", + "adminOnly": false, + "table": "datastreams", + "orderByDflt": [], + "entityProperties": [ + { + "name": "id", + "aliases": [ + "@iot.id" + ], + "type": "Id", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperId", + "field": "id" + } + ], + "annotations": [] + }, + { + "name": "name", + "type": "Edm.String", + "required": true, + "nullable": false, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "name" + } + ], + "annotations": [] + }, + { + "name": "description", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "description" + } + ], + "annotations": [] + }, + { + "name": "resultType", + "type": "Object", + "required": true, + "nullable": false, + "hasCustomProperties": true, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperJson", + "field": "result_type", + "isMap": true + } + ], + "annotations": [] + }, + { + "name": "properties", + "type": "Object", + "hasCustomProperties": true, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperJson", + "field": "properties", + "isMap": true + } + ], + "annotations": [] + }, + { + "name": "observedArea", + "type": "Edm.Geometry", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperGeometry", + "fieldSource": "", + "fieldGeom": "observed_area" + } + ], + "annotations": [] + }, + { + "name": "phenomenonTime", + "type": "TimeInterval", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperTimeInterval", + "fieldStart": "phenomenon_time_start", + "fieldEnd": "phenomenon_time_end" + } + ], + "annotations": [] + }, + { + "name": "resultTime", + "type": "TimeInterval", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperTimeInterval", + "fieldStart": "result_time_start", + "fieldEnd": "result_time_end" + } + ], + "annotations": [] + } + ], + "navigationProperties": [ + { + "name": "Sensor", + "entitySet": false, + "entityType": "Sensor", + "required": true, + "symmetrical": false, + "priority": 0, + "inverse": { + "name": "Datastreams", + "entitySet": true, + "required": false, + "priority": 0, + "annotations": [] + }, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperOneToMany", + "field": "sensor_id", + "otherTable": "sensors", + "otherField": "id" + } + ], + "annotations": [] + }, + { + "name": "Thing", + "entitySet": false, + "entityType": "Thing", + "required": true, + "symmetrical": false, + "priority": 0, + "inverse": { + "name": "Datastreams", + "entitySet": true, + "required": false, + "priority": 0, + "annotations": [] + }, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperOneToMany", + "field": "thing_id", + "otherTable": "things", + "otherField": "id" + } + ], + "annotations": [] + } + ], + "annotations": [] + } + ] +} \ No newline at end of file diff --git a/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Feature.json b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Feature.json new file mode 100644 index 000000000..1fc899c8c --- /dev/null +++ b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Feature.json @@ -0,0 +1,119 @@ +{ + "conformance": [], + "simplePropertyTypes": [], + "entityTypes": [ + { + "name": "Feature", + "plural": "Features", + "adminOnly": false, + "table": "features", + "orderByDflt": [], + "entityProperties": [ + { + "name": "id", + "aliases": [ + "@iot.id" + ], + "type": "Id", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperId", + "field": "id" + } + ], + "annotations": [] + }, + { + "name": "name", + "type": "Edm.String", + "required": true, + "nullable": false, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "name" + } + ], + "annotations": [] + }, + { + "name": "description", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "description" + } + ], + "annotations": [] + }, + { + "name": "encodingType", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "encoding_type" + } + ], + "annotations": [] + }, + { + "name": "feature", + "type": "Geometry", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperGeometry", + "fieldSource": "feature", + "fieldGeom": "geom" + } + ], + "annotations": [] + }, + { + "name": "properties", + "type": "Object", + "hasCustomProperties": true, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperJson", + "field": "properties", + "isMap": true + } + ], + "annotations": [] + } + ], + "navigationProperties": [ + { + "name": "FeatureTypes", + "entitySet": true, + "entityType": "FeatureType", + "required": false, + "symmetrical": false, + "priority": 0, + "inverse": { + "name": "Features", + "entitySet": true, + "required": false, + "priority": 0, + "annotations": [] + }, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperManyToMany", + "field": "id", + "linkTable": "features_feature_types", + "linkOurField": "feature_id", + "linkOtherField": "feature_type_id", + "otherTable": "feature_types", + "otherField": "id" + } + ], + "annotations": [] + } + ], + "annotations": [] + } + ] +} \ No newline at end of file diff --git a/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/FeatureType.json b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/FeatureType.json new file mode 100644 index 000000000..6b2f67e2e --- /dev/null +++ b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/FeatureType.json @@ -0,0 +1,79 @@ +{ + "conformance": [], + "simplePropertyTypes": [], + "entityTypes": [ + { + "name": "FeatureType", + "plural": "FeatureTypes", + "adminOnly": false, + "table": "feature_types", + "orderByDflt": [], + "entityProperties": [ + { + "name": "id", + "aliases": [ + "@iot.id" + ], + "type": "Id", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperId", + "field": "id" + } + ], + "annotations": [] + }, + { + "name": "name", + "type": "Edm.String", + "required": true, + "nullable": false, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "name" + } + ], + "annotations": [] + }, + { + "name": "description", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "description" + } + ], + "annotations": [] + }, + { + "name": "definition", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "definition" + } + ], + "annotations": [] + }, + { + "name": "properties", + "type": "Object", + "hasCustomProperties": true, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperJson", + "field": "properties", + "isMap": true + } + ], + "annotations": [] + } + ], + "navigationProperties": [], + "annotations": [] + } + ] +} \ No newline at end of file diff --git a/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/HistoricalLocation.json b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/HistoricalLocation.json new file mode 100644 index 000000000..5d6b2878a --- /dev/null +++ b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/HistoricalLocation.json @@ -0,0 +1,69 @@ +{ + "conformance": [], + "simplePropertyTypes": [], + "entityTypes": [ + { + "name": "HistoricalLocation", + "plural": "HistoricalLocations", + "adminOnly": false, + "table": "hist_locations", + "orderByDflt": [], + "entityProperties": [ + { + "name": "id", + "aliases": [ + "@iot.id" + ], + "type": "Id", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperId", + "field": "id" + } + ], + "annotations": [] + }, + { + "name": "time", + "type": "Edm.DateTimeOffset", + "required": true, + "nullable": false, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperTimeInstant", + "field": "time" + } + ], + "annotations": [] + } + ], + "navigationProperties": [ + { + "name": "Thing", + "entitySet": false, + "entityType": "Thing", + "required": true, + "symmetrical": false, + "priority": 0, + "inverse": { + "name": "HistoricalLocations", + "entitySet": true, + "required": false, + "priority": 0, + "annotations": [] + }, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperOneToMany", + "field": "thing_id", + "otherTable": "things", + "otherField": "id" + } + ], + "annotations": [] + } + ], + "annotations": [] + } + ] +} \ No newline at end of file diff --git a/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Location.json b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Location.json new file mode 100644 index 000000000..81bc02d2f --- /dev/null +++ b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Location.json @@ -0,0 +1,119 @@ +{ + "conformance": [], + "simplePropertyTypes": [], + "entityTypes": [ + { + "name": "Location", + "plural": "Locations", + "adminOnly": false, + "table": "locations", + "orderByDflt": [], + "entityProperties": [ + { + "name": "id", + "aliases": [ + "@iot.id" + ], + "type": "Id", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperId", + "field": "id" + } + ], + "annotations": [] + }, + { + "name": "name", + "type": "Edm.String", + "required": true, + "nullable": false, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "name" + } + ], + "annotations": [] + }, + { + "name": "description", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "description" + } + ], + "annotations": [] + }, + { + "name": "encodingType", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "encoding_type" + } + ], + "annotations": [] + }, + { + "name": "location", + "type": "Geometry", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperGeometry", + "fieldSource": "location", + "fieldGeom": "geom" + } + ], + "annotations": [] + }, + { + "name": "properties", + "type": "Object", + "hasCustomProperties": true, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperJson", + "field": "properties", + "isMap": true + } + ], + "annotations": [] + } + ], + "navigationProperties": [ + { + "name": "HistoricalLocations", + "entitySet": true, + "entityType": "HistoricalLocation", + "required": false, + "symmetrical": false, + "priority": 0, + "inverse": { + "name": "Locations", + "entitySet": true, + "required": false, + "priority": 0, + "annotations": [] + }, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperManyToMany", + "field": "id", + "linkTable": "locations_hist_locations", + "linkOurField": "location_id", + "linkOtherField": "hist_location_id", + "otherTable": "hist_locations", + "otherField": "id" + } + ], + "annotations": [] + } + ], + "annotations": [] + } + ] +} \ No newline at end of file diff --git a/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Observation.json b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Observation.json new file mode 100644 index 000000000..efc1db5ba --- /dev/null +++ b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Observation.json @@ -0,0 +1,143 @@ +{ + "conformance": [], + "simplePropertyTypes": [], + "entityTypes": [ + { + "name": "Observation", + "plural": "Observations", + "adminOnly": false, + "table": "observations", + "orderByDflt": [], + "entityProperties": [ + { + "name": "id", + "aliases": [ + "@iot.id" + ], + "type": "Id", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperId", + "field": "id" + } + ], + "annotations": [] + }, + { + "name": "phenomenonTime", + "type": "TimeObject", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperTimeInterval", + "fieldStart": "phenomenon_time_start", + "fieldEnd": "phenomenon_time_end" + } + ], + "annotations": [] + }, + { + "name": "resultTime", + "type": "Edm.DateTimeOffset", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperTimeInstant", + "field": "result_time" + } + ], + "annotations": [] + }, + { + "name": "validTime", + "type": "TimeInterval", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperTimeInterval", + "fieldStart": "valid_time_start", + "fieldEnd": "valid_time_end" + } + ], + "annotations": [] + }, + { + "name": "properties", + "type": "Object", + "hasCustomProperties": true, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperJson", + "field": "properties", + "isMap": true + } + ], + "annotations": [] + }, + { + "name": "result", + "type": "Edm.Untyped", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperResult", + "fieldType": "result_type", + "fieldString": "result_string", + "fieldNumber": "result_number", + "fieldJson": "result_json", + "fieldBoolean": "result_boolean" + } + ], + "annotations": [] + } + ], + "navigationProperties": [ + { + "name": "Datastream", + "entitySet": false, + "entityType": "Datastream", + "required": true, + "symmetrical": false, + "priority": 0, + "inverse": { + "name": "Observations", + "entitySet": true, + "required": false, + "priority": 0, + "annotations": [] + }, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperOneToMany", + "field": "datastream_id", + "otherTable": "datastreams", + "otherField": "id" + } + ], + "annotations": [] + }, + { + "name": "proximateFeatureOfInterest", + "entitySet": false, + "entityType": "Feature", + "required": false, + "symmetrical": false, + "priority": 0, + "inverse": { + "name": "Observations", + "entitySet": true, + "required": false, + "priority": 0, + "annotations": [] + }, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperOneToMany", + "field": "feature_id", + "otherTable": "features", + "otherField": "id" + } + ], + "annotations": [] + } + ], + "annotations": [] + } + ] +} \ No newline at end of file diff --git a/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/ObservedProperty.json b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/ObservedProperty.json new file mode 100644 index 000000000..79bf4fdc5 --- /dev/null +++ b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/ObservedProperty.json @@ -0,0 +1,109 @@ +{ + "conformance": [], + "simplePropertyTypes": [], + "entityTypes": [ + { + "name": "ObservedProperty", + "plural": "ObservedProperties", + "adminOnly": false, + "table": "observed_properties", + "orderByDflt": [], + "entityProperties": [ + { + "name": "id", + "aliases": [ + "@iot.id" + ], + "type": "Id", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperId", + "field": "id" + } + ], + "annotations": [] + }, + { + "name": "definition", + "type": "Edm.String", + "required": true, + "nullable": false, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "definition" + } + ], + "annotations": [] + }, + { + "name": "description", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "description" + } + ], + "annotations": [] + }, + { + "name": "name", + "type": "Edm.String", + "required": true, + "nullable": false, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "name" + } + ], + "annotations": [] + }, + { + "name": "properties", + "type": "Object", + "hasCustomProperties": true, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperJson", + "field": "properties", + "isMap": true + } + ], + "annotations": [] + } + ], + "navigationProperties": [ + { + "name": "Datastreams", + "entitySet": true, + "entityType": "Datastream", + "required": false, + "symmetrical": false, + "priority": 0, + "inverse": { + "name": "ObservedProperties", + "entitySet": true, + "required": true, + "priority": 0, + "annotations": [] + }, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperManyToMany", + "field": "id", + "linkTable": "datastreams_observed_properties", + "linkOurField": "observed_property_id", + "linkOtherField": "datastream_id", + "otherTable": "datastreams", + "otherField": "id" + } + ], + "annotations": [] + } + ], + "annotations": [] + } + ] +} \ No newline at end of file diff --git a/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Sensor.json b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Sensor.json new file mode 100644 index 000000000..054e8c1de --- /dev/null +++ b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Sensor.json @@ -0,0 +1,90 @@ +{ + "conformance": [], + "simplePropertyTypes": [], + "entityTypes": [ + { + "name": "Sensor", + "plural": "Sensors", + "adminOnly": false, + "table": "sensors", + "orderByDflt": [], + "entityProperties": [ + { + "name": "id", + "aliases": [ + "@iot.id" + ], + "type": "Id", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperId", + "field": "id" + } + ], + "annotations": [] + }, + { + "name": "name", + "type": "Edm.String", + "required": true, + "nullable": false, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "name" + } + ], + "annotations": [] + }, + { + "name": "description", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "description" + } + ], + "annotations": [] + }, + { + "name": "encodingType", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "encoding_type" + } + ], + "annotations": [] + }, + { + "name": "metadata", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "metadata" + } + ], + "annotations": [] + }, + { + "name": "properties", + "type": "Object", + "hasCustomProperties": true, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperJson", + "field": "properties", + "isMap": true + } + ], + "annotations": [] + } + ], + "navigationProperties": [], + "annotations": [] + } + ] +} \ No newline at end of file diff --git a/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Thing.json b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Thing.json new file mode 100644 index 000000000..957c99d6e --- /dev/null +++ b/Plugins/CoreModelV2/src/main/resources/plugincoremodelv2/model/Thing.json @@ -0,0 +1,96 @@ +{ + "conformance": [], + "simplePropertyTypes": [], + "entityTypes": [ + { + "name": "Thing", + "plural": "Things", + "adminOnly": false, + "table": "things", + "orderByDflt": [], + "entityProperties": [ + { + "name": "id", + "aliases": [ + "@iot.id" + ], + "type": "Id", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperId", + "field": "id" + } + ], + "annotations": [] + }, + { + "name": "name", + "type": "Edm.String", + "required": true, + "nullable": false, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "name" + } + ], + "annotations": [] + }, + { + "name": "description", + "type": "Edm.String", + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperString", + "field": "description" + } + ], + "annotations": [] + }, + { + "name": "properties", + "type": "Object", + "hasCustomProperties": true, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperJson", + "field": "properties", + "isMap": true + } + ], + "annotations": [] + } + ], + "navigationProperties": [ + { + "name": "Locations", + "entitySet": true, + "entityType": "Location", + "required": false, + "symmetrical": false, + "priority": 0, + "inverse": { + "name": "Things", + "entitySet": true, + "required": false, + "priority": 0, + "annotations": [] + }, + "handlers": [ + { + "@class": "de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.utils.fieldmapper.FieldMapperManyToMany", + "field": "id", + "linkTable": "things_locations", + "linkOurField": "thing_id", + "linkOtherField": "location_id", + "otherTable": "locations", + "otherField": "id" + } + ], + "annotations": [] + } + ], + "annotations": [] + } + ] +} \ No newline at end of file