From 5dcda2b4ea6c41ab256d346cd1ae9039e372029e Mon Sep 17 00:00:00 2001 From: christoph-maurer Date: Wed, 19 Jun 2024 17:22:04 +0200 Subject: [PATCH] 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 +}