Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move geometry from metadata of a component to a domain geometricData #325

Merged
merged 19 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f4fb870
Create geometric.json based on optical.json
christoph-maurer Jun 18, 2024
a3c9a0e
Differ in the title of the schemas between metadata about data sets a…
christoph-maurer Jun 18, 2024
34a34c6
Create 'geometricData.json' based on 'opticalData.json'
christoph-maurer Jun 18, 2024
fa76d67
Copy content of 'geometry.json' to 'geometricData.json'
christoph-maurer Jun 18, 2024
bcfab0d
Delete for 2 reasons: 1. The most important content becomes part of …
christoph-maurer Jun 18, 2024
066ad11
Remove the Level of Development (LOD), because it is not relevant for…
christoph-maurer Jun 19, 2024
9751735
Remove `getHttpsResource` because the separation between BED-JSON and…
christoph-maurer Jun 19, 2024
3fa50ab
Remove `definitionOfSurfacesAndPrimeDirection` from assemmbly because…
christoph-maurer Jun 19, 2024
c767399
`make format`
christoph-maurer Jun 19, 2024
506f5a8
Rename `depth` to `thickness` because this is more common dealing wit…
christoph-maurer Jun 19, 2024
5dcda2b
Add domain `geometricData` to specification `database.graphql`. Inclu…
christoph-maurer Jun 19, 2024
75d8d3d
Move geometry to its domain in `component.json`.
christoph-maurer Jun 19, 2024
9ab30cd
Update reference to `geometricData.json`.
christoph-maurer Jun 19, 2024
29ebb96
`make format`
christoph-maurer Jun 19, 2024
97670b5
Add the domain `geometricData` to the specification `database.graphql`
christoph-maurer Jun 20, 2024
8fa6795
Order the definitions from simple to complex
christoph-maurer Jun 20, 2024
b8e309c
Improve the geometric definition of `assembly` and subcomponents.
christoph-maurer Jun 20, 2024
02a9c01
Create tests for geometric data
christoph-maurer Jun 20, 2024
a520aa8
Move examples from "geometry" to "geometric". `make compile examples …
christoph-maurer Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions apis/database.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ type Query {
locale: Locale
): CalorimetricData!

"""
See `Query#data`.
"""
geometricData(id: Uuid!, timestamp: DateTime, locale: Locale): GeometricData!

"""
See `Query#data`.
"""
Expand Down Expand Up @@ -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`.
"""
Expand Down Expand Up @@ -386,6 +404,15 @@ type Query {
locale: Locale
): Boolean!

"""
See `Query#hasData`.
"""
hasGeometricData(
where: GeometricDataPropositionInput
timestamp: DateTime
locale: Locale
): Boolean!

"""
See `Query#hasData`.
"""
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`.
"""
Expand Down Expand Up @@ -996,6 +1041,16 @@ type CalorimetricDataConnection {
timestamp: DateTime!
}

"""
See `DataConnection`.
"""
type GeometricDataConnection {
edges: [GeometricDataEdge!]!
nodes: [GeometricData!]!
pageInfo: PageInfo!
timestamp: DateTime!
}

"""
See `DataEdge`.
"""
Expand All @@ -1004,6 +1059,14 @@ type CalorimetricDataEdge {
node: CalorimetricData!
}

"""
See `DataEdge`.
"""
type GeometricDataEdge {
cursor: Cursor!
node: GeometricData!
}

"""
Measured, simulated, or calculated data.

Expand Down Expand Up @@ -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!
Expand Down
55 changes: 55 additions & 0 deletions apis/metabase.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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!
Expand Down Expand Up @@ -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
Expand Down
96 changes: 46 additions & 50 deletions examples/dbe/assembly/collectorFieldAsGeometricAssembly.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
]
}
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
]
}
}
]
}
]
}
Loading