From f4fb87031cb3e8f1763b1e46340a024ba4c693e8 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Tue, 18 Jun 2024 13:14:57 +0200 Subject: [PATCH 01/19] Create geometric.json based on optical.json --- schemas/geometric.json | 79 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 schemas/geometric.json diff --git a/schemas/geometric.json b/schemas/geometric.json new file mode 100644 index 00000000..b70950e0 --- /dev/null +++ b/schemas/geometric.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://www.buildingenvelopedata.org/schemas/v1/geometric.json", + "title": "geometric data", + "description": "Geometric data sets of building envelope components with meta information like name, description, warnings, and more.", + "$defs": { + "geometric": { + "type": "object", + "properties": { + "id": { + "title": "Decentral identifier", + "description": "Together with timestamp uniquely identifies data and version.", + "$ref": "identifier.json#/$defs/decentral" + }, + "timestamp": { + "title": "Timestamp that designates the version", + "description": "Together with decentral identifier uniquely identifies data and version. For example, correction of some grammatical error in the description results in a new version designated by a new timestamp, or adding an approval by some stakeholder.", + "$ref": "common.json#/$defs/timestamp" + }, + "name": { + "title": "Name", + "type": "string" + }, + "description": { + "title": "Description for humans", + "type": "string" + }, + "warnings": { + "title": "Warnings", + "description": "Critical information to avoid mistakes due to data misinterpretation.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "creator": { + "title": "Creator", + "$ref": "stakeholder.json" + }, + "createdAt": { + "title": "Creation timestamp", + "description": "When the present data set was created, for example, after completion of a measurement, simulation, or calculation.", + "$ref": "common.json#/$defs/timestamp" + }, + "appliedMethod": { + "$ref": "method.json#/$defs/appliedMethod", + "description": "Method that was applied to create this data set." + }, + "approvals": { + "$ref": "common.json#/$defs/approvals", + "description": "Approvals by stakeholders in the form of GnuPG signatures." + }, + "data": { + "title": "Data in various formats", + "description": "The first data item is the result of applying the method `appliedMethod`. The other data items are the result of applying some conversion method or a chain of such methods to the first data item.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "geometricData.json", + "description": "The measured or simulated data in JSON." + }, + { + "$ref": "common.json#/$defs/getHttpsResource", + "description": "The measured or simulated data in some data format as HTTP resource fetchable with GET requests." + } + ] + }, + "minItems": 1 + } + }, + "additionalProperties": false, + "minProperties": 1, + "required": [] + } + }, + "$ref": "#/$defs/geometric" +} \ No newline at end of file From a3c9a0e82649e415c03bf6bed0fd5e30549f4e89 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Tue, 18 Jun 2024 13:51:25 +0200 Subject: [PATCH 02/19] Differ in the title of the schemas between metadata about data sets and the data itself --- schemas/calorimetric.json | 4 +- schemas/hygrothermal.json | 4 +- schemas/optical.json | 4 +- schemas/opticalData.json | 110 +++++++++++++++++++------ schemas/photovoltaic.json | 4 +- schemas/photovoltaicData.json | 148 +++++++++++++++++++++++++++------- 6 files changed, 212 insertions(+), 62 deletions(-) diff --git a/schemas/calorimetric.json b/schemas/calorimetric.json index a8b3850e..96de9c0a 100644 --- a/schemas/calorimetric.json +++ b/schemas/calorimetric.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://www.buildingenvelopedata.org/schemas/v1/calorimetric.json", - "title": "calorimetric data", + "title": "metadata about calorimetric data sets", "description": "Data about calorimetric measurements or simulations with meta information like name, description, warnings, and more.", "$defs": { "calorimetric": { @@ -77,4 +77,4 @@ } }, "$ref": "#/$defs/calorimetric" -} +} \ No newline at end of file diff --git a/schemas/hygrothermal.json b/schemas/hygrothermal.json index d28f6e1e..4cb4ae48 100644 --- a/schemas/hygrothermal.json +++ b/schemas/hygrothermal.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://www.buildingenvelopedata.org/schemas/v1/hygrothermal.json", - "title": "hygrothermal data", + "title": "metadata about hygrothermal data sets", "description": "Hygrothermal data with meta information like name, description, warnings, and more.", "$defs": { "hygrothermal": { @@ -76,4 +76,4 @@ } }, "$ref": "#/$defs/hygrothermal" -} +} \ No newline at end of file diff --git a/schemas/optical.json b/schemas/optical.json index cba412b6..57eb0aa5 100644 --- a/schemas/optical.json +++ b/schemas/optical.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://www.buildingenvelopedata.org/schemas/v1/optical.json", - "title": "optical data", + "title": "metadata about optical data sets", "description": "Optical data sets of building envelope components with meta information like name, description, warnings, and more.", "$defs": { "optical": { @@ -76,4 +76,4 @@ } }, "$ref": "#/$defs/optical" -} +} \ No newline at end of file diff --git a/schemas/opticalData.json b/schemas/opticalData.json index 4ec2d876..c1dba0b2 100644 --- a/schemas/opticalData.json +++ b/schemas/opticalData.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://www.buildingenvelopedata.org/schemas/v1/opticalData.json", - "title": "Optical data", + "title": "optical data", "description": "Optical data sets of building envelope components. It shall be possible to exchange the results of all important optical measurements and simulations. At the same time, this general format is intended to limit the number of possible representations of one data set to make it easy to develop software which interprets the data correctly.", "$defs": { "data": { @@ -25,7 +25,9 @@ } }, "additionalProperties": false, - "required": ["dataPoints"] + "required": [ + "dataPoints" + ] }, { "title": "Internal data node with non-leaf children", @@ -46,7 +48,9 @@ } }, "additionalProperties": false, - "required": ["data"] + "required": [ + "data" + ] } ] }, @@ -79,7 +83,11 @@ } }, "additionalProperties": false, - "required": ["incidence", "emergence", "results"] + "required": [ + "incidence", + "emergence", + "results" + ] }, { "title": "Color characterization", @@ -115,7 +123,12 @@ }, "normalization": { "type": "string", - "enum": ["absolute", "relative", "specular", "diffuseReflectance"], + "enum": [ + "absolute", + "relative", + "specular", + "diffuseReflectance" + ], "title": "Normalization", "description": "Normalization methods absolute, relative, specular, and diffuse reflectance as standardized in [ASTM E2387-05(2011), Standard Practice for Goniometric Optical Scatter Measurements, ASTM International, West Conshohocken, PA, 2011, www.astm.org](https://www.astm.org/DATABASE.CART/HISTORICAL/E2387-05R11.htm)." }, @@ -173,14 +186,19 @@ } }, "additionalProperties": false, - "required": ["s", "p"] + "required": [ + "s", + "p" + ] }, { "title": "Circular polarization", "description": "`leftHanded` means that the radiation is circularly polarized and rotates in a left-hand sense with respect to the direction of radiation. `rightHanded` means that the radiation is circularly polarized and rotates in a right-hand sense with respect to the direction of radiation.", - "type": "string", - "enum": ["leftHanded", "rightHanded"] + "enum": [ + "leftHanded", + "rightHanded" + ] } ] }, @@ -210,12 +228,20 @@ "properties": { "integral": { "type": "string", - "enum": ["infrared", "solar", "ultraviolet", "visible", "other"], + "enum": [ + "infrared", + "solar", + "ultraviolet", + "visible", + "other" + ], "description": "Spectrum over which the integral result was measured or calculated. `ultraviolet`, `visible`, `solar` and `infrared` indicate the range of the wavelengths used for the integral values. Details about the spectrum are provided by the method which has been applied to generate the data set. If neither `ultraviolet`, `visible`, `solar` and `infrared` describe the spectrum correctly, `other` indicates that all information about the spectrum is provided by the applied method." } }, "additionalProperties": false, - "required": ["integral"] + "required": [ + "integral" + ] }, "transmittance": { "$ref": "number.json#/$defs/numberWithUncertainty", @@ -247,7 +273,9 @@ } }, "additionalProperties": false, - "required": ["polar"] + "required": [ + "polar" + ] }, { "title": "Hemispherical", @@ -275,13 +303,18 @@ } }, "additionalProperties": false, - "required": ["polar"] + "required": [ + "polar" + ] }, { "title": "Diffuse or hemispherical", "description": "(i) Diffuse means all directions with an emergence angle greater than 10°. (ii) Hemispherical means all directions to the hemisphere above the sample surface. Both are used when the emergence in many directions is treated as a sum.", "type": "string", - "enum": ["diffuse", "hemispherical"] + "enum": [ + "diffuse", + "hemispherical" + ] } ] }, @@ -293,10 +326,14 @@ "$ref": "number.json#/$defs/nanometer", "description": "One wavelength in nanometers. If necessary, its uncertainty can be specified with `uncertainty`." }, - "uncertainty": { "$ref": "#/$defs/wavelengthUncertainty" } + "uncertainty": { + "$ref": "#/$defs/wavelengthUncertainty" + } }, "additionalProperties": false, - "required": ["wavelength"] + "required": [ + "wavelength" + ] }, "wavelengths": { "title": "Wavelengths of radiation", @@ -328,7 +365,10 @@ } }, "additionalProperties": false, - "required": ["direction", "wavelengths"] + "required": [ + "direction", + "wavelengths" + ] }, "emergence": { "title": "Emergent radiation", @@ -340,7 +380,9 @@ } }, "additionalProperties": false, - "required": ["direction"] + "required": [ + "direction" + ] }, "results": { "title": "Measurement or simulation results", @@ -407,7 +449,10 @@ }, "direction": { "type": "string", - "enum": ["reflection", "transmission"], + "enum": [ + "reflection", + "transmission" + ], "description": "`reflection` indicates that that the color is defined which is reflected by the component. `transmission` indicates that the color is defined which is transmitted through the component." }, "surface": { @@ -416,17 +461,28 @@ }, "observer": { "type": "string", - "enum": ["twoDegrees", "tenDegrees"], + "enum": [ + "twoDegrees", + "tenDegrees" + ], "description": "`twoDegrees` equals the CIE 1931 standard colorimetric observer. `tenDegrees` equals the CIE 1964 standard colorimetric observer. The observers differ in the solid angle which they consider." }, "illuminant": { "type": "string", - "enum": ["A", "D65"], + "enum": [ + "A", + "D65" + ], "description": "The illuminant which is used to determine the color coordinates. `A` equals the CIE standard illuminant A. `D65` equals the CIE standard illuminant D65." } }, "additionalProperties": false, - "required": ["lStar", "aStar", "bStar", "direction"] + "required": [ + "lStar", + "aStar", + "bStar", + "direction" + ] }, "colorRenderingIndex": { "title": "The Color Rendering Index (CRI) indicates how well the transmitted or reflected radiation matches daylight regarding the rendering of colors.", @@ -438,7 +494,10 @@ }, "direction": { "type": "string", - "enum": ["reflection", "transmission"], + "enum": [ + "reflection", + "transmission" + ], "description": "`reflection` indicates that that the Color Rendering Index is defined for radiation which is reflected by the component. `transmission` indicates that the Color Rendering Index is defined for radiation which is transmitted through the component." }, "surface": { @@ -447,8 +506,11 @@ } }, "additionalProperties": false, - "required": ["value", "direction"] + "required": [ + "value", + "direction" + ] } }, "$ref": "#/$defs/data" -} +} \ No newline at end of file diff --git a/schemas/photovoltaic.json b/schemas/photovoltaic.json index 9ecc2727..5b27af99 100644 --- a/schemas/photovoltaic.json +++ b/schemas/photovoltaic.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://www.buildingenvelopedata.org/schemas/v1/photovoltaic.json", - "title": "photovoltaic data", + "title": "metadata about photovoltaic data sets", "description": "Data about components of building envelopes which contribute to convert irradiance into electricity with meta information like name, description, warnings, and more.", "$defs": { "photovoltaic": { @@ -76,4 +76,4 @@ } }, "$ref": "#/$defs/photovoltaic" -} +} \ No newline at end of file diff --git a/schemas/photovoltaicData.json b/schemas/photovoltaicData.json index 9dba1540..b9001253 100644 --- a/schemas/photovoltaicData.json +++ b/schemas/photovoltaicData.json @@ -15,7 +15,9 @@ } }, "additionalProperties": false, - "required": ["module"] + "required": [ + "module" + ] }, { "type": "object", @@ -26,7 +28,9 @@ } }, "additionalProperties": false, - "required": ["inverter"] + "required": [ + "inverter" + ] }, { "type": "object", @@ -37,7 +41,9 @@ } }, "additionalProperties": false, - "required": ["system"] + "required": [ + "system" + ] } ] }, @@ -131,7 +137,9 @@ } }, "additionalProperties": false, - "required": ["id"] + "required": [ + "id" + ] }, "minItems": 1 }, @@ -156,7 +164,9 @@ } }, "additionalProperties": false, - "required": ["cellNumber"] + "required": [ + "cellNumber" + ] }, "transversal": { "title": "'transversal' is the direction with the smaller number of cells.", @@ -172,11 +182,16 @@ } }, "additionalProperties": false, - "required": ["cellNumber"] + "required": [ + "cellNumber" + ] } }, "additionalProperties": false, - "required": ["longitudinal", "transversal"] + "required": [ + "longitudinal", + "transversal" + ] } }, "additionalProperties": false, @@ -199,7 +214,10 @@ } }, "additionalProperties": false, - "required": ["id", "cellType"] + "required": [ + "id", + "cellType" + ] }, "minItems": 1 }, @@ -240,7 +258,10 @@ } }, "additionalProperties": false, - "required": ["id", "diodeType"] + "required": [ + "id", + "diodeType" + ] }, "minItems": 0 }, @@ -385,7 +406,9 @@ } }, "additionalProperties": false, - "required": ["id"] + "required": [ + "id" + ] }, "minItems": 1 }, @@ -449,7 +472,10 @@ } }, "additionalProperties": false, - "required": ["years", "percentage"] + "required": [ + "years", + "percentage" + ] }, "minItems": 1 }, @@ -492,7 +518,10 @@ } }, "additionalProperties": false, - "required": ["direction", "modifier"] + "required": [ + "direction", + "modifier" + ] } } ] @@ -601,12 +630,20 @@ }, "smoke": { "type": "string", - "enum": ["s1", "s2", "s3"], + "enum": [ + "s1", + "s2", + "s3" + ], "description": "Abbreviations for smoke according to EN 13501-1." }, "drops": { "type": "string", - "enum": ["d0", "d1", "d2"], + "enum": [ + "d0", + "d1", + "d2" + ], "description": "Abbreviations for burning drops according to EN 13501-1." } }, @@ -666,7 +703,9 @@ }, "additionalProperties": false, "minProperties": 2, - "required": ["reference"] + "required": [ + "reference" + ] }, "minItems": 1 }, @@ -690,7 +729,9 @@ } }, "additionalProperties": false, - "required": ["reference"] + "required": [ + "reference" + ] }, "minItems": 1 }, @@ -743,7 +784,9 @@ } }, "additionalProperties": false, - "required": ["years"] + "required": [ + "years" + ] }, "minItems": 1 }, @@ -935,7 +978,10 @@ "type": "array", "items": { "type": "string", - "enum": ["EN IEC 60529", "ISO 20653"], + "enum": [ + "EN IEC 60529", + "ISO 20653" + ], "description": "`EN IEC 60529` and `ISO 20653` indicate the standard according to which the IP code is defined." }, "uniqueItems": true, @@ -980,17 +1026,31 @@ }, "thirdDigit": { "type": "string", - "enum": ["A", "B", "C", "D"], + "enum": [ + "A", + "B", + "C", + "D" + ], "description": "The third digit is optional and represents the access to dangerous active parts." }, "fourthDigit": { "type": "string", - "enum": ["f", "H", "M", "S", "W"], + "enum": [ + "f", + "H", + "M", + "S", + "W" + ], "description": "The fourth digit can include additional information." } }, "additionalProperties": false, - "required": ["firstDigit", "secondDigit"] + "required": [ + "firstDigit", + "secondDigit" + ] }, "minItems": 1 }, @@ -1007,12 +1067,21 @@ }, "class": { "type": "string", - "enum": ["0", "I", "0I", "II", "III"], + "enum": [ + "0", + "I", + "0I", + "II", + "III" + ], "description": "The appliance class." } }, "additionalProperties": false, - "required": ["standard", "class"] + "required": [ + "standard", + "class" + ] }, "minItems": 1 } @@ -1088,7 +1157,9 @@ } }, "additionalProperties": false, - "required": ["id"] + "required": [ + "id" + ] }, "minItems": 1 }, @@ -1129,7 +1200,10 @@ } }, "additionalProperties": false, - "required": ["id", "diodeType"] + "required": [ + "id", + "diodeType" + ] }, "minItems": 1 }, @@ -1223,13 +1297,20 @@ } }, "additionalProperties": false, - "required": ["id1", "id2"] + "required": [ + "id1", + "id2" + ] }, "minItems": 1 }, "category": { "type": "string", - "enum": ["parallel", "series", "complex"], + "enum": [ + "parallel", + "series", + "complex" + ], "description": "The electric connection can either be in parallel or in series or a more complex pattern." }, "grounding": { @@ -1261,12 +1342,19 @@ }, "grounding": { "type": "string", - "enum": ["plus", "minus", "neither"], + "enum": [ + "plus", + "minus", + "neither" + ], "description": "Whether the electric plus or minus of the component is connected to the ground." } }, "additionalProperties": false, - "required": ["id1", "grounding"] + "required": [ + "id1", + "grounding" + ] }, "minItems": 1 } @@ -1274,4 +1362,4 @@ } }, "$ref": "#/$defs/data" -} +} \ No newline at end of file From 34a34c663ecf9f1d97bfb9d5f1a8e4e747f5ef9b Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Tue, 18 Jun 2024 13:55:13 +0200 Subject: [PATCH 03/19] Create 'geometricData.json' based on 'opticalData.json' --- schemas/geometric.json | 2 +- schemas/geometricData.json | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 schemas/geometricData.json diff --git a/schemas/geometric.json b/schemas/geometric.json index b70950e0..063b18af 100644 --- a/schemas/geometric.json +++ b/schemas/geometric.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://www.buildingenvelopedata.org/schemas/v1/geometric.json", - "title": "geometric data", + "title": "metadata about geometric data sets", "description": "Geometric data sets of building envelope components with meta information like name, description, warnings, and more.", "$defs": { "geometric": { diff --git a/schemas/geometricData.json b/schemas/geometricData.json new file mode 100644 index 00000000..8e51693c --- /dev/null +++ b/schemas/geometricData.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://www.buildingenvelopedata.org/schemas/v1/geometricData.json", + "title": "geometric data", + "description": "Geometric data sets of building envelope components. It shall be possible to exchange the results of all important details about the geometry of a component.", + "$defs": { + "data": {}, + }, + "$ref": "#/$defs/data" +} \ No newline at end of file From fa76d67d25bcff9c276b7b42146533edda327311 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Tue, 18 Jun 2024 14:00:51 +0200 Subject: [PATCH 04/19] Copy content of 'geometry.json' to 'geometricData.json' --- schemas/geometricData.json | 415 ++++++++++++++++++++++++++++++++++++- 1 file changed, 414 insertions(+), 1 deletion(-) diff --git a/schemas/geometricData.json b/schemas/geometricData.json index 8e51693c..9241b843 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -4,7 +4,420 @@ "title": "geometric data", "description": "Geometric data sets of building envelope components. It shall be possible to exchange the results of all important details about the geometry of a component.", "$defs": { - "data": {}, + "data": { + "title": "Describe the geometry of a component either by its outer dimensions or as a resource for a Computer Aided Drawing (CAD) software.", + "type": "object", + "properties": { + "dimensions": { + "$ref": "#/$defs/dimensions", + "description": "Height, width and depth of the component." + }, + "origin": { + "$ref": "#/$defs/origin", + "description": "The origin of the coordinate system which is used by `location`." + }, + "location": { + "$ref": "#/$defs/location", + "description": "The location of the center of mass of the component." + }, + "orientation": { + "$ref": "#/$defs/orientation", + "description": "The orientation of the prime surface of the component." + }, + "getHttpsResource": { + "$ref": "common.json#/$defs/getHttpsResource", + "description": "Instead of or in addition to the keys above, a file can be used to define the geometry of the component." + }, + "levelOfDevelopment": { + "$ref": "#/$defs/orientation", + "description": "The Level of Development or Level of Detail (LOD) is used to describe how accurate the reality is modelled." + } + }, + "additionalProperties": false, + "required": [] + }, + "origin": { + "title": "The origin of the coordinate system which is used by `location`.", + "type": "object", + "properties": { + "latitude": { + "$ref": "number.json#/$defs/latitude", + "description": "The latitude of the location of the building." + }, + "longitude": { + "$ref": "number.json#/$defs/longitude", + "description": "The longitude of the location of the building." + }, + "elevation": { + "$ref": "number.json#/$defs/elevation", + "description": "The elevation of the location of the building. " + } + }, + "additionalProperties": false, + "required": [ + "latitude", + "longitude" + ] + }, + "location": { + "title": "The location of the center of mass of the component.", + "type": "object", + "properties": { + "east": { + "$ref": "number.json#/$defs/meter", + "description": "This distance is measured horizontally in the direction from the `origin` to the east. It has the SI unit of meter." + }, + "north": { + "$ref": "number.json#/$defs/meter", + "description": "This distance is measured horizontally in the direction from the `origin` to the north. It has the SI unit of meter." + }, + "elevation": { + "$ref": "number.json#/$defs/meter", + "description": "This distance is measured vertically in the direction from the `origin` to the sky. It has the SI unit of meter." + } + }, + "additionalProperties": false, + "required": [ + "east", + "north" + ] + }, + "orientation": { + "title": "The orientation of the prime surface of the component.", + "type": "object", + "properties": { + "azimuth": { + "$ref": "number.json#/$defs/degreeBetweenZeroAndThreeHundredSixtyWithUncertainty", + "description": "When the normal of the non-prime surface is projected on a horizontal plane, then the azimuth angle of the component is the angle between this projection and the north direction. If the prime surface faces west, then the azimuth angle equals 90°." + }, + "componentTilt": { + "$ref": "common.json#/$defs/angles/$defs/componentTilt", + "description": "The tilt angle of the component." + }, + "rotation": { + "$ref": "number.json#/$defs/degreeBetweenZeroAndThreeHundredSixtyWithUncertainty", + "description": "The angle of rotation around the normal of the non-prime surface. First, imagine a plane which is rectangular to the non-prime surface and parallel to the direction of the azimuth angle. The cross-section from the bottom to the top is the first important direction. The rotation angle is the angle between this direction and the prime direction. If the prime direction leads from the bottom to the top, then the rotation angle equals 0°. If the prime direction leads from the left-hand side to the right-hand side as seen from the exterior, then the rotation angle equals 90°." + } + }, + "additionalProperties": false, + "required": [ + "azimuth", + "componentTilt" + ] + }, + "levelOfDevelopment": { + "title": "The Level of Development or Level of Detail (LOD) is used to describe how accurate the reality is modelled. As geometry/LOD refers to geometry, it is sometimes also called Level of Geometry.", + "type": "array", + "prefixItems": [ + { + "$ref": "number.json#/$defs/nonNegativeInteger", + "description": "This integer indicates the LOD according to the definition of the reference below." + }, + { + "type": "object", + "properties": { + "reference": { + "$ref": "common.json#/$defs/reference", + "description": "This reference defines the LOD which is indicated above." + } + }, + "additionalProperties": false, + "required": [ + "reference" + ] + } + ], + "minItems": 2, + "items": false + }, + "assembly": { + "title": "An assembly of components where each item of the array defines one component of the assembly. Note that one component can either consist of a single component or of an assembly of components.", + "type": "object", + "properties": { + "origin": { + "$ref": "#/$defs/origin", + "description": "The origin of the coordinate system which is used by `assemblyList/location`." + }, + "definitionOfSurfacesAndPrimeDirections": { + "title": "Definition of surfaces and prime directions", + "description": "The prime surface and the prime direction are used to define the `orientation` of the component. If there is a `profileAngle` symmetry, the prime direction must be equal to the direction of the profile angle symmetry.", + "type": "object", + "properties": { + "reference": { + "$ref": "common.json#/$defs/reference", + "title": "Reference", + "description": "Reference that defines which surfaces of the components are defined as non-prime and which as prime. Often, the non-prime surface faces the exterior and the prime surface faces the interior. The reference should also define the prime directions of the components." + }, + "description": { + "type": "string", + "title": "Description", + "description": "Description of which sides of the components are defined as non-prime and which as prime and which direction is defined as the prime direction. Often, the non-prime side faces the exterior and the prime side the interior." + } + }, + "minProperties": 1, + "required": [] + }, + "assemblyList": { + "title": "The subcomponents which are used for this assembly.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$ref": "identifier.json#/$defs/centralOrDecentral", + "description": "The id represents a specific component of the assembly." + }, + "dimensions": { + "$ref": "#/$defs/dimensions", + "description": "Height, width and depth of the component." + }, + "location": { + "$ref": "#/$defs/location", + "description": "The location of the center of mass of the component." + }, + "orientation": { + "$ref": "#/$defs/orientation", + "description": "The orientation of the prime surface of the component." + }, + "getHttpsResource": { + "$ref": "common.json#/$defs/getHttpsResource", + "description": "Instead of or in addition to the keys above, a file can be used to define the geometry of the component." + }, + "levelOfDevelopment": { + "$ref": "#/$defs/orientation", + "description": "The Level of Development or Level of Detail (LOD) is used to describe how accurate the reality is modelled." + } + }, + "additionalProperties": false, + "minProperties": 1, + "required": [ + "id" + ] + }, + "minItems": 2 + } + }, + "additionalProperties": false, + "minProperties": 1, + "required": [ + "assemblyList" + ] + }, + "point": { + "title": "A point according to the definition of a coordinate system elsewhere.", + "type": "object", + "properties": { + "x": { + "$ref": "number.json#/$defs/meter" + }, + "y": { + "$ref": "number.json#/$defs/meter" + }, + "z": { + "$ref": "number.json#/$defs/meter" + } + }, + "additionalProperties": false, + "required": [ + "x", + "y", + "z" + ] + }, + "vector": { + "title": "A geometric vector according to the definition of a coordinate system elsewhere.", + "type": "object", + "properties": { + "x": { + "$ref": "number.json#/$defs/meter" + }, + "y": { + "$ref": "number.json#/$defs/meter" + }, + "z": { + "$ref": "number.json#/$defs/meter" + } + }, + "additionalProperties": false, + "required": [ + "x", + "y", + "z" + ] + }, + "coordinateSystem": { + "title": "Definition of the coordinate system of the data set", + "type": "object", + "properties": { + "reference": { + "$ref": "common.json#/$defs/reference", + "description": "The coordinate system needs to be well defined. If no suitable reference exists, please create a new publication in the database." + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "cartesian", + "cylindrical", + "leftHanded", + "polar", + "rightHanded", + "spherical" + ], + "description": "Often, a right-handed cartesian coordinate system is used." + }, + "uniqueItems": true, + "minItems": 1 + } + }, + "additionalProperties": false, + "required": [] + }, + "nurbsBoundedSurface": { + "title": "A non-uniform rational B-spline (NURBS) surface is a very general way to define a surface. It is created by two NURBS curves.", + "type": "object", + "properties": { + "uDirection": { + "$ref": "#/$defs/nurbsBoundedCurve" + }, + "vDirection": { + "$ref": "#/$defs/nurbsBoundedCurve" + } + }, + "additionalProperties": false, + "required": [ + "uDirection", + "vDirection" + ] + }, + "nurbsBoundedCurve": { + "title": "A non-uniform rational B-spline (NURBS) is a very general way to define a curve.", + "type": "object", + "properties": { + "degree": { + "type": "integer", + "minimum": 1, + "maximum": 10, + "description": "The degree of a NURBS curve defines the polynomial degree of the basis functions of the curve. For degree=1, the curve is a linear interpolation between the control points." + }, + "controlPoints": { + "title": "The control points have a strong influence on the shape of the curve.", + "type": "array", + "items": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/$defs/point", + "description": "If the curve is 3D, the 3D points are appropriate. For 2D curves, the value for the z-axis should be 0." + }, + { + "type": "object", + "properties": { + "weights": { + "type": "number", + "description": "The weight of a control points determines its influences on the shape of the curve." + } + }, + "additionalProperties": false, + "required": [ + "weights" + ] + } + ], + "minItems": 2, + "items": false + }, + "minItems": 2, + "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." + }, + "knots": { + "type": "array", + "items": { + "type": "number", + "description": "Each knot is a number which is either equal or larger than the preceding knot. Although usually the control points are used to shape the curve, the knots could also be used for this purpose. The first and last knot are usually repeated so that the curve ends exactly at these points." + }, + "minItems": 2, + "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." + } + }, + "additionalProperties": false, + "required": [ + "degree", + "controlPoints", + "knots" + ] + }, + "body": { + "type": "object", + "properties": { + "brep": { + "title": "Boundary representation (brep) defines a component by the surfaces between solid and non-solid.", + "type": "array", + "items": { + "$ref": "#/$defs/nurbsBoundedSurface" + }, + "minItems": 1, + "description": "This array lists all surfaces between solid and non-solid of the component." + } + }, + "additionalProperties": false, + "required": [] + }, + "dimensions": { + "type": "object", + "properties": { + "installed": { + "title": "This geometric definition of the dimensions refers to the installation of the component in a building envelope and a view perpendicular to the building envelope. The dimensions can be used to define a bounding box which includes all parts of the component. If a component can be installed in different ways, more than one set of dimensions can be defined.", + "type": "array", + "items": { + "type": "object", + "properties": { + "height": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The height of the component along the vertical axis of the building envelope. It has the units meter." + }, + "width": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The width of the component along the horizontal axis of the building envelope. It has the units meter." + }, + "depth": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The depth of the component along the axis perpendicular to the building envelope. It has the units meter." + } + }, + "additionalProperties": false, + "minProperties": 1, + "required": [] + }, + "minItems": 1 + }, + "independent": { + "title": "When the dimensions of a component are defined independent of a specific installation or coordinate system, then the dimensions can only be sorted by their values. The dimensions can be used to define a bounding box which includes all parts of the component.", + "type": "object", + "properties": { + "smallest": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The smallest dimension of the component. It has the units meter." + }, + "intermediate": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The dimension of the component which is larger the `smallest` and smaller than `largest`. It has the units meter." + }, + "largest": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The largest dimension of the component. It has the units meter." + } + }, + "additionalProperties": false, + "minProperties": 1, + "required": [] + } + }, + "additionalProperties": false, + "minProperties": 1, + "required": [] + } }, "$ref": "#/$defs/data" } \ No newline at end of file From bcfab0df01a37304e517605c0f3a8dd2ff7fd888 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Tue, 18 Jun 2024 14:27:01 +0200 Subject: [PATCH 05/19] Delete for 2 reasons: 1. The most important content becomes part of . 2. We plan to remove all keys which are currently not ready for production. --- schemas/geometry.json | 391 ------------------------------------------ 1 file changed, 391 deletions(-) delete mode 100644 schemas/geometry.json diff --git a/schemas/geometry.json b/schemas/geometry.json deleted file mode 100644 index 3ea089cf..00000000 --- a/schemas/geometry.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.buildingenvelopedata.org/schemas/v1/geometry.json", - "title": "geometry data", - "description": "Describe geoemtry data. There are many highly developed geometry kernels which are well suited to handle complex geometry in their file format. For some cases like the shape of a venetian blind, it may be helpful to be able to exchange the geometry independent of a geometry kernel.", - "$defs": { - "geometry": { - "title": "Describe the geometry of a component either by its outer dimensions or as a resource for a Computer Aided Drawing (CAD) software.", - "type": "object", - "properties": { - "dimensions": { - "$ref": "#/$defs/dimensions", - "description": "Height, width and depth of the component." - }, - "origin": { - "$ref": "#/$defs/origin", - "description": "The origin of the coordinate system which is used by `location`." - }, - "location": { - "$ref": "#/$defs/location", - "description": "The location of the center of mass of the component." - }, - "orientation": { - "$ref": "#/$defs/orientation", - "description": "The orientation of the prime surface of the component." - }, - "getHttpsResource": { - "$ref": "common.json#/$defs/getHttpsResource", - "description": "Instead of or in addition to the keys above, a file can be used to define the geometry of the component." - }, - "levelOfDevelopment": { - "$ref": "#/$defs/orientation", - "description": "The Level of Development or Level of Detail (LOD) is used to describe how accurate the reality is modelled." - } - }, - "additionalProperties": false, - "required": [] - }, - "origin": { - "title": "The origin of the coordinate system which is used by `location`.", - "type": "object", - "properties": { - "latitude": { - "$ref": "number.json#/$defs/latitude", - "description": "The latitude of the location of the building." - }, - "longitude": { - "$ref": "number.json#/$defs/longitude", - "description": "The longitude of the location of the building." - }, - "elevation": { - "$ref": "number.json#/$defs/elevation", - "description": "The elevation of the location of the building. " - } - }, - "additionalProperties": false, - "required": ["latitude", "longitude"] - }, - "location": { - "title": "The location of the center of mass of the component.", - "type": "object", - "properties": { - "east": { - "$ref": "number.json#/$defs/meter", - "description": "This distance is measured horizontally in the direction from the `origin` to the east. It has the SI unit of meter." - }, - "north": { - "$ref": "number.json#/$defs/meter", - "description": "This distance is measured horizontally in the direction from the `origin` to the north. It has the SI unit of meter." - }, - "elevation": { - "$ref": "number.json#/$defs/meter", - "description": "This distance is measured vertically in the direction from the `origin` to the sky. It has the SI unit of meter." - } - }, - "additionalProperties": false, - "required": ["east", "north"] - }, - "orientation": { - "title": "The orientation of the prime surface of the component.", - "type": "object", - "properties": { - "azimuth": { - "$ref": "number.json#/$defs/degreeBetweenZeroAndThreeHundredSixtyWithUncertainty", - "description": "When the normal of the non-prime surface is projected on a horizontal plane, then the azimuth angle of the component is the angle between this projection and the north direction. If the prime surface faces west, then the azimuth angle equals 90°." - }, - "componentTilt": { - "$ref": "common.json#/$defs/angles/$defs/componentTilt", - "description": "The tilt angle of the component." - }, - "rotation": { - "$ref": "number.json#/$defs/degreeBetweenZeroAndThreeHundredSixtyWithUncertainty", - "description": "The angle of rotation around the normal of the non-prime surface. First, imagine a plane which is rectangular to the non-prime surface and parallel to the direction of the azimuth angle. The cross-section from the bottom to the top is the first important direction. The rotation angle is the angle between this direction and the prime direction. If the prime direction leads from the bottom to the top, then the rotation angle equals 0°. If the prime direction leads from the left-hand side to the right-hand side as seen from the exterior, then the rotation angle equals 90°." - } - }, - "additionalProperties": false, - "required": ["azimuth", "componentTilt"] - }, - "levelOfDevelopment": { - "title": "The Level of Development or Level of Detail (LOD) is used to describe how accurate the reality is modelled. As geometry/LOD refers to geometry, it is sometimes also called Level of Geometry.", - "type": "array", - "prefixItems": [ - { - "$ref": "number.json#/$defs/nonNegativeInteger", - "description": "This integer indicates the LOD according to the definition of the reference below." - }, - { - "type": "object", - "properties": { - "reference": { - "$ref": "common.json#/$defs/reference", - "description": "This reference defines the LOD which is indicated above." - } - }, - "additionalProperties": false, - "required": ["reference"] - } - ], - "minItems": 2, - "items": false - }, - "assembly": { - "title": "An assembly of components where each item of the array defines one component of the assembly. Note that one component can either consist of a single component or of an assembly of components.", - "type": "object", - "properties": { - "origin": { - "$ref": "#/$defs/origin", - "description": "The origin of the coordinate system which is used by `assemblyList/location`." - }, - "definitionOfSurfacesAndPrimeDirections": { - "title": "Definition of surfaces and prime directions", - "description": "The prime surface and the prime direction are used to define the `orientation` of the component. If there is a `profileAngle` symmetry, the prime direction must be equal to the direction of the profile angle symmetry.", - "type": "object", - "properties": { - "reference": { - "$ref": "common.json#/$defs/reference", - "title": "Reference", - "description": "Reference that defines which surfaces of the components are defined as non-prime and which as prime. Often, the non-prime surface faces the exterior and the prime surface faces the interior. The reference should also define the prime directions of the components." - }, - "description": { - "type": "string", - "title": "Description", - "description": "Description of which sides of the components are defined as non-prime and which as prime and which direction is defined as the prime direction. Often, the non-prime side faces the exterior and the prime side the interior." - } - }, - "minProperties": 1, - "required": [] - }, - "assemblyList": { - "title": "The subcomponents which are used for this assembly.", - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "$ref": "identifier.json#/$defs/centralOrDecentral", - "description": "The id represents a specific component of the assembly." - }, - "dimensions": { - "$ref": "#/$defs/dimensions", - "description": "Height, width and depth of the component." - }, - "location": { - "$ref": "#/$defs/location", - "description": "The location of the center of mass of the component." - }, - "orientation": { - "$ref": "#/$defs/orientation", - "description": "The orientation of the prime surface of the component." - }, - "getHttpsResource": { - "$ref": "common.json#/$defs/getHttpsResource", - "description": "Instead of or in addition to the keys above, a file can be used to define the geometry of the component." - }, - "levelOfDevelopment": { - "$ref": "#/$defs/orientation", - "description": "The Level of Development or Level of Detail (LOD) is used to describe how accurate the reality is modelled." - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": ["id"] - }, - "minItems": 2 - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": ["assemblyList"] - }, - "point": { - "title": "A point according to the definition of a coordinate system elsewhere.", - "type": "object", - "properties": { - "x": { - "$ref": "number.json#/$defs/meter" - }, - "y": { - "$ref": "number.json#/$defs/meter" - }, - "z": { - "$ref": "number.json#/$defs/meter" - } - }, - "additionalProperties": false, - "required": ["x", "y", "z"] - }, - "vector": { - "title": "A geometric vector according to the definition of a coordinate system elsewhere.", - "type": "object", - "properties": { - "x": { - "$ref": "number.json#/$defs/meter" - }, - "y": { - "$ref": "number.json#/$defs/meter" - }, - "z": { - "$ref": "number.json#/$defs/meter" - } - }, - "additionalProperties": false, - "required": ["x", "y", "z"] - }, - "coordinateSystem": { - "title": "Definition of the coordinate system of the data set", - "type": "object", - "properties": { - "reference": { - "$ref": "common.json#/$defs/reference", - "description": "The coordinate system needs to be well defined. If no suitable reference exists, please create a new publication in the database." - }, - "categories": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "cartesian", - "cylindrical", - "leftHanded", - "polar", - "rightHanded", - "spherical" - ], - "description": "Often, a right-handed cartesian coordinate system is used." - }, - "uniqueItems": true, - "minItems": 1 - } - }, - "additionalProperties": false, - "required": [] - }, - "nurbsBoundedSurface": { - "title": "A non-uniform rational B-spline (NURBS) surface is a very general way to define a surface. It is created by two NURBS curves.", - "type": "object", - "properties": { - "uDirection": { - "$ref": "#/$defs/nurbsBoundedCurve" - }, - "vDirection": { - "$ref": "#/$defs/nurbsBoundedCurve" - } - }, - "additionalProperties": false, - "required": ["uDirection", "vDirection"] - }, - "nurbsBoundedCurve": { - "title": "A non-uniform rational B-spline (NURBS) is a very general way to define a curve.", - "type": "object", - "properties": { - "degree": { - "type": "integer", - "minimum": 1, - "maximum": 10, - "description": "The degree of a NURBS curve defines the polynomial degree of the basis functions of the curve. For degree=1, the curve is a linear interpolation between the control points." - }, - "controlPoints": { - "title": "The control points have a strong influence on the shape of the curve.", - "type": "array", - "items": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/$defs/point", - "description": "If the curve is 3D, the 3D points are appropriate. For 2D curves, the value for the z-axis should be 0." - }, - { - "type": "object", - "properties": { - "weights": { - "type": "number", - "description": "The weight of a control points determines its influences on the shape of the curve." - } - }, - "additionalProperties": false, - "required": ["weights"] - } - ], - "minItems": 2, - "items": false - }, - "minItems": 2, - "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." - }, - "knots": { - "type": "array", - "items": { - "type": "number", - "description": "Each knot is a number which is either equal or larger than the preceding knot. Although usually the control points are used to shape the curve, the knots could also be used for this purpose. The first and last knot are usually repeated so that the curve ends exactly at these points." - }, - "minItems": 2, - "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." - } - }, - "additionalProperties": false, - "required": ["degree", "controlPoints", "knots"] - }, - "body": { - "type": "object", - "properties": { - "brep": { - "title": "Boundary representation (brep) defines a component by the surfaces between solid and non-solid.", - "type": "array", - "items": { - "$ref": "#/$defs/nurbsBoundedSurface" - }, - "minItems": 1, - "description": "This array lists all surfaces between solid and non-solid of the component." - } - }, - "additionalProperties": false, - "required": [] - }, - "dimensions": { - "type": "object", - "properties": { - "installed": { - "title": "This geometric definition of the dimensions refers to the installation of the component in a building envelope and a view perpendicular to the building envelope. The dimensions can be used to define a bounding box which includes all parts of the component. If a component can be installed in different ways, more than one set of dimensions can be defined.", - "type": "array", - "items": { - "type": "object", - "properties": { - "height": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The height of the component along the vertical axis of the building envelope. It has the units meter." - }, - "width": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The width of the component along the horizontal axis of the building envelope. It has the units meter." - }, - "depth": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The depth of the component along the axis perpendicular to the building envelope. It has the units meter." - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": [] - }, - "minItems": 1 - }, - "independent": { - "title": "When the dimensions of a component are defined independent of a specific installation or coordinate system, then the dimensions can only be sorted by their values. The dimensions can be used to define a bounding box which includes all parts of the component.", - "type": "object", - "properties": { - "smallest": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The smallest dimension of the component. It has the units meter." - }, - "intermediate": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The dimension of the component which is larger the `smallest` and smaller than `largest`. It has the units meter." - }, - "largest": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The largest dimension of the component. It has the units meter." - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": [] - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": [] - } - }, - "$ref": "#/$defs/geometry" -} From 066ad11630c4482e5e15e7aea7f733088f623976 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 16:42:26 +0200 Subject: [PATCH 06/19] Remove the Level of Development (LOD), because it is not relevant for the simple geometric information of `geometricData.json`. When a resource includes the LOD, then it can become part of `geometric.json` and GraphQL. --- schemas/geometricData.json | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/schemas/geometricData.json b/schemas/geometricData.json index 9241b843..e12684f7 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -27,10 +27,6 @@ "getHttpsResource": { "$ref": "common.json#/$defs/getHttpsResource", "description": "Instead of or in addition to the keys above, a file can be used to define the geometry of the component." - }, - "levelOfDevelopment": { - "$ref": "#/$defs/orientation", - "description": "The Level of Development or Level of Detail (LOD) is used to describe how accurate the reality is modelled." } }, "additionalProperties": false, @@ -105,31 +101,6 @@ "componentTilt" ] }, - "levelOfDevelopment": { - "title": "The Level of Development or Level of Detail (LOD) is used to describe how accurate the reality is modelled. As geometry/LOD refers to geometry, it is sometimes also called Level of Geometry.", - "type": "array", - "prefixItems": [ - { - "$ref": "number.json#/$defs/nonNegativeInteger", - "description": "This integer indicates the LOD according to the definition of the reference below." - }, - { - "type": "object", - "properties": { - "reference": { - "$ref": "common.json#/$defs/reference", - "description": "This reference defines the LOD which is indicated above." - } - }, - "additionalProperties": false, - "required": [ - "reference" - ] - } - ], - "minItems": 2, - "items": false - }, "assembly": { "title": "An assembly of components where each item of the array defines one component of the assembly. Note that one component can either consist of a single component or of an assembly of components.", "type": "object", From 9751735ac60a26ec0de71cbe7044b9f595e86cca Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 16:45:53 +0200 Subject: [PATCH 07/19] Remove `getHttpsResource` because the separation between BED-JSON and resources is at the level of `geometric.json/data` --- schemas/geometricData.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/schemas/geometricData.json b/schemas/geometricData.json index e12684f7..17740100 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -23,10 +23,6 @@ "orientation": { "$ref": "#/$defs/orientation", "description": "The orientation of the prime surface of the component." - }, - "getHttpsResource": { - "$ref": "common.json#/$defs/getHttpsResource", - "description": "Instead of or in addition to the keys above, a file can be used to define the geometry of the component." } }, "additionalProperties": false, @@ -149,14 +145,6 @@ "orientation": { "$ref": "#/$defs/orientation", "description": "The orientation of the prime surface of the component." - }, - "getHttpsResource": { - "$ref": "common.json#/$defs/getHttpsResource", - "description": "Instead of or in addition to the keys above, a file can be used to define the geometry of the component." - }, - "levelOfDevelopment": { - "$ref": "#/$defs/orientation", - "description": "The Level of Development or Level of Detail (LOD) is used to describe how accurate the reality is modelled." } }, "additionalProperties": false, From 3fa50abed090bde7495deb5760328f03337b299d Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 16:55:10 +0200 Subject: [PATCH 08/19] Remove `definitionOfSurfacesAndPrimeDirection` from assemmbly because this is treated in `#/$defs/componentCharacteristics/properties/definitionOfSurfacesAndPrimeDirection` of the assembly and of the subcomponents. --- schemas/geometricData.json | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/schemas/geometricData.json b/schemas/geometricData.json index 17740100..b5f5ae4f 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -105,25 +105,6 @@ "$ref": "#/$defs/origin", "description": "The origin of the coordinate system which is used by `assemblyList/location`." }, - "definitionOfSurfacesAndPrimeDirections": { - "title": "Definition of surfaces and prime directions", - "description": "The prime surface and the prime direction are used to define the `orientation` of the component. If there is a `profileAngle` symmetry, the prime direction must be equal to the direction of the profile angle symmetry.", - "type": "object", - "properties": { - "reference": { - "$ref": "common.json#/$defs/reference", - "title": "Reference", - "description": "Reference that defines which surfaces of the components are defined as non-prime and which as prime. Often, the non-prime surface faces the exterior and the prime surface faces the interior. The reference should also define the prime directions of the components." - }, - "description": { - "type": "string", - "title": "Description", - "description": "Description of which sides of the components are defined as non-prime and which as prime and which direction is defined as the prime direction. Often, the non-prime side faces the exterior and the prime side the interior." - } - }, - "minProperties": 1, - "required": [] - }, "assemblyList": { "title": "The subcomponents which are used for this assembly.", "type": "array", From c7673993867191b3757de050c9eb4991c6aed8b6 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 17:02:43 +0200 Subject: [PATCH 09/19] `make format` --- schemas/calorimetric.json | 2 +- schemas/geometric.json | 2 +- schemas/hygrothermal.json | 2 +- schemas/optical.json | 2 +- schemas/opticalData.json | 103 +++++------------------ schemas/photovoltaic.json | 2 +- schemas/photovoltaicData.json | 148 +++++++--------------------------- 7 files changed, 56 insertions(+), 205 deletions(-) diff --git a/schemas/calorimetric.json b/schemas/calorimetric.json index 96de9c0a..f85f6adb 100644 --- a/schemas/calorimetric.json +++ b/schemas/calorimetric.json @@ -77,4 +77,4 @@ } }, "$ref": "#/$defs/calorimetric" -} \ No newline at end of file +} diff --git a/schemas/geometric.json b/schemas/geometric.json index 063b18af..fb65a187 100644 --- a/schemas/geometric.json +++ b/schemas/geometric.json @@ -76,4 +76,4 @@ } }, "$ref": "#/$defs/geometric" -} \ No newline at end of file +} diff --git a/schemas/hygrothermal.json b/schemas/hygrothermal.json index 4cb4ae48..0d946404 100644 --- a/schemas/hygrothermal.json +++ b/schemas/hygrothermal.json @@ -76,4 +76,4 @@ } }, "$ref": "#/$defs/hygrothermal" -} \ No newline at end of file +} diff --git a/schemas/optical.json b/schemas/optical.json index 57eb0aa5..d1916ed5 100644 --- a/schemas/optical.json +++ b/schemas/optical.json @@ -76,4 +76,4 @@ } }, "$ref": "#/$defs/optical" -} \ No newline at end of file +} diff --git a/schemas/opticalData.json b/schemas/opticalData.json index c1dba0b2..7be22c61 100644 --- a/schemas/opticalData.json +++ b/schemas/opticalData.json @@ -25,9 +25,7 @@ } }, "additionalProperties": false, - "required": [ - "dataPoints" - ] + "required": ["dataPoints"] }, { "title": "Internal data node with non-leaf children", @@ -48,9 +46,7 @@ } }, "additionalProperties": false, - "required": [ - "data" - ] + "required": ["data"] } ] }, @@ -83,11 +79,7 @@ } }, "additionalProperties": false, - "required": [ - "incidence", - "emergence", - "results" - ] + "required": ["incidence", "emergence", "results"] }, { "title": "Color characterization", @@ -123,12 +115,7 @@ }, "normalization": { "type": "string", - "enum": [ - "absolute", - "relative", - "specular", - "diffuseReflectance" - ], + "enum": ["absolute", "relative", "specular", "diffuseReflectance"], "title": "Normalization", "description": "Normalization methods absolute, relative, specular, and diffuse reflectance as standardized in [ASTM E2387-05(2011), Standard Practice for Goniometric Optical Scatter Measurements, ASTM International, West Conshohocken, PA, 2011, www.astm.org](https://www.astm.org/DATABASE.CART/HISTORICAL/E2387-05R11.htm)." }, @@ -186,19 +173,13 @@ } }, "additionalProperties": false, - "required": [ - "s", - "p" - ] + "required": ["s", "p"] }, { "title": "Circular polarization", "description": "`leftHanded` means that the radiation is circularly polarized and rotates in a left-hand sense with respect to the direction of radiation. `rightHanded` means that the radiation is circularly polarized and rotates in a right-hand sense with respect to the direction of radiation.", "type": "string", - "enum": [ - "leftHanded", - "rightHanded" - ] + "enum": ["leftHanded", "rightHanded"] } ] }, @@ -228,20 +209,12 @@ "properties": { "integral": { "type": "string", - "enum": [ - "infrared", - "solar", - "ultraviolet", - "visible", - "other" - ], + "enum": ["infrared", "solar", "ultraviolet", "visible", "other"], "description": "Spectrum over which the integral result was measured or calculated. `ultraviolet`, `visible`, `solar` and `infrared` indicate the range of the wavelengths used for the integral values. Details about the spectrum are provided by the method which has been applied to generate the data set. If neither `ultraviolet`, `visible`, `solar` and `infrared` describe the spectrum correctly, `other` indicates that all information about the spectrum is provided by the applied method." } }, "additionalProperties": false, - "required": [ - "integral" - ] + "required": ["integral"] }, "transmittance": { "$ref": "number.json#/$defs/numberWithUncertainty", @@ -273,9 +246,7 @@ } }, "additionalProperties": false, - "required": [ - "polar" - ] + "required": ["polar"] }, { "title": "Hemispherical", @@ -303,18 +274,13 @@ } }, "additionalProperties": false, - "required": [ - "polar" - ] + "required": ["polar"] }, { "title": "Diffuse or hemispherical", "description": "(i) Diffuse means all directions with an emergence angle greater than 10°. (ii) Hemispherical means all directions to the hemisphere above the sample surface. Both are used when the emergence in many directions is treated as a sum.", "type": "string", - "enum": [ - "diffuse", - "hemispherical" - ] + "enum": ["diffuse", "hemispherical"] } ] }, @@ -331,9 +297,7 @@ } }, "additionalProperties": false, - "required": [ - "wavelength" - ] + "required": ["wavelength"] }, "wavelengths": { "title": "Wavelengths of radiation", @@ -365,10 +329,7 @@ } }, "additionalProperties": false, - "required": [ - "direction", - "wavelengths" - ] + "required": ["direction", "wavelengths"] }, "emergence": { "title": "Emergent radiation", @@ -380,9 +341,7 @@ } }, "additionalProperties": false, - "required": [ - "direction" - ] + "required": ["direction"] }, "results": { "title": "Measurement or simulation results", @@ -449,10 +408,7 @@ }, "direction": { "type": "string", - "enum": [ - "reflection", - "transmission" - ], + "enum": ["reflection", "transmission"], "description": "`reflection` indicates that that the color is defined which is reflected by the component. `transmission` indicates that the color is defined which is transmitted through the component." }, "surface": { @@ -461,28 +417,17 @@ }, "observer": { "type": "string", - "enum": [ - "twoDegrees", - "tenDegrees" - ], + "enum": ["twoDegrees", "tenDegrees"], "description": "`twoDegrees` equals the CIE 1931 standard colorimetric observer. `tenDegrees` equals the CIE 1964 standard colorimetric observer. The observers differ in the solid angle which they consider." }, "illuminant": { "type": "string", - "enum": [ - "A", - "D65" - ], + "enum": ["A", "D65"], "description": "The illuminant which is used to determine the color coordinates. `A` equals the CIE standard illuminant A. `D65` equals the CIE standard illuminant D65." } }, "additionalProperties": false, - "required": [ - "lStar", - "aStar", - "bStar", - "direction" - ] + "required": ["lStar", "aStar", "bStar", "direction"] }, "colorRenderingIndex": { "title": "The Color Rendering Index (CRI) indicates how well the transmitted or reflected radiation matches daylight regarding the rendering of colors.", @@ -494,10 +439,7 @@ }, "direction": { "type": "string", - "enum": [ - "reflection", - "transmission" - ], + "enum": ["reflection", "transmission"], "description": "`reflection` indicates that that the Color Rendering Index is defined for radiation which is reflected by the component. `transmission` indicates that the Color Rendering Index is defined for radiation which is transmitted through the component." }, "surface": { @@ -506,11 +448,8 @@ } }, "additionalProperties": false, - "required": [ - "value", - "direction" - ] + "required": ["value", "direction"] } }, "$ref": "#/$defs/data" -} \ No newline at end of file +} diff --git a/schemas/photovoltaic.json b/schemas/photovoltaic.json index 5b27af99..c7c03dcc 100644 --- a/schemas/photovoltaic.json +++ b/schemas/photovoltaic.json @@ -76,4 +76,4 @@ } }, "$ref": "#/$defs/photovoltaic" -} \ No newline at end of file +} diff --git a/schemas/photovoltaicData.json b/schemas/photovoltaicData.json index b9001253..9dba1540 100644 --- a/schemas/photovoltaicData.json +++ b/schemas/photovoltaicData.json @@ -15,9 +15,7 @@ } }, "additionalProperties": false, - "required": [ - "module" - ] + "required": ["module"] }, { "type": "object", @@ -28,9 +26,7 @@ } }, "additionalProperties": false, - "required": [ - "inverter" - ] + "required": ["inverter"] }, { "type": "object", @@ -41,9 +37,7 @@ } }, "additionalProperties": false, - "required": [ - "system" - ] + "required": ["system"] } ] }, @@ -137,9 +131,7 @@ } }, "additionalProperties": false, - "required": [ - "id" - ] + "required": ["id"] }, "minItems": 1 }, @@ -164,9 +156,7 @@ } }, "additionalProperties": false, - "required": [ - "cellNumber" - ] + "required": ["cellNumber"] }, "transversal": { "title": "'transversal' is the direction with the smaller number of cells.", @@ -182,16 +172,11 @@ } }, "additionalProperties": false, - "required": [ - "cellNumber" - ] + "required": ["cellNumber"] } }, "additionalProperties": false, - "required": [ - "longitudinal", - "transversal" - ] + "required": ["longitudinal", "transversal"] } }, "additionalProperties": false, @@ -214,10 +199,7 @@ } }, "additionalProperties": false, - "required": [ - "id", - "cellType" - ] + "required": ["id", "cellType"] }, "minItems": 1 }, @@ -258,10 +240,7 @@ } }, "additionalProperties": false, - "required": [ - "id", - "diodeType" - ] + "required": ["id", "diodeType"] }, "minItems": 0 }, @@ -406,9 +385,7 @@ } }, "additionalProperties": false, - "required": [ - "id" - ] + "required": ["id"] }, "minItems": 1 }, @@ -472,10 +449,7 @@ } }, "additionalProperties": false, - "required": [ - "years", - "percentage" - ] + "required": ["years", "percentage"] }, "minItems": 1 }, @@ -518,10 +492,7 @@ } }, "additionalProperties": false, - "required": [ - "direction", - "modifier" - ] + "required": ["direction", "modifier"] } } ] @@ -630,20 +601,12 @@ }, "smoke": { "type": "string", - "enum": [ - "s1", - "s2", - "s3" - ], + "enum": ["s1", "s2", "s3"], "description": "Abbreviations for smoke according to EN 13501-1." }, "drops": { "type": "string", - "enum": [ - "d0", - "d1", - "d2" - ], + "enum": ["d0", "d1", "d2"], "description": "Abbreviations for burning drops according to EN 13501-1." } }, @@ -703,9 +666,7 @@ }, "additionalProperties": false, "minProperties": 2, - "required": [ - "reference" - ] + "required": ["reference"] }, "minItems": 1 }, @@ -729,9 +690,7 @@ } }, "additionalProperties": false, - "required": [ - "reference" - ] + "required": ["reference"] }, "minItems": 1 }, @@ -784,9 +743,7 @@ } }, "additionalProperties": false, - "required": [ - "years" - ] + "required": ["years"] }, "minItems": 1 }, @@ -978,10 +935,7 @@ "type": "array", "items": { "type": "string", - "enum": [ - "EN IEC 60529", - "ISO 20653" - ], + "enum": ["EN IEC 60529", "ISO 20653"], "description": "`EN IEC 60529` and `ISO 20653` indicate the standard according to which the IP code is defined." }, "uniqueItems": true, @@ -1026,31 +980,17 @@ }, "thirdDigit": { "type": "string", - "enum": [ - "A", - "B", - "C", - "D" - ], + "enum": ["A", "B", "C", "D"], "description": "The third digit is optional and represents the access to dangerous active parts." }, "fourthDigit": { "type": "string", - "enum": [ - "f", - "H", - "M", - "S", - "W" - ], + "enum": ["f", "H", "M", "S", "W"], "description": "The fourth digit can include additional information." } }, "additionalProperties": false, - "required": [ - "firstDigit", - "secondDigit" - ] + "required": ["firstDigit", "secondDigit"] }, "minItems": 1 }, @@ -1067,21 +1007,12 @@ }, "class": { "type": "string", - "enum": [ - "0", - "I", - "0I", - "II", - "III" - ], + "enum": ["0", "I", "0I", "II", "III"], "description": "The appliance class." } }, "additionalProperties": false, - "required": [ - "standard", - "class" - ] + "required": ["standard", "class"] }, "minItems": 1 } @@ -1157,9 +1088,7 @@ } }, "additionalProperties": false, - "required": [ - "id" - ] + "required": ["id"] }, "minItems": 1 }, @@ -1200,10 +1129,7 @@ } }, "additionalProperties": false, - "required": [ - "id", - "diodeType" - ] + "required": ["id", "diodeType"] }, "minItems": 1 }, @@ -1297,20 +1223,13 @@ } }, "additionalProperties": false, - "required": [ - "id1", - "id2" - ] + "required": ["id1", "id2"] }, "minItems": 1 }, "category": { "type": "string", - "enum": [ - "parallel", - "series", - "complex" - ], + "enum": ["parallel", "series", "complex"], "description": "The electric connection can either be in parallel or in series or a more complex pattern." }, "grounding": { @@ -1342,19 +1261,12 @@ }, "grounding": { "type": "string", - "enum": [ - "plus", - "minus", - "neither" - ], + "enum": ["plus", "minus", "neither"], "description": "Whether the electric plus or minus of the component is connected to the ground." } }, "additionalProperties": false, - "required": [ - "id1", - "grounding" - ] + "required": ["id1", "grounding"] }, "minItems": 1 } @@ -1362,4 +1274,4 @@ } }, "$ref": "#/$defs/data" -} \ No newline at end of file +} From 506f5a8b1be2a432aa14edee63540fd3056f9742 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 17:12:01 +0200 Subject: [PATCH 10/19] Rename `depth` to `thickness` because this is more common dealing with building envelopes. --- schemas/geometricData.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/geometricData.json b/schemas/geometricData.json index b5f5ae4f..e5598da3 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -321,9 +321,9 @@ "$ref": "number.json#/$defs/meterWithUncertainty", "description": "The width of the component along the horizontal axis of the building envelope. It has the units meter." }, - "depth": { + "thickness": { "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The depth of the component along the axis perpendicular to the building envelope. It has the units meter." + "description": "The thickness of the component along the axis perpendicular to the building envelope. It has the units meter." } }, "additionalProperties": false, From 5dcda2b4ea6c41ab256d346cd1ae9039e372029e Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 17:22:04 +0200 Subject: [PATCH 11/19] Add domain `geometricData` to specification `database.graphql`. Include `thickness` as mirrored value. --- apis/database.graphql | 87 ++++++++++++++++++++++++++++++++++++++ schemas/geometricData.json | 25 +++-------- 2 files changed, 93 insertions(+), 19 deletions(-) diff --git a/apis/database.graphql b/apis/database.graphql index c512714c..619cfe74 100644 --- a/apis/database.graphql +++ b/apis/database.graphql @@ -219,6 +219,11 @@ type Query { locale: Locale ): CalorimetricData! + """ + See `Query#data`. + """ + geometricData(id: Uuid!, timestamp: DateTime, locale: Locale): GeometricData! + """ See `Query#data`. """ @@ -325,6 +330,19 @@ type Query { before: Cursor ): CalorimetricDataConnection! + """ + See `Query#allData`. + """ + allGeometricData( + where: GeometricDataPropositionInput + timestamp: DateTime + locale: Locale + first: NonNegativeInt + after: Cursor + last: NonNegativeInt + before: Cursor + ): GeometricDataConnection! + """ See `Query#allData`. """ @@ -386,6 +404,15 @@ type Query { locale: Locale ): Boolean! + """ + See `Query#hasData`. + """ + hasGeometricData( + where: GeometricDataPropositionInput + timestamp: DateTime + locale: Locale + ): Boolean! + """ See `Query#hasData`. """ @@ -712,6 +739,12 @@ input DataPropositionInput { """ uValues: FloatsPropositionInput + """ + True for data whose list of `thickness` values satisfies the proposition `thicknesses`, + otherwise false. + """ + thicknesses: FloatsPropositionInput + """ True for data whose list of nearnormal hemispherical visible transmittance values satisfies the proposition @@ -838,6 +871,18 @@ input CalorimetricDataPropositionInput { uValues: FloatsPropositionInput } +""" +See `DataPropositionInput`. +""" +input GeometricDataPropositionInput { + componentId: UuidPropositionInput + and: [GeometricDataPropositionInput!] + not: GeometricDataPropositionInput + or: [GeometricDataPropositionInput!] + resources: GetHttpsResourcesPropositionInput + thicknesses: FloatsPropositionInput +} + """ See `DataPropositionInput`. """ @@ -996,6 +1041,16 @@ type CalorimetricDataConnection { timestamp: DateTime! } +""" +See `DataConnection`. +""" +type GeometricDataConnection { + edges: [GeometricDataEdge!]! + nodes: [GeometricData!]! + pageInfo: PageInfo! + timestamp: DateTime! +} + """ See `DataEdge`. """ @@ -1004,6 +1059,14 @@ type CalorimetricDataEdge { node: CalorimetricData! } +""" +See `DataEdge`. +""" +type GeometricDataEdge { + cursor: Cursor! + node: GeometricData! +} + """ Measured, simulated, or calculated data. @@ -1217,6 +1280,30 @@ type CalorimetricData implements Node & Data { uValues: [Float!]! } +type GeometricData implements Node & Data { + id: ID! + uuid: Uuid! + timestamp: DateTime! + locale: Locale! + databaseId: Uuid! + componentId: Uuid! + name: String + description: String + warnings: [String!]! + creatorId: Uuid! + createdAt: DateTime! + appliedMethod: AppliedMethod! + resources: [GetHttpsResource!]! + resourceTree: GetHttpsResourceTree! + approvals: [DataApproval!]! + approval: ResponseApproval! + + """ + Mirrored `thickness` values that occur in the data + """ + thicknesses: [Float!]! +} + type HygrothermalData implements Node & Data { id: ID! uuid: Uuid! diff --git a/schemas/geometricData.json b/schemas/geometricData.json index e5598da3..28e97e99 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -46,10 +46,7 @@ } }, "additionalProperties": false, - "required": [ - "latitude", - "longitude" - ] + "required": ["latitude", "longitude"] }, "location": { "title": "The location of the center of mass of the component.", @@ -69,10 +66,7 @@ } }, "additionalProperties": false, - "required": [ - "east", - "north" - ] + "required": ["east", "north"] }, "orientation": { "title": "The orientation of the prime surface of the component.", @@ -92,10 +86,7 @@ } }, "additionalProperties": false, - "required": [ - "azimuth", - "componentTilt" - ] + "required": ["azimuth", "componentTilt"] }, "assembly": { "title": "An assembly of components where each item of the array defines one component of the assembly. Note that one component can either consist of a single component or of an assembly of components.", @@ -130,18 +121,14 @@ }, "additionalProperties": false, "minProperties": 1, - "required": [ - "id" - ] + "required": ["id"] }, "minItems": 2 } }, "additionalProperties": false, "minProperties": 1, - "required": [ - "assemblyList" - ] + "required": ["assemblyList"] }, "point": { "title": "A point according to the definition of a coordinate system elsewhere.", @@ -360,4 +347,4 @@ } }, "$ref": "#/$defs/data" -} \ No newline at end of file +} From 75d8d3da4a20fdaa6fa7de0384afa432c64fd834 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 17:32:05 +0200 Subject: [PATCH 12/19] Move geometry to its domain in `component.json`. --- schemas/component.json | 46 ++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/schemas/component.json b/schemas/component.json index 043cdaa8..728cbe56 100644 --- a/schemas/component.json +++ b/schemas/component.json @@ -118,6 +118,14 @@ "minItems": 1, "description": "Calorimetric data sets of one component. For example the U value, the g value (or Solar Heat Gain Coefficient)." }, + "geometric": { + "type": "array", + "items": { + "$ref": "geometric.json" + }, + "minItems": 1, + "description": "Geometric data sets of one component. For example the dimensions of the component or a CAD resource." + }, "photovoltaic": { "type": "array", "items": { @@ -137,7 +145,9 @@ }, "additionalProperties": false, "minProperties": 1, - "required": ["id"] + "required": [ + "id" + ] }, "categories": { "title": "The categories which a component can have.", @@ -147,7 +157,11 @@ "type": "array", "items": { "type": "string", - "enum": ["material", "layer", "unit"], + "enum": [ + "material", + "layer", + "unit" + ], "description": "A building envelope component can have one or more of the following categories. (i) If the component is a plain material, for example a sheet which could be used to build a blind, the category 'material' should be used. (ii) If the component can be treated as a layer for optical simulations of a stack of layers, then the category 'layer' should be used. Venetian blinds are one example of a layer. The center-of-glazing values are important for the simulation of a stack of layers. (iii) If the width, the height and the edges of the component are well defined, then the category 'unit' should be used. For example a window with frame and shading system." }, "uniqueItems": true, @@ -221,23 +235,14 @@ } }, "additionalProperties": false, - "required": ["id"] + "required": [ + "id" + ] }, "characteristics": { "title": "The characteristics a component can have which do not change between different data sets about this component.", "type": "object", "properties": { - "geometry": { - "title": "The geometry of the component which can either be an assembly or a single component.", - "oneOf": [ - { - "$ref": "geometry.json" - }, - { - "$ref": "geometry.json#/$defs/assembly" - } - ] - }, "weight": { "$ref": "number.json#/$defs/kilogramWithUncertainty", "description": "The weight of the component in kilogram." @@ -316,7 +321,10 @@ } }, "minProperties": 2, - "required": ["surface", "rootMeanSquare"] + "required": [ + "surface", + "rootMeanSquare" + ] }, "minItems": 1, "description": "Each item of the array defines a surface of the component together with the roughness of this surface." @@ -340,10 +348,14 @@ }, "surface": { "type": "string", - "enum": ["nonPrime", "prime", "symmetric"], + "enum": [ + "nonPrime", + "prime", + "symmetric" + ], "title": "Surface", "description": "Whether the incidence is on the non-prime or the prime surface of the sample. Both are defined in `definitionOfSurfacesAndPrimeDirection`. If the results are identical for both sides, 'symmetric' is used." } }, "$ref": "#/$defs/component" -} +} \ No newline at end of file From 9ab30cdb4423a71456eda56befed6d8f73edd87f Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 17:33:35 +0200 Subject: [PATCH 13/19] Update reference to `geometricData.json`. --- schemas/layer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/layer.json b/schemas/layer.json index 7c8eccdf..a5796e95 100644 --- a/schemas/layer.json +++ b/schemas/layer.json @@ -113,11 +113,11 @@ "shape": { "oneOf": [ { - "$ref": "geometry.json#/$defs/nurbsBoundedCurve", + "$ref": "geometricData.json#/$defs/nurbsBoundedCurve", "description": "Usually, the shape of a slat is best described by a 2D curve of its cross section." }, { - "$ref": "geometry.json#/$defs/nurbsBoundedSurface", + "$ref": "geometricData.json#/$defs/nurbsBoundedSurface", "description": "If the shape of the slats needs to be defined in 3D, a surface can be used." } ] From 29ebb96fbc04153a903fc0f4a4255d6b8789348b Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 17:33:59 +0200 Subject: [PATCH 14/19] `make format` --- schemas/component.json | 27 ++++++--------------------- schemas/geometricData.json | 27 +++++---------------------- 2 files changed, 11 insertions(+), 43 deletions(-) diff --git a/schemas/component.json b/schemas/component.json index 728cbe56..4f523b07 100644 --- a/schemas/component.json +++ b/schemas/component.json @@ -145,9 +145,7 @@ }, "additionalProperties": false, "minProperties": 1, - "required": [ - "id" - ] + "required": ["id"] }, "categories": { "title": "The categories which a component can have.", @@ -157,11 +155,7 @@ "type": "array", "items": { "type": "string", - "enum": [ - "material", - "layer", - "unit" - ], + "enum": ["material", "layer", "unit"], "description": "A building envelope component can have one or more of the following categories. (i) If the component is a plain material, for example a sheet which could be used to build a blind, the category 'material' should be used. (ii) If the component can be treated as a layer for optical simulations of a stack of layers, then the category 'layer' should be used. Venetian blinds are one example of a layer. The center-of-glazing values are important for the simulation of a stack of layers. (iii) If the width, the height and the edges of the component are well defined, then the category 'unit' should be used. For example a window with frame and shading system." }, "uniqueItems": true, @@ -235,9 +229,7 @@ } }, "additionalProperties": false, - "required": [ - "id" - ] + "required": ["id"] }, "characteristics": { "title": "The characteristics a component can have which do not change between different data sets about this component.", @@ -321,10 +313,7 @@ } }, "minProperties": 2, - "required": [ - "surface", - "rootMeanSquare" - ] + "required": ["surface", "rootMeanSquare"] }, "minItems": 1, "description": "Each item of the array defines a surface of the component together with the roughness of this surface." @@ -348,14 +337,10 @@ }, "surface": { "type": "string", - "enum": [ - "nonPrime", - "prime", - "symmetric" - ], + "enum": ["nonPrime", "prime", "symmetric"], "title": "Surface", "description": "Whether the incidence is on the non-prime or the prime surface of the sample. Both are defined in `definitionOfSurfacesAndPrimeDirection`. If the results are identical for both sides, 'symmetric' is used." } }, "$ref": "#/$defs/component" -} \ No newline at end of file +} diff --git a/schemas/geometricData.json b/schemas/geometricData.json index 28e97e99..1146fdf9 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -145,11 +145,7 @@ } }, "additionalProperties": false, - "required": [ - "x", - "y", - "z" - ] + "required": ["x", "y", "z"] }, "vector": { "title": "A geometric vector according to the definition of a coordinate system elsewhere.", @@ -166,11 +162,7 @@ } }, "additionalProperties": false, - "required": [ - "x", - "y", - "z" - ] + "required": ["x", "y", "z"] }, "coordinateSystem": { "title": "Definition of the coordinate system of the data set", @@ -213,10 +205,7 @@ } }, "additionalProperties": false, - "required": [ - "uDirection", - "vDirection" - ] + "required": ["uDirection", "vDirection"] }, "nurbsBoundedCurve": { "title": "A non-uniform rational B-spline (NURBS) is a very general way to define a curve.", @@ -247,9 +236,7 @@ } }, "additionalProperties": false, - "required": [ - "weights" - ] + "required": ["weights"] } ], "minItems": 2, @@ -269,11 +256,7 @@ } }, "additionalProperties": false, - "required": [ - "degree", - "controlPoints", - "knots" - ] + "required": ["degree", "controlPoints", "knots"] }, "body": { "type": "object", From 97670b5ba1e0f13cb1e1ba62a20a16613f8e1d69 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Thu, 20 Jun 2024 09:54:09 +0200 Subject: [PATCH 15/19] Add the domain `geometricData` to the specification `database.graphql` --- apis/metabase.graphql | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/apis/metabase.graphql b/apis/metabase.graphql index 4113bdfe..ac3b2c05 100644 --- a/apis/metabase.graphql +++ b/apis/metabase.graphql @@ -487,6 +487,15 @@ type Database implements Node { timestamp: DateTime where: DataPropositionInput ): DataConnection + allGeometricData( + after: String + before: String + first: NonNegativeInt + last: NonNegativeInt + locale: String + timestamp: DateTime + where: GeometricDataPropositionInput + ): GeometricDataConnection allHygrothermalData( after: String before: String @@ -521,6 +530,7 @@ type Database implements Node { ): CalorimetricData data(id: Uuid!, locale: String, timestamp: DateTime): Data description: String! + geometricData(id: Uuid!, locale: String, timestamp: DateTime): GeometricData hasCalorimetricData( locale: String timestamp: DateTime @@ -531,6 +541,11 @@ type Database implements Node { timestamp: DateTime where: DataPropositionInput ): Boolean + hasGeometricData( + locale: String + timestamp: DateTime + where: GeometricDataPropositionInput + ): Boolean hasHygrothermalData( locale: String timestamp: DateTime @@ -688,6 +703,36 @@ type GenerateUserTwoFactorRecoveryCodesPayload { user: User } +type GeometricData implements Data { + appliedMethod: AppliedMethod! + component: Component + componentId: Uuid! + createdAt: DateTime! + creatorId: Uuid! + description: String + id: String! + locale: String! + name: String + resourceTree: GetHttpsResourceTree! + resources: [GetHttpsResource!]! + thicknesses: [Float!]! + timestamp: DateTime! + uuid: Uuid! + warnings: [String!]! +} + +type GeometricDataConnection { + edges: [GeometricDataEdge!]! + nodes: [GeometricData!]! + timestamp: DateTime! + totalCount: NonNegativeInt +} + +type GeometricDataEdge { + cursor: String! + node: GeometricData! +} + type GetHttpsResource { dataFormat: DataFormat dataFormatId: Uuid! @@ -1879,6 +1924,16 @@ input FloatsPropositionInput { some: FloatPropositionInput } +input GeometricDataPropositionInput { + and: [GeometricDataPropositionInput!] + componentId: UuidPropositionInput + gValues: FloatsPropositionInput + not: GeometricDataPropositionInput + or: [GeometricDataPropositionInput!] + resources: GetHttpsResourcesPropositionInput + uValues: FloatsPropositionInput +} + input GetHttpsResourcePropositionInput { archivedFilesMetaInformation: FilesMetaInformationPropositionInput dataFormatId: UuidPropositionInput From 8fa6795f0de5eb170ab66de3947003baf33c36e2 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Thu, 20 Jun 2024 10:04:03 +0200 Subject: [PATCH 16/19] Order the definitions from simple to complex --- schemas/geometricData.json | 161 ++++++++++++++++++++++--------------- 1 file changed, 96 insertions(+), 65 deletions(-) diff --git a/schemas/geometricData.json b/schemas/geometricData.json index 1146fdf9..36a41e9a 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -26,6 +26,61 @@ } }, "additionalProperties": false, + "minProperties": 1, + "required": [] + }, + "dimensions": { + "type": "object", + "properties": { + "installed": { + "title": "This geometric definition of the dimensions refers to the installation of the component in a building envelope and a view perpendicular to the building envelope. The dimensions can be used to define a bounding box which includes all parts of the component. If a component can be installed in different ways, more than one set of dimensions can be defined.", + "type": "array", + "items": { + "type": "object", + "properties": { + "height": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The height of the component along the vertical axis of the building envelope. It has the units meter." + }, + "width": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The width of the component along the horizontal axis of the building envelope. It has the units meter." + }, + "thickness": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The thickness of the component along the axis perpendicular to the building envelope. It has the units meter." + } + }, + "additionalProperties": false, + "minProperties": 1, + "required": [] + }, + "minItems": 1 + }, + "independent": { + "title": "When the dimensions of a component are defined independent of a specific installation or coordinate system, then the dimensions can only be sorted by their values. The dimensions can be used to define a bounding box which includes all parts of the component.", + "type": "object", + "properties": { + "smallest": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The smallest dimension of the component. It has the units meter." + }, + "intermediate": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The dimension of the component which is larger the `smallest` and smaller than `largest`. It has the units meter." + }, + "largest": { + "$ref": "number.json#/$defs/meterWithUncertainty", + "description": "The largest dimension of the component. It has the units meter." + } + }, + "additionalProperties": false, + "minProperties": 1, + "required": [] + } + }, + "additionalProperties": false, + "minProperties": 1, "required": [] }, "origin": { @@ -46,7 +101,10 @@ } }, "additionalProperties": false, - "required": ["latitude", "longitude"] + "required": [ + "latitude", + "longitude" + ] }, "location": { "title": "The location of the center of mass of the component.", @@ -66,7 +124,10 @@ } }, "additionalProperties": false, - "required": ["east", "north"] + "required": [ + "east", + "north" + ] }, "orientation": { "title": "The orientation of the prime surface of the component.", @@ -86,7 +147,10 @@ } }, "additionalProperties": false, - "required": ["azimuth", "componentTilt"] + "required": [ + "azimuth", + "componentTilt" + ] }, "assembly": { "title": "An assembly of components where each item of the array defines one component of the assembly. Note that one component can either consist of a single component or of an assembly of components.", @@ -121,14 +185,18 @@ }, "additionalProperties": false, "minProperties": 1, - "required": ["id"] + "required": [ + "id" + ] }, "minItems": 2 } }, "additionalProperties": false, "minProperties": 1, - "required": ["assemblyList"] + "required": [ + "assemblyList" + ] }, "point": { "title": "A point according to the definition of a coordinate system elsewhere.", @@ -145,7 +213,11 @@ } }, "additionalProperties": false, - "required": ["x", "y", "z"] + "required": [ + "x", + "y", + "z" + ] }, "vector": { "title": "A geometric vector according to the definition of a coordinate system elsewhere.", @@ -162,7 +234,11 @@ } }, "additionalProperties": false, - "required": ["x", "y", "z"] + "required": [ + "x", + "y", + "z" + ] }, "coordinateSystem": { "title": "Definition of the coordinate system of the data set", @@ -205,7 +281,10 @@ } }, "additionalProperties": false, - "required": ["uDirection", "vDirection"] + "required": [ + "uDirection", + "vDirection" + ] }, "nurbsBoundedCurve": { "title": "A non-uniform rational B-spline (NURBS) is a very general way to define a curve.", @@ -236,7 +315,9 @@ } }, "additionalProperties": false, - "required": ["weights"] + "required": [ + "weights" + ] } ], "minItems": 2, @@ -256,7 +337,11 @@ } }, "additionalProperties": false, - "required": ["degree", "controlPoints", "knots"] + "required": [ + "degree", + "controlPoints", + "knots" + ] }, "body": { "type": "object", @@ -273,61 +358,7 @@ }, "additionalProperties": false, "required": [] - }, - "dimensions": { - "type": "object", - "properties": { - "installed": { - "title": "This geometric definition of the dimensions refers to the installation of the component in a building envelope and a view perpendicular to the building envelope. The dimensions can be used to define a bounding box which includes all parts of the component. If a component can be installed in different ways, more than one set of dimensions can be defined.", - "type": "array", - "items": { - "type": "object", - "properties": { - "height": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The height of the component along the vertical axis of the building envelope. It has the units meter." - }, - "width": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The width of the component along the horizontal axis of the building envelope. It has the units meter." - }, - "thickness": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The thickness of the component along the axis perpendicular to the building envelope. It has the units meter." - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": [] - }, - "minItems": 1 - }, - "independent": { - "title": "When the dimensions of a component are defined independent of a specific installation or coordinate system, then the dimensions can only be sorted by their values. The dimensions can be used to define a bounding box which includes all parts of the component.", - "type": "object", - "properties": { - "smallest": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The smallest dimension of the component. It has the units meter." - }, - "intermediate": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The dimension of the component which is larger the `smallest` and smaller than `largest`. It has the units meter." - }, - "largest": { - "$ref": "number.json#/$defs/meterWithUncertainty", - "description": "The largest dimension of the component. It has the units meter." - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": [] - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": [] } }, "$ref": "#/$defs/data" -} +} \ No newline at end of file From b8e309cc0eacfb4320fd1ca54952acbdfff71220 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Thu, 20 Jun 2024 10:16:11 +0200 Subject: [PATCH 17/19] Improve the geometric definition of `assembly` and subcomponents. --- schemas/geometricData.json | 384 ++++++++++++++++++------------------- 1 file changed, 190 insertions(+), 194 deletions(-) diff --git a/schemas/geometricData.json b/schemas/geometricData.json index 36a41e9a..83977820 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -23,6 +23,10 @@ "orientation": { "$ref": "#/$defs/orientation", "description": "The orientation of the prime surface of the component." + }, + "assembly": { + "$ref": "#/$defs/orientation", + "description": "The geometry of the subcomponents." } }, "additionalProperties": false, @@ -153,212 +157,204 @@ ] }, "assembly": { - "title": "An assembly of components where each item of the array defines one component of the assembly. Note that one component can either consist of a single component or of an assembly of components.", - "type": "object", - "properties": { - "origin": { - "$ref": "#/$defs/origin", - "description": "The origin of the coordinate system which is used by `assemblyList/location`." - }, - "assemblyList": { - "title": "The subcomponents which are used for this assembly.", - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "$ref": "identifier.json#/$defs/centralOrDecentral", - "description": "The id represents a specific component of the assembly." - }, - "dimensions": { - "$ref": "#/$defs/dimensions", - "description": "Height, width and depth of the component." - }, - "location": { - "$ref": "#/$defs/location", - "description": "The location of the center of mass of the component." - }, - "orientation": { - "$ref": "#/$defs/orientation", - "description": "The orientation of the prime surface of the component." - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": [ - "id" - ] + "title": "The geometry of the subcomponents which are used for this assembly.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$ref": "identifier.json#/$defs/centralOrDecentral", + "description": "The id represents a specific component of the assembly." }, - "minItems": 2 - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": [ - "assemblyList" - ] - }, - "point": { - "title": "A point according to the definition of a coordinate system elsewhere.", - "type": "object", - "properties": { - "x": { - "$ref": "number.json#/$defs/meter" - }, - "y": { - "$ref": "number.json#/$defs/meter" + "dimensions": { + "$ref": "#/$defs/dimensions", + "description": "Height, width and depth of the component." + }, + "location": { + "$ref": "#/$defs/location", + "description": "The location of the center of mass of the component." + }, + "orientation": { + "$ref": "#/$defs/orientation", + "description": "The orientation of the prime surface of the component." + } }, - "z": { - "$ref": "number.json#/$defs/meter" - } + "additionalProperties": false, + "minProperties": 1, + "required": [ + "id" + ] }, - "additionalProperties": false, - "required": [ - "x", - "y", - "z" - ] + "minItems": 2 + } + }, + "additionalProperties": false, + "minProperties": 1, + "required": [ + "assemblyList" + ] +}, +"point": { + "title": "A point according to the definition of a coordinate system elsewhere.", + "type": "object", + "properties": { + "x": { + "$ref": "number.json#/$defs/meter" }, - "vector": { - "title": "A geometric vector according to the definition of a coordinate system elsewhere.", - "type": "object", - "properties": { - "x": { - "$ref": "number.json#/$defs/meter" - }, - "y": { - "$ref": "number.json#/$defs/meter" - }, - "z": { - "$ref": "number.json#/$defs/meter" - } - }, - "additionalProperties": false, - "required": [ - "x", - "y", - "z" - ] + "y": { + "$ref": "number.json#/$defs/meter" }, - "coordinateSystem": { - "title": "Definition of the coordinate system of the data set", - "type": "object", - "properties": { - "reference": { - "$ref": "common.json#/$defs/reference", - "description": "The coordinate system needs to be well defined. If no suitable reference exists, please create a new publication in the database." - }, - "categories": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "cartesian", - "cylindrical", - "leftHanded", - "polar", - "rightHanded", - "spherical" - ], - "description": "Often, a right-handed cartesian coordinate system is used." - }, - "uniqueItems": true, - "minItems": 1 - } - }, - "additionalProperties": false, - "required": [] + "z": { + "$ref": "number.json#/$defs/meter" + } + }, + "additionalProperties": false, + "required": [ + "x", + "y", + "z" + ] +}, +"vector": { + "title": "A geometric vector according to the definition of a coordinate system elsewhere.", + "type": "object", + "properties": { + "x": { + "$ref": "number.json#/$defs/meter" }, - "nurbsBoundedSurface": { - "title": "A non-uniform rational B-spline (NURBS) surface is a very general way to define a surface. It is created by two NURBS curves.", - "type": "object", - "properties": { - "uDirection": { - "$ref": "#/$defs/nurbsBoundedCurve" - }, - "vDirection": { - "$ref": "#/$defs/nurbsBoundedCurve" - } + "y": { + "$ref": "number.json#/$defs/meter" + }, + "z": { + "$ref": "number.json#/$defs/meter" + } + }, + "additionalProperties": false, + "required": [ + "x", + "y", + "z" + ] +}, +"coordinateSystem": { + "title": "Definition of the coordinate system of the data set", + "type": "object", + "properties": { + "reference": { + "$ref": "common.json#/$defs/reference", + "description": "The coordinate system needs to be well defined. If no suitable reference exists, please create a new publication in the database." + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "cartesian", + "cylindrical", + "leftHanded", + "polar", + "rightHanded", + "spherical" + ], + "description": "Often, a right-handed cartesian coordinate system is used." }, - "additionalProperties": false, - "required": [ - "uDirection", - "vDirection" - ] + "uniqueItems": true, + "minItems": 1 + } + }, + "additionalProperties": false, + "required": [] +}, +"nurbsBoundedSurface": { + "title": "A non-uniform rational B-spline (NURBS) surface is a very general way to define a surface. It is created by two NURBS curves.", + "type": "object", + "properties": { + "uDirection": { + "$ref": "#/$defs/nurbsBoundedCurve" }, - "nurbsBoundedCurve": { - "title": "A non-uniform rational B-spline (NURBS) is a very general way to define a curve.", - "type": "object", - "properties": { - "degree": { - "type": "integer", - "minimum": 1, - "maximum": 10, - "description": "The degree of a NURBS curve defines the polynomial degree of the basis functions of the curve. For degree=1, the curve is a linear interpolation between the control points." - }, - "controlPoints": { - "title": "The control points have a strong influence on the shape of the curve.", - "type": "array", - "items": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/$defs/point", - "description": "If the curve is 3D, the 3D points are appropriate. For 2D curves, the value for the z-axis should be 0." - }, - { - "type": "object", - "properties": { - "weights": { - "type": "number", - "description": "The weight of a control points determines its influences on the shape of the curve." - } - }, - "additionalProperties": false, - "required": [ - "weights" - ] - } - ], - "minItems": 2, - "items": false - }, - "minItems": 2, - "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." - }, - "knots": { - "type": "array", - "items": { - "type": "number", - "description": "Each knot is a number which is either equal or larger than the preceding knot. Although usually the control points are used to shape the curve, the knots could also be used for this purpose. The first and last knot are usually repeated so that the curve ends exactly at these points." + "vDirection": { + "$ref": "#/$defs/nurbsBoundedCurve" + } + }, + "additionalProperties": false, + "required": [ + "uDirection", + "vDirection" + ] +}, +"nurbsBoundedCurve": { + "title": "A non-uniform rational B-spline (NURBS) is a very general way to define a curve.", + "type": "object", + "properties": { + "degree": { + "type": "integer", + "minimum": 1, + "maximum": 10, + "description": "The degree of a NURBS curve defines the polynomial degree of the basis functions of the curve. For degree=1, the curve is a linear interpolation between the control points." + }, + "controlPoints": { + "title": "The control points have a strong influence on the shape of the curve.", + "type": "array", + "items": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/$defs/point", + "description": "If the curve is 3D, the 3D points are appropriate. For 2D curves, the value for the z-axis should be 0." }, - "minItems": 2, - "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." - } + { + "type": "object", + "properties": { + "weights": { + "type": "number", + "description": "The weight of a control points determines its influences on the shape of the curve." + } + }, + "additionalProperties": false, + "required": [ + "weights" + ] + } + ], + "minItems": 2, + "items": false }, - "additionalProperties": false, - "required": [ - "degree", - "controlPoints", - "knots" - ] + "minItems": 2, + "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." }, - "body": { - "type": "object", - "properties": { - "brep": { - "title": "Boundary representation (brep) defines a component by the surfaces between solid and non-solid.", - "type": "array", - "items": { - "$ref": "#/$defs/nurbsBoundedSurface" - }, - "minItems": 1, - "description": "This array lists all surfaces between solid and non-solid of the component." - } + "knots": { + "type": "array", + "items": { + "type": "number", + "description": "Each knot is a number which is either equal or larger than the preceding knot. Although usually the control points are used to shape the curve, the knots could also be used for this purpose. The first and last knot are usually repeated so that the curve ends exactly at these points." }, - "additionalProperties": false, - "required": [] + "minItems": 2, + "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." + } + }, + "additionalProperties": false, + "required": [ + "degree", + "controlPoints", + "knots" + ] +}, +"body": { + "type": "object", + "properties": { + "brep": { + "title": "Boundary representation (brep) defines a component by the surfaces between solid and non-solid.", + "type": "array", + "items": { + "$ref": "#/$defs/nurbsBoundedSurface" + }, + "minItems": 1, + "description": "This array lists all surfaces between solid and non-solid of the component." } }, - "$ref": "#/$defs/data" + "additionalProperties": false, + "required": [] +} +}, +"$ref": "#/$defs/data" } \ No newline at end of file From 02a9c019e66db6a382fc2d5798da9cde82c41bf2 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Thu, 20 Jun 2024 11:38:37 +0200 Subject: [PATCH 18/19] Create tests for geometric data --- schemas/geometricData.json | 313 +++++++++--------- ...fieldSolarElementsAsGeometricAssembly.json | 44 +++ .../geometricData/thicknessGlassPane.json | 9 + 3 files changed, 206 insertions(+), 160 deletions(-) create mode 100644 tests/valid/geometricData/fieldSolarElementsAsGeometricAssembly.json create mode 100644 tests/valid/geometricData/thicknessGlassPane.json diff --git a/schemas/geometricData.json b/schemas/geometricData.json index 83977820..9c273773 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -25,7 +25,7 @@ "description": "The orientation of the prime surface of the component." }, "assembly": { - "$ref": "#/$defs/orientation", + "$ref": "#/$defs/assembly", "description": "The geometry of the subcomponents." } }, @@ -186,175 +186,168 @@ ] }, "minItems": 2 - } - }, - "additionalProperties": false, - "minProperties": 1, - "required": [ - "assemblyList" - ] -}, -"point": { - "title": "A point according to the definition of a coordinate system elsewhere.", - "type": "object", - "properties": { - "x": { - "$ref": "number.json#/$defs/meter" - }, - "y": { - "$ref": "number.json#/$defs/meter" - }, - "z": { - "$ref": "number.json#/$defs/meter" - } - }, - "additionalProperties": false, - "required": [ - "x", - "y", - "z" - ] -}, -"vector": { - "title": "A geometric vector according to the definition of a coordinate system elsewhere.", - "type": "object", - "properties": { - "x": { - "$ref": "number.json#/$defs/meter" }, - "y": { - "$ref": "number.json#/$defs/meter" + "point": { + "title": "A point according to the definition of a coordinate system elsewhere.", + "type": "object", + "properties": { + "x": { + "$ref": "number.json#/$defs/meter" + }, + "y": { + "$ref": "number.json#/$defs/meter" + }, + "z": { + "$ref": "number.json#/$defs/meter" + } + }, + "additionalProperties": false, + "required": [ + "x", + "y", + "z" + ] }, - "z": { - "$ref": "number.json#/$defs/meter" - } - }, - "additionalProperties": false, - "required": [ - "x", - "y", - "z" - ] -}, -"coordinateSystem": { - "title": "Definition of the coordinate system of the data set", - "type": "object", - "properties": { - "reference": { - "$ref": "common.json#/$defs/reference", - "description": "The coordinate system needs to be well defined. If no suitable reference exists, please create a new publication in the database." + "vector": { + "title": "A geometric vector according to the definition of a coordinate system elsewhere.", + "type": "object", + "properties": { + "x": { + "$ref": "number.json#/$defs/meter" + }, + "y": { + "$ref": "number.json#/$defs/meter" + }, + "z": { + "$ref": "number.json#/$defs/meter" + } + }, + "additionalProperties": false, + "required": [ + "x", + "y", + "z" + ] }, - "categories": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "cartesian", - "cylindrical", - "leftHanded", - "polar", - "rightHanded", - "spherical" - ], - "description": "Often, a right-handed cartesian coordinate system is used." + "coordinateSystem": { + "title": "Definition of the coordinate system of the data set", + "type": "object", + "properties": { + "reference": { + "$ref": "common.json#/$defs/reference", + "description": "The coordinate system needs to be well defined. If no suitable reference exists, please create a new publication in the database." + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "cartesian", + "cylindrical", + "leftHanded", + "polar", + "rightHanded", + "spherical" + ], + "description": "Often, a right-handed cartesian coordinate system is used." + }, + "uniqueItems": true, + "minItems": 1 + } }, - "uniqueItems": true, - "minItems": 1 - } - }, - "additionalProperties": false, - "required": [] -}, -"nurbsBoundedSurface": { - "title": "A non-uniform rational B-spline (NURBS) surface is a very general way to define a surface. It is created by two NURBS curves.", - "type": "object", - "properties": { - "uDirection": { - "$ref": "#/$defs/nurbsBoundedCurve" + "additionalProperties": false, + "required": [] }, - "vDirection": { - "$ref": "#/$defs/nurbsBoundedCurve" - } - }, - "additionalProperties": false, - "required": [ - "uDirection", - "vDirection" - ] -}, -"nurbsBoundedCurve": { - "title": "A non-uniform rational B-spline (NURBS) is a very general way to define a curve.", - "type": "object", - "properties": { - "degree": { - "type": "integer", - "minimum": 1, - "maximum": 10, - "description": "The degree of a NURBS curve defines the polynomial degree of the basis functions of the curve. For degree=1, the curve is a linear interpolation between the control points." + "nurbsBoundedSurface": { + "title": "A non-uniform rational B-spline (NURBS) surface is a very general way to define a surface. It is created by two NURBS curves.", + "type": "object", + "properties": { + "uDirection": { + "$ref": "#/$defs/nurbsBoundedCurve" + }, + "vDirection": { + "$ref": "#/$defs/nurbsBoundedCurve" + } + }, + "additionalProperties": false, + "required": [ + "uDirection", + "vDirection" + ] }, - "controlPoints": { - "title": "The control points have a strong influence on the shape of the curve.", - "type": "array", - "items": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/$defs/point", - "description": "If the curve is 3D, the 3D points are appropriate. For 2D curves, the value for the z-axis should be 0." - }, - { - "type": "object", - "properties": { - "weights": { - "type": "number", - "description": "The weight of a control points determines its influences on the shape of the curve." + "nurbsBoundedCurve": { + "title": "A non-uniform rational B-spline (NURBS) is a very general way to define a curve.", + "type": "object", + "properties": { + "degree": { + "type": "integer", + "minimum": 1, + "maximum": 10, + "description": "The degree of a NURBS curve defines the polynomial degree of the basis functions of the curve. For degree=1, the curve is a linear interpolation between the control points." + }, + "controlPoints": { + "title": "The control points have a strong influence on the shape of the curve.", + "type": "array", + "items": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/$defs/point", + "description": "If the curve is 3D, the 3D points are appropriate. For 2D curves, the value for the z-axis should be 0." + }, + { + "type": "object", + "properties": { + "weights": { + "type": "number", + "description": "The weight of a control points determines its influences on the shape of the curve." + } + }, + "additionalProperties": false, + "required": [ + "weights" + ] } - }, - "additionalProperties": false, - "required": [ - "weights" - ] - } - ], - "minItems": 2, - "items": false + ], + "minItems": 2, + "items": false + }, + "minItems": 2, + "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." + }, + "knots": { + "type": "array", + "items": { + "type": "number", + "description": "Each knot is a number which is either equal or larger than the preceding knot. Although usually the control points are used to shape the curve, the knots could also be used for this purpose. The first and last knot are usually repeated so that the curve ends exactly at these points." + }, + "minItems": 2, + "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." + } }, - "minItems": 2, - "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." + "additionalProperties": false, + "required": [ + "degree", + "controlPoints", + "knots" + ] }, - "knots": { - "type": "array", - "items": { - "type": "number", - "description": "Each knot is a number which is either equal or larger than the preceding knot. Although usually the control points are used to shape the curve, the knots could also be used for this purpose. The first and last knot are usually repeated so that the curve ends exactly at these points." - }, - "minItems": 2, - "description": "The number of control points plus the degree plus 1 has to be equal to the number of knots." - } - }, - "additionalProperties": false, - "required": [ - "degree", - "controlPoints", - "knots" - ] -}, -"body": { - "type": "object", - "properties": { - "brep": { - "title": "Boundary representation (brep) defines a component by the surfaces between solid and non-solid.", - "type": "array", - "items": { - "$ref": "#/$defs/nurbsBoundedSurface" + "body": { + "type": "object", + "properties": { + "brep": { + "title": "Boundary representation (brep) defines a component by the surfaces between solid and non-solid.", + "type": "array", + "items": { + "$ref": "#/$defs/nurbsBoundedSurface" + }, + "minItems": 1, + "description": "This array lists all surfaces between solid and non-solid of the component." + } }, - "minItems": 1, - "description": "This array lists all surfaces between solid and non-solid of the component." + "additionalProperties": false, + "required": [] } }, - "additionalProperties": false, - "required": [] -} -}, -"$ref": "#/$defs/data" + "$ref": "#/$defs/data" } \ No newline at end of file diff --git a/tests/valid/geometricData/fieldSolarElementsAsGeometricAssembly.json b/tests/valid/geometricData/fieldSolarElementsAsGeometricAssembly.json new file mode 100644 index 00000000..37e4cef3 --- /dev/null +++ b/tests/valid/geometricData/fieldSolarElementsAsGeometricAssembly.json @@ -0,0 +1,44 @@ +{ + "assembly": [ + { + "id": "cd85554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.1, + "intermediate": 0.9, + "largest": 1.4 + } + }, + "location": { + "east": 5, + "north": 0, + "elevation": 5 + }, + "orientation": { + "azimuth": 180, + "componentTilt": 90, + "rotation": 0 + } + }, + { + "id": "cd95554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.1, + "intermediate": 0.9, + "largest": 1.4 + } + }, + "location": { + "east": 0, + "north": 5, + "elevation": 5 + }, + "orientation": { + "azimuth": 270, + "componentTilt": 90, + "rotation": 0 + } + } + ] +} \ No newline at end of file diff --git a/tests/valid/geometricData/thicknessGlassPane.json b/tests/valid/geometricData/thicknessGlassPane.json new file mode 100644 index 00000000..a6f4407b --- /dev/null +++ b/tests/valid/geometricData/thicknessGlassPane.json @@ -0,0 +1,9 @@ +{ + "dimensions": { + "installed": [ + { + "thickness": 0.004 + } + ] + } +} \ No newline at end of file From a520aa82590bacb0672c7df3e184e815359976e0 Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Thu, 20 Jun 2024 12:27:37 +0200 Subject: [PATCH 19/19] Move examples from "geometry" to "geometric". `make compile examples test` all valid --- .../collectorFieldAsGeometricAssembly.json | 96 ++++++++-------- ...cAssemblyWhichIsPartOfAnotherAssembly.json | 20 ++-- .../assembly/geometricAssemblyWithParent.json | 20 ++-- .../dbe/calorimetric/bistMeasurement.json | 18 ++- .../generalComponents/16mmArgon90air10.json | 34 ++++-- .../dbe/getHttpsResource/dataFormatPdf.json | 46 ++++---- .../dbe/optical/es-sda-example0101layer.json | 61 ++++++++-- .../bipvInverterBuildingNatIse.json | 28 +++-- .../bipvModuleBuildingNatIse.json | 108 ++++++++++-------- .../bipvModuleSunovationGlazingLayer.json | 53 ++++++--- .../bipvModuleSunovationGlazingUnit.json | 48 ++++---- .../bipvModuleSunovationLayer.json | 68 +++++------ .../bipvModuleSunovationUnit.json | 28 ++--- .../photovoltaic/photovoltaicWithOptical.json | 54 ++++----- schemas/geometricData.json | 48 ++------ ...fieldSolarElementsAsGeometricAssembly.json | 2 +- .../geometricData/thicknessGlassPane.json | 2 +- 17 files changed, 411 insertions(+), 323 deletions(-) diff --git a/examples/dbe/assembly/collectorFieldAsGeometricAssembly.json b/examples/dbe/assembly/collectorFieldAsGeometricAssembly.json index cb33f166..1f1f26b9 100644 --- a/examples/dbe/assembly/collectorFieldAsGeometricAssembly.json +++ b/examples/dbe/assembly/collectorFieldAsGeometricAssembly.json @@ -2,61 +2,57 @@ "components": [ { "id": "cd7aed0a-2b9a-4748-8d98-e9d278cd12e4", - "description": "This example represents the solar thermal collectors of a building.", - "characteristics": { - "geometry": { - "origin": { - "latitude": 48.00883171395494, - "longitude": 7.834452327404689, - "elevation": 278 - }, - "definitionOfSurfacesAndPrimeDirections": { - "description": "On each collector, the product number is at the bottom right corner facing the interior. The direction from the bottom to the top in parallel to the largest dimension of the collector is the prime direction. The collector surface facing the exterior is the non-prime surface." - }, - "assemblyList": [ + "description": "This component represents the solar thermal collectors of a building. It is assembled from two subcomponents.", + "geometric": [ + { + "data": [ { - "id": "cd85554f-e909-405e-9b7b-2f08ca201f63", - "dimensions": { - "independent": { - "smallest": 0.1, - "intermediate": 0.9, - "largest": 1.4 + "assembly": [ + { + "id": "cd85554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.1, + "intermediate": 0.9, + "largest": 1.4 + } + }, + "location": { + "east": 5, + "north": 0, + "elevation": 5 + }, + "orientation": { + "azimuth": 180, + "componentTilt": 90, + "rotation": 0 + } + }, + { + "id": "cd95554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.1, + "intermediate": 0.9, + "largest": 1.4 + } + }, + "location": { + "east": 0, + "north": 5, + "elevation": 5 + }, + "orientation": { + "azimuth": 270, + "componentTilt": 90, + "rotation": 0 + } } - }, - "location": { - "east": 5, - "north": 0, - "elevation": 5 - }, - "orientation": { - "azimuth": 180, - "componentTilt": 90, - "rotation": 0 - } - }, - { - "id": "cd95554f-e909-405e-9b7b-2f08ca201f63", - "dimensions": { - "independent": { - "smallest": 0.1, - "intermediate": 0.9, - "largest": 1.4 - } - }, - "location": { - "east": 0, - "north": 5, - "elevation": 5 - }, - "orientation": { - "azimuth": 270, - "componentTilt": 90, - "rotation": 0 - } + ] } ] } - } + ] } ] } diff --git a/examples/dbe/assembly/geometricAssemblyWhichIsPartOfAnotherAssembly.json b/examples/dbe/assembly/geometricAssemblyWhichIsPartOfAnotherAssembly.json index b242ae25..592b44fd 100644 --- a/examples/dbe/assembly/geometricAssemblyWhichIsPartOfAnotherAssembly.json +++ b/examples/dbe/assembly/geometricAssemblyWhichIsPartOfAnotherAssembly.json @@ -10,18 +10,22 @@ "86089938-f045-4039-b41a-76c70db22369" ] }, - "characteristics": { - "geometry": { - "assemblyList": [ + "geometric": [ + { + "data": [ { - "id": "b511af56-891e-4828-a2d1-a4454112e8f8" - }, - { - "id": "86089938-f045-4039-b41a-76c70db22369" + "assembly": [ + { + "id": "b511af56-891e-4828-a2d1-a4454112e8f8" + }, + { + "id": "86089938-f045-4039-b41a-76c70db22369" + } + ] } ] } - } + ] } ] } diff --git a/examples/dbe/assembly/geometricAssemblyWithParent.json b/examples/dbe/assembly/geometricAssemblyWithParent.json index 30b5d03b..aee08ca2 100644 --- a/examples/dbe/assembly/geometricAssemblyWithParent.json +++ b/examples/dbe/assembly/geometricAssemblyWithParent.json @@ -10,18 +10,22 @@ "86089938-f045-4039-b41a-76c70db22369" ] }, - "characteristics": { - "geometry": { - "assemblyList": [ + "geometric": [ + { + "data": [ { - "id": "b511af56-891e-4828-a2d1-a4454112e8f8" - }, - { - "id": "86089938-f045-4039-b41a-76c70db22369" + "assembly": [ + { + "id": "b511af56-891e-4828-a2d1-a4454112e8f8" + }, + { + "id": "86089938-f045-4039-b41a-76c70db22369" + } + ] } ] } - } + ] } ] } diff --git a/examples/dbe/calorimetric/bistMeasurement.json b/examples/dbe/calorimetric/bistMeasurement.json index 7d80da63..75cb1985 100644 --- a/examples/dbe/calorimetric/bistMeasurement.json +++ b/examples/dbe/calorimetric/bistMeasurement.json @@ -3,9 +3,6 @@ { "id": "a99941df-5bb8-4080-89a4-4f3d230afeb6", "characteristics": { - "geometry": { - "dimensions": { "installed": [{ "depth": 0.00023 }] } - }, "definitionOfSurfacesAndPrimeDirection": { "description": "The prime surface faces the interior of the building and the nonPrime surface faces the exterior. The prime direction is indicated by a label on the sample. Facing the installed component from the exterior, the prime direction directs to the right-hand side." } @@ -111,6 +108,21 @@ } ] } + ], + "geometric": [ + { + "data": [ + { + "dimensions": { + "installed": [ + { + "thickness": 0.3 + } + ] + } + } + ] + } ] } ] diff --git a/examples/dbe/generalComponents/16mmArgon90air10.json b/examples/dbe/generalComponents/16mmArgon90air10.json index fefb45cb..51cccd84 100644 --- a/examples/dbe/generalComponents/16mmArgon90air10.json +++ b/examples/dbe/generalComponents/16mmArgon90air10.json @@ -3,26 +3,40 @@ { "id": "18a16000-2b9a-4748-8d98-e9d278cd12e4", "description": "Argon as gas for insulating glazing unit", - "categories": { "componentType": ["layer"] }, + "categories": { + "componentType": ["layer"] + }, "characteristics": { "materialComposition": { "fractionType": "volume", "fractions": [ - { "material": "Ar", "fraction": 90 }, - { "material": "air", "fraction": 10 } + { + "material": "Ar", + "fraction": 90 + }, + { + "material": "air", + "fraction": 10 + } ] }, "material": { "thermalConductivity": 0.017 - }, - "geometry": { - "dimensions": { - "independent": { - "smallest": 0.016 + } + }, + "geometric": [ + { + "data": [ + { + "dimensions": { + "independent": { + "smallest": 0.016 + } + } } - } + ] } - } + ] } ] } diff --git a/examples/dbe/getHttpsResource/dataFormatPdf.json b/examples/dbe/getHttpsResource/dataFormatPdf.json index a133c4ff..bef474c7 100644 --- a/examples/dbe/getHttpsResource/dataFormatPdf.json +++ b/examples/dbe/getHttpsResource/dataFormatPdf.json @@ -3,31 +3,33 @@ { "id": "22aaed0a-2b9a-4748-8d98-e9d278cd12e4", "description": "This example represents the dataFormat PDF used to describe the geometry of a component.", - "characteristics": { - "geometry": { - "getHttpsResource": { - "hashValue": "A1C529341DC538879E61DEE1F95F40FD4A91D1D74C32C1206448DB95F0EBE6BE", - "locator": "https://oc.ise.fraunhofer.de/index.php/s/w9uW4Veh4fWyF1c", - "format": { - "id": "c3306b72-2c4f-4c91-af89-aaeefdba1730", - "timestamp": "2019-09-01T12:00:00+01:00", - "name": "Portable Document Format (PDF)", - "abbreviation": "PDF", - "description": "Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1993 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems.", - "reference": { - "standard": { - "standardizers": ["ISO"], - "numeration": { - "mainNumber": 32000 + "geometric": [ + { + "data": [ + { + "hashValue": "B1C529341DC538879E61DEE1F95F40FD4A91D1D74C32C1206448DB95F0EBE6BE", + "locator": "https://oc.ise.fraunhofer.de/index.php/s/w9uW4Veh4fWyF1c", + "format": { + "id": "c3306b72-2c4f-4c91-af89-aaeefdba1730", + "timestamp": "2019-09-01T12:00:00+01:00", + "name": "Standard for the Exchange of Product model data (STEP)", + "abbreviation": "STEP", + "description": "STEP is a widely used format to exchange computer-aided design (CAD) with 3D objects. It is defined by ISO 10303.", + "reference": { + "standard": { + "standardizers": ["ISO"], + "numeration": { + "mainNumber": 10303 + } } - } + }, + "mediaType": "application/pdf" }, - "mediaType": "application/pdf" - }, - "archivedFilesMetaInformation": [] - } + "archivedFilesMetaInformation": [] + } + ] } - } + ] } ] } diff --git a/examples/dbe/optical/es-sda-example0101layer.json b/examples/dbe/optical/es-sda-example0101layer.json index 83db8478..59d3488f 100644 --- a/examples/dbe/optical/es-sda-example0101layer.json +++ b/examples/dbe/optical/es-sda-example0101layer.json @@ -13,9 +13,11 @@ "relations": { "partOf": ["2c10b6f9-d30c-4896-b0c1-78bcf3b4895c"] }, - "categories": { "componentType": ["layer"], "unit": ["screen"] }, + "categories": { + "componentType": ["layer"], + "unit": ["screen"] + }, "characteristics": { - "geometry": { "dimensions": { "installed": [{ "depth": 0.00023 }] } }, "definitionOfSurfacesAndPrimeDirection": { "description": "The prime surface faces the interior of the building and the nonPrime surface faces the exterior." } @@ -38,7 +40,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "integral": "infrared" } + "wavelengths": { + "integral": "infrared" + } }, "emergence": { "direction": "hemispherical" @@ -53,7 +57,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 280 } + "wavelengths": { + "wavelength": 280 + } }, "emergence": { "direction": { @@ -70,7 +76,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 280 } + "wavelengths": { + "wavelength": 280 + } }, "emergence": { "direction": "diffuse" @@ -85,7 +93,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 285 } + "wavelengths": { + "wavelength": 285 + } }, "emergence": { "direction": { @@ -102,7 +112,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 285 } + "wavelengths": { + "wavelength": 285 + } }, "emergence": { "direction": "diffuse" @@ -133,7 +145,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "integral": "infrared" } + "wavelengths": { + "integral": "infrared" + } }, "emergence": { "direction": "hemispherical" @@ -148,7 +162,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 280 } + "wavelengths": { + "wavelength": 280 + } }, "emergence": { "direction": { @@ -165,7 +181,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 280 } + "wavelengths": { + "wavelength": 280 + } }, "emergence": { "direction": "diffuse" @@ -180,7 +198,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 285 } + "wavelengths": { + "wavelength": 285 + } }, "emergence": { "direction": { @@ -197,7 +217,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 285 } + "wavelengths": { + "wavelength": 285 + } }, "emergence": { "direction": "diffuse" @@ -211,6 +233,21 @@ } ] } + ], + "geometric": [ + { + "data": [ + { + "dimensions": { + "installed": [ + { + "thickness": 0.00023 + } + ] + } + } + ] + } ] } ] diff --git a/examples/dbe/photovoltaic/bipvInverterBuildingNatIse.json b/examples/dbe/photovoltaic/bipvInverterBuildingNatIse.json index 6bd4912d..19d0c527 100644 --- a/examples/dbe/photovoltaic/bipvInverterBuildingNatIse.json +++ b/examples/dbe/photovoltaic/bipvInverterBuildingNatIse.json @@ -8,17 +8,6 @@ "name": "Fronius Galvo 3.0", "description": "This inverter was used in building N at Fraunhofer ISE, Freiburg, Germany.", "characteristics": { - "geometry": { - "dimensions": { - "installed": [ - { - "height": 0.645, - "width": 0.431, - "depth": 0.204 - } - ] - } - }, "weight": 16.8 }, "photovoltaic": [ @@ -94,6 +83,23 @@ } ] } + ], + "geometric": [ + { + "data": [ + { + "dimensions": { + "installed": [ + { + "height": 0.645, + "width": 0.431, + "thickness": 0.204 + } + ] + } + } + ] + } ] } ] diff --git a/examples/dbe/photovoltaic/bipvModuleBuildingNatIse.json b/examples/dbe/photovoltaic/bipvModuleBuildingNatIse.json index 0686b9a5..574488bf 100644 --- a/examples/dbe/photovoltaic/bipvModuleBuildingNatIse.json +++ b/examples/dbe/photovoltaic/bipvModuleBuildingNatIse.json @@ -7,54 +7,6 @@ }, "description": "A photovoltaic data set about one BIPV module of building N at Fraunhofer ISE, Freiburg, Germany. (i) `characteristics/assemblyList` defines the thickness of the front cover, the front embedding, the PV cells, the rear embedding and the backing.", "characteristics": { - "geometry": { - "assemblyList": [ - { - "id": "01f5554f-e909-405e-9b7b-2f08ca201f63", - "dimensions": { - "independent": { - "smallest": 0.0038, - "intermediate": { - "uncertainValue": 1.08, - "uncertainty": 0.01, - "confidenceInterval": 68.3 - }, - "largest": { - "uncertainValue": 1.09, - "uncertainty": 0.01, - "confidenceInterval": 68.3 - } - } - } - }, - { - "id": "02f5554f-e909-405e-9b7b-2f08ca201f63", - "dimensions": { - "independent": { "smallest": 0.002 } - } - }, - { - "id": "03f5554f-e909-405e-9b7b-2f08ca201f63", - - "dimensions": { - "independent": { "smallest": 0.0004 } - } - }, - { - "id": "04f5554f-e909-405e-9b7b-2f08ca201f63", - "dimensions": { - "independent": { "smallest": 0.002 } - } - }, - { - "id": "05f5554f-e909-405e-9b7b-2f08ca201f63", - - "dimensions": { - "independent": { "smallest": 0.002 } - } - } - ] - }, "weight": 29.7 }, "photovoltaic": [ @@ -221,6 +173,66 @@ } ] } + ], + "geometric": [ + { + "data": [ + { + "assembly": [ + { + "id": "01f5554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.0038, + "intermediate": { + "uncertainValue": 1.08, + "uncertainty": 0.01, + "confidenceInterval": 68.3 + }, + "largest": { + "uncertainValue": 1.09, + "uncertainty": 0.01, + "confidenceInterval": 68.3 + } + } + } + }, + { + "id": "02f5554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.002 + } + } + }, + { + "id": "03f5554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.0004 + } + } + }, + { + "id": "04f5554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.002 + } + } + }, + { + "id": "05f5554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.002 + } + } + } + ] + } + ] + } ] } ] diff --git a/examples/dbe/photovoltaic/bipvModuleSunovationGlazingLayer.json b/examples/dbe/photovoltaic/bipvModuleSunovationGlazingLayer.json index a1cfda8f..581db4e4 100644 --- a/examples/dbe/photovoltaic/bipvModuleSunovationGlazingLayer.json +++ b/examples/dbe/photovoltaic/bipvModuleSunovationGlazingLayer.json @@ -11,15 +11,10 @@ "66abed0a-2b9a-4748-8d98-e9d278cd12e4" ] }, - "categories": { "componentType": ["layer"] }, + "categories": { + "componentType": ["layer"] + }, "characteristics": { - "geometry": { - "dimensions": { - "independent": { - "smallest": 0.415 - } - } - }, "roughness": [ { "surface": "nonPrime", @@ -33,7 +28,9 @@ { "results": [ { - "area": { "category": "center" }, + "area": { + "category": "center" + }, "uValue": 1.1, "gValue": { "uncertainValue": 0.5, @@ -54,7 +51,6 @@ "cellTypes": [ { "id": "b0d2b769-74d8-46ab-a3b7-16bb52ac4c60", - "width": 0.156, "categories": ["monocrystalline", "silicon"] } @@ -83,7 +79,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 430 } + "wavelengths": { + "wavelength": 430 + } }, "emergence": { "direction": { @@ -100,7 +98,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 540 } + "wavelengths": { + "wavelength": 540 + } }, "emergence": { "direction": { @@ -117,7 +117,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 570 } + "wavelengths": { + "wavelength": 570 + } }, "emergence": { "direction": { @@ -134,7 +136,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 430 } + "wavelengths": { + "wavelength": 430 + } }, "emergence": { "direction": "hemispherical" @@ -149,7 +153,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 540 } + "wavelengths": { + "wavelength": 540 + } }, "emergence": { "direction": "hemispherical" @@ -164,7 +170,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 570 } + "wavelengths": { + "wavelength": 570 + } }, "emergence": { "direction": "hemispherical" @@ -178,6 +186,19 @@ } ] } + ], + "geometric": [ + { + "data": [ + { + "dimensions": { + "independent": { + "smallest": 0.415 + } + } + } + ] + } ] } ] diff --git a/examples/dbe/photovoltaic/bipvModuleSunovationGlazingUnit.json b/examples/dbe/photovoltaic/bipvModuleSunovationGlazingUnit.json index fdc07288..4cd4cc44 100644 --- a/examples/dbe/photovoltaic/bipvModuleSunovationGlazingUnit.json +++ b/examples/dbe/photovoltaic/bipvModuleSunovationGlazingUnit.json @@ -13,23 +13,8 @@ "66abed0a-2b9a-4748-8d98-e9d278cd12e4" ] }, - "categories": { "componentType": ["unit"] }, - "characteristics": { - "geometry": { - "dimensions": { - "independent": { - "smallest": 0.415, - "intermediate": 1.109, - "largest": 2.488 - } - }, - "getHttpsResource": { - "hashValue": "38A529341DC538879E61DEE1F95F40FD4A91D1D74C32C1206448DB95F0EBE6BE", - "locator": "https://oc.ise.fraunhofer.de/index.php/s/uKe1NBlmmctl070", - "format": { "id": "c3306b72-2c4f-4c91-af89-aaeefdba1730" }, - "archivedFilesMetaInformation": [] - } - } + "categories": { + "componentType": ["unit"] }, "calorimetric": [ { @@ -37,7 +22,9 @@ { "results": [ { - "area": { "category": "outerDimensions" }, + "area": { + "category": "outerDimensions" + }, "uValue": 1.23, "gValue": { "uncertainValue": 0.5, @@ -58,7 +45,6 @@ "cellTypes": [ { "id": "b0d2b769-74d8-46ab-a3b7-16bb52ac4c60", - "width": 0.156, "categories": ["monocrystalline", "silicon"] } @@ -102,7 +88,6 @@ "id": "6a5083af-7bee-491c-b3fd-d6229f6a56ec" } ], - "connectorTypes": [ { "id": "7c43b619-402f-4309-b66f-5672b8ca071d" @@ -152,6 +137,29 @@ } ] } + ], + "geometric": [ + { + "data": [ + { + "dimensions": { + "independent": { + "smallest": 0.415, + "intermediate": 1.109, + "largest": 2.488 + } + } + }, + { + "hashValue": "38A529341DC538879E61DEE1F95F40FD4A91D1D74C32C1206448DB95F0EBE6BE", + "locator": "https://oc.ise.fraunhofer.de/index.php/s/uKe1NBlmmctl070", + "format": { + "id": "c3306b72-2c4f-4c91-af89-aaeefdba1730" + }, + "archivedFilesMetaInformation": [] + } + ] + } ] } ] diff --git a/examples/dbe/photovoltaic/bipvModuleSunovationLayer.json b/examples/dbe/photovoltaic/bipvModuleSunovationLayer.json index eb3e05a4..4968e6b6 100644 --- a/examples/dbe/photovoltaic/bipvModuleSunovationLayer.json +++ b/examples/dbe/photovoltaic/bipvModuleSunovationLayer.json @@ -6,35 +6,8 @@ "relations": { "partOf": ["20aaed0a-2b9a-4748-8d98-e9d278cd12e4"] }, - "categories": { "componentType": ["layer"] }, - "characteristics": { - "geometry": { - "assemblyList": [ - { - "id": "01f5554f-e909-405e-9b7b-2f08ca201f63", - - "dimensions": { - "independent": { - "smallest": 0.004 - } - } - }, - { - "id": "02f5554f-e909-405e-9b7b-2f08ca201f63", - - "dimensions": { - "independent": { "smallest": 0.001 } - } - }, - { - "id": "03f5554f-e909-405e-9b7b-2f08ca201f63", - - "dimensions": { - "independent": { "smallest": 0.008 } - } - } - ] - } + "categories": { + "componentType": ["layer"] }, "photovoltaic": [ { @@ -44,14 +17,11 @@ "cellTypes": [ { "id": "b0d2b769-74d8-46ab-a3b7-16bb52ac4c60", - "width": 0.156, "categories": ["monocrystalline", "silicon"] } ], - "connectionPattern": "series", - "electricConfiguration": { "groundingNecessary": false } @@ -59,6 +29,40 @@ } ] } + ], + "geometric": [ + { + "data": [ + { + "assembly": [ + { + "id": "01f5554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.004 + } + } + }, + { + "id": "02f5554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.001 + } + } + }, + { + "id": "03f5554f-e909-405e-9b7b-2f08ca201f63", + "dimensions": { + "independent": { + "smallest": 0.008 + } + } + } + ] + } + ] + } ] } ] diff --git a/examples/dbe/photovoltaic/bipvModuleSunovationUnit.json b/examples/dbe/photovoltaic/bipvModuleSunovationUnit.json index eddde981..c628b307 100644 --- a/examples/dbe/photovoltaic/bipvModuleSunovationUnit.json +++ b/examples/dbe/photovoltaic/bipvModuleSunovationUnit.json @@ -10,17 +10,6 @@ "102aed0a-2b9a-4748-8d98-e9d278cd12e4" ] }, - "characteristics": { - "geometry": { - "dimensions": { - "independent": { - "smallest": 0.014, - "intermediate": 1.109, - "largest": 2.488 - } - } - } - }, "photovoltaic": [ { "data": [ @@ -29,7 +18,6 @@ "cellTypes": [ { "id": "b0d2b769-74d8-46ab-a3b7-16bb52ac4c60", - "width": 0.156, "categories": ["monocrystalline", "silicon"] } @@ -73,7 +61,6 @@ "id": "6a5083af-7bee-491c-b3fd-d6229f6a56ec" } ], - "connectorTypes": [ { "id": "7c43b619-402f-4309-b66f-5672b8ca071d" @@ -123,6 +110,21 @@ } ] } + ], + "geometric": [ + { + "data": [ + { + "dimensions": { + "independent": { + "smallest": 0.014, + "intermediate": 1.109, + "largest": 2.488 + } + } + } + ] + } ] } ] diff --git a/examples/dbe/photovoltaic/photovoltaicWithOptical.json b/examples/dbe/photovoltaic/photovoltaicWithOptical.json index bafb8e90..1d6548e6 100644 --- a/examples/dbe/photovoltaic/photovoltaicWithOptical.json +++ b/examples/dbe/photovoltaic/photovoltaicWithOptical.json @@ -3,26 +3,10 @@ { "id": "d530ed0a-2b9a-4748-8d98-e9d278cd12e4", "description": "This example represents a double glazing with photovoltaic cells in the laminated glass pane facing the exterior. It includes optical properties which are needed for raytracing simulations.", - "categories": { "componentType": ["unit"] }, + "categories": { + "componentType": ["unit"] + }, "characteristics": { - "geometry": { - "dimensions": { - "independent": { - "smallest": 0.415, - "intermediate": 1.109, - "largest": 2.488 - } - }, - "getHttpsResource": { - "hashValue": "38A529341DC538879E61DEE1F95F40FD4A91D1D74C32C1206448DB95F0EBE6BE", - "locator": "https://oc.ise.fraunhofer.de/index.php/s/w9uW4Veh4fWyF5w", - "format": { "id": "409b7fa3-2b9a-4748-8d98-e9d278cd12e4" }, - "archivedFilesMetaInformation": [] - } - }, - "definitionOfSurfacesAndPrimeDirection": { - "description": "The prime surface faces the interior of the building and the nonPrime surface faces the exterior." - }, "roughness": [ { "surface": "nonPrime", @@ -45,7 +29,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 430 } + "wavelengths": { + "wavelength": 430 + } }, "emergence": { "direction": { @@ -61,7 +47,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 540 } + "wavelengths": { + "wavelength": 540 + } }, "emergence": { "direction": { @@ -77,7 +65,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 570 } + "wavelengths": { + "wavelength": 570 + } }, "emergence": { "direction": { @@ -93,7 +83,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 430 } + "wavelengths": { + "wavelength": 430 + } }, "emergence": { "direction": "hemispherical" @@ -107,7 +99,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 540 } + "wavelengths": { + "wavelength": 540 + } }, "emergence": { "direction": "hemispherical" @@ -121,7 +115,9 @@ "direction": { "polar": 8 }, - "wavelengths": { "wavelength": 570 } + "wavelengths": { + "wavelength": 570 + } }, "emergence": { "direction": "hemispherical" @@ -141,7 +137,9 @@ { "results": [ { - "area": { "category": "outerDimensions" }, + "area": { + "category": "outerDimensions" + }, "uValue": 1.23, "gValue": { "uncertainValue": 0.5, @@ -162,7 +160,6 @@ "cellTypes": [ { "id": "b0d2b769-74d8-46ab-a3b7-16bb52ac4c60", - "width": 0.156, "categories": ["monocrystalline", "silicon"] } @@ -199,16 +196,13 @@ } } ], - "connectionPattern": "series", - "electricConfiguration": { "junctionBoxTypes": [ { "id": "6a5083af-7bee-491c-b3fd-d6229f6a56ec" } ], - "connectorTypes": [ { "id": "7c43b619-402f-4309-b66f-5672b8ca071d" diff --git a/schemas/geometricData.json b/schemas/geometricData.json index 9c273773..04f5a64b 100644 --- a/schemas/geometricData.json +++ b/schemas/geometricData.json @@ -105,10 +105,7 @@ } }, "additionalProperties": false, - "required": [ - "latitude", - "longitude" - ] + "required": ["latitude", "longitude"] }, "location": { "title": "The location of the center of mass of the component.", @@ -128,10 +125,7 @@ } }, "additionalProperties": false, - "required": [ - "east", - "north" - ] + "required": ["east", "north"] }, "orientation": { "title": "The orientation of the prime surface of the component.", @@ -151,10 +145,7 @@ } }, "additionalProperties": false, - "required": [ - "azimuth", - "componentTilt" - ] + "required": ["azimuth", "componentTilt"] }, "assembly": { "title": "The geometry of the subcomponents which are used for this assembly.", @@ -181,9 +172,7 @@ }, "additionalProperties": false, "minProperties": 1, - "required": [ - "id" - ] + "required": ["id"] }, "minItems": 2 }, @@ -202,11 +191,7 @@ } }, "additionalProperties": false, - "required": [ - "x", - "y", - "z" - ] + "required": ["x", "y", "z"] }, "vector": { "title": "A geometric vector according to the definition of a coordinate system elsewhere.", @@ -223,11 +208,7 @@ } }, "additionalProperties": false, - "required": [ - "x", - "y", - "z" - ] + "required": ["x", "y", "z"] }, "coordinateSystem": { "title": "Definition of the coordinate system of the data set", @@ -270,10 +251,7 @@ } }, "additionalProperties": false, - "required": [ - "uDirection", - "vDirection" - ] + "required": ["uDirection", "vDirection"] }, "nurbsBoundedCurve": { "title": "A non-uniform rational B-spline (NURBS) is a very general way to define a curve.", @@ -304,9 +282,7 @@ } }, "additionalProperties": false, - "required": [ - "weights" - ] + "required": ["weights"] } ], "minItems": 2, @@ -326,11 +302,7 @@ } }, "additionalProperties": false, - "required": [ - "degree", - "controlPoints", - "knots" - ] + "required": ["degree", "controlPoints", "knots"] }, "body": { "type": "object", @@ -350,4 +322,4 @@ } }, "$ref": "#/$defs/data" -} \ No newline at end of file +} diff --git a/tests/valid/geometricData/fieldSolarElementsAsGeometricAssembly.json b/tests/valid/geometricData/fieldSolarElementsAsGeometricAssembly.json index 37e4cef3..c69486f0 100644 --- a/tests/valid/geometricData/fieldSolarElementsAsGeometricAssembly.json +++ b/tests/valid/geometricData/fieldSolarElementsAsGeometricAssembly.json @@ -41,4 +41,4 @@ } } ] -} \ No newline at end of file +} diff --git a/tests/valid/geometricData/thicknessGlassPane.json b/tests/valid/geometricData/thicknessGlassPane.json index a6f4407b..84321c6c 100644 --- a/tests/valid/geometricData/thicknessGlassPane.json +++ b/tests/valid/geometricData/thicknessGlassPane.json @@ -6,4 +6,4 @@ } ] } -} \ No newline at end of file +}