-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.ttl
348 lines (296 loc) · 15.7 KB
/
config.ttl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# Copyright (c) 2022,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rep: <http://www.openrdf.org/config/repository#>.
@prefix sr: <http://www.openrdf.org/config/repository/sail#>.
@prefix sail: <http://www.openrdf.org/config/sail#>.
@prefix sp: <http://spinrdf.org/sp#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix json: <https://json-schema.org/draft/2020-12/schema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix cx-fx: <https://w3id.org/catenax/ontology/function#>.
@prefix cx-common: <https://w3id.org/catenax/ontology/common#>.
@prefix cx-prognosis: <https://w3id.org/catenax/ontology/prognosis#>.
@prefix cx-lifetime: <https://w3id.org/catenax/ontology/lifetime#>.
@prefix cx-health: <https://w3id.org/catenax/ontology/health#>.
@prefix cx-rt: <https://w3id.org/catenax/ontology/remoting#>.
@prefix cx-rul: <https://w3id.org/catenax/ontology/rul#>.
[] rdf:type rep:Repository ;
rep:repositoryID "prognosis" ;
rdfs:label "Prognosis Functions" ;
rep:repositoryImpl [
rep:repositoryType "openrdf:SailRepository" ;
sr:sailImpl [
sail:sailType "org.eclipse.tractusx.agents:Remoting" ;
cx-fx:callbackAddress <http://localhost:8888/callback>;
cx-fx:supportsInvocation cx-rt:Test;
cx-fx:supportsInvocation cx-prognosis:Prognosis;
cx-fx:supportsInvocation cx-lifetime:LifetimePrognosis;
cx-fx:supportsInvocation cx-health:HealthIndication;
cx-fx:supportsInvocation cx-rul:RemainingUsefulLife;
]
].
#
# Simple Test Function against internal Java logic
#
cx-rt:Test rdf:type cx-fx:Function;
cx-fx:targetUri "class:org.eclipse.tractusx.agents.remoting.test.TestFunction#test";
cx-fx:input cx-rt:input-1;
cx-fx:input cx-rt:input-2;
cx-fx:result cx-rt:TestResult.
cx-rt:TestResult rdf:type cx-fx:Result;
cx-fx:output cx-rt:output.
cx-rt:input-1 rdf:type cx-fx:Argument;
cx-fx:argumentName "arg0".
cx-rt:input-2 rdf:type cx-fx:Argument;
cx-fx:argumentName "arg1".
cx-rt:output rdf:type cx-fx:ReturnValue;
cx-fx:valuePath "";
cx-fx:dataType xsd:int.
#
# Remote Test Function against public service
#
cx-prognosis:Prognosis rdf:type cx-fx:Function;
dcterms:description "Prognosis is a sample simulation function with input and output bindings."@en ;
dcterms:title "Prognosis" ;
cx-fx:targetUri "https://api.agify.io";
cx-fx:input cx-prognosis:name;
cx-fx:result cx-prognosis:hasResult.
cx-prognosis:hasResult rdf:type cx-fx:Result;
cx-fx:output cx-prognosis:prediction;
cx-fx:output cx-prognosis:support.
cx-prognosis:name rdf:type cx-fx:Argument;
dcterms:description "Name is an argument to the Prognosis function."@en ;
dcterms:title "Name";
cx-fx:argumentName "name".
cx-prognosis:prediction rdf:type cx-fx:ReturnValue;
dcterms:description "Prediction (Value) is an integer-based output of the Prognosis function."@en ;
dcterms:title "Prediction" ;
cx-fx:valuePath "age";
cx-fx:dataType xsd:int.
cx-prognosis:support rdf:type cx-fx:ReturnValue;
dcterms:description "Support (Value) is another integer-based output of the Prognosis function."@en ;
dcterms:title "Support" ;
cx-fx:valuePath "count";
cx-fx:dataType xsd:int.
#
# Complex Remoting Test Function
#
cx-lifetime:LifetimePrognosis rdf:type cx-fx:Function;
dcterms:description "Lifetime Prognosis is a simulation function operating on load collectives."@en ;
dcterms:title "Lifetime Prognosis" ;
cx-fx:targetUri "http://tiera-backend:5005/api/rul";
cx-fx:invocationMethod "POST-JSON-MF";
cx-fx:input cx-lifetime:loadCollectiveFile;
cx-fx:input cx-lifetime:loadCollectiveHeader;
cx-fx:input cx-lifetime:loadCollectiveBody;
cx-fx:input cx-lifetime:loadCollectiveComponent;
cx-fx:input cx-lifetime:loadCollectiveMileage;
cx-fx:input cx-lifetime:loadCollectiveRegistrationDate;
cx-fx:result cx-lifetime:LifetimeResult.
cx-lifetime:LifetimeResult rdf:type cx-fx:Function;
dcterms:description "Lifetime Prognosis Result is a RUL projection."@en ;
dcterms:title "Lifetime Prognosis Result" ;
cx-fx:output cx-lifetime:remainingDistance;
cx-fx:output cx-lifetime:remainingTime.
cx-lifetime:loadCollectiveFile rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a file description."@en ;
dcterms:title "Load Collective File";
cx-fx:argumentName "load_collective_file.File".
cx-lifetime:loadCollectiveHeader rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a header which describes the gathered data and dimensions."@en ;
dcterms:title "Load Collective Header";
cx-fx:argumentName "load_collective_file.Header".
cx-lifetime:loadCollectiveBody rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a body with the raw measurements."@en ;
dcterms:title "Load Collective Body";
cx-fx:argumentName "load_collective_file.Body".
cx-lifetime:loadCollectiveComponent rdf:type cx-fx:Argument;
dcterms:description "A Load Collective needs metadata about the forecasted component."@en ;
dcterms:title "Load Collective Component Metadata";
cx-fx:argumentName "load_collective_file.Metadata.Component".
cx-lifetime:loadCollectiveMileage rdf:type cx-fx:Argument;
dcterms:description "A Load Collective needs metadata about the mileage of the embedding vehicle."@en ;
dcterms:title "Load Collective Mileage Metadata";
cx-fx:argumentName "load_collective_file.Metadata.Mileage".
cx-lifetime:loadCollectiveRegistrationDate rdf:type cx-fx:Argument;
dcterms:description "A Load Collective needs metadata about the registration date of the vehicle."@en ;
dcterms:title "Load Collective Registration Date Metadata";
cx-fx:argumentName "load_collective_file.Metadata.RegistrationDate".
cx-lifetime:remainingDistance rdf:type cx-fx:ReturnValue;
dcterms:description "Remaining Distance is an integer-based prediction of kilometers."@en ;
dcterms:title "Remaining Distance" ;
cx-fx:valuePath "RUL.RUL.remainingDistance.Value";
cx-fx:dataType xsd:int.
cx-lifetime:remainingTime rdf:type cx-fx:ReturnValue;
dcterms:description "Remaining Time is an integer-based prediction of years."@en ;
dcterms:title "Remaining Time" ;
cx-fx:valuePath "RUL.RUL.remainingTime.Value";
cx-fx:dataType xsd:int.
#
# Complex Batch Remoting Test Function
#
cx-health:HealthIndication rdf:type cx-fx:Function;
dcterms:description "Health Indication is an evaluation function operating on batches of load collectives and adaptive values."@en ;
dcterms:title "Health Indication" ;
cx-fx:targetUri "http://service-backend:5005/api/hi";
cx-fx:invocationMethod "POST-JSON-MF";
cx-fx:batch "100"^^xsd:long;
cx-fx:inputProperty "hi_input.healthIndicatorInputs";
cx-fx:invocationIdProperty "requestRefId";
cx-fx:input cx-health:requestComponentId;
cx-fx:input cx-health:classifiedLoadCollectiveProjectDescription;
cx-fx:input cx-health:classifiedLoadCollectiveComponentDescription;
cx-fx:input cx-health:classifiedLoadCollectiveCountingValue;
cx-fx:input cx-health:classifiedLoadCollectiveCountingMethod;
cx-fx:input cx-health:classifiedLoadCollectiveCountingUnit;
cx-fx:input cx-health:classifiedLoadCollectiveChannels;
cx-fx:input cx-health:classifiedLoadCollectiveCounts;
cx-fx:input cx-health:classifiedLoadCollectiveClasses;
cx-fx:input cx-health:adaptionValueVersion;
cx-fx:input cx-health:adaptionValueTimestamp;
cx-fx:input cx-health:adaptionValueMileage;
cx-fx:input cx-health:adaptionValueOperatingTime;
cx-fx:input cx-health:adaptionValueList;
cx-fx:result cx-health:HealthIndicator.
cx-health:HealthIndicator rdf:type cx-fx:Result;
dcterms:description "Health Indicator is part of a indicator batch."@en ;
dcterms:title "Health Indicator" ;
cx-fx:outputProperty "healthIndicatorOutputs";
cx-fx:resultIdProperty "componentId";
cx-fx:correlationInput cx-health:requestComponentId;
cx-fx:output cx-health:indicatorVersion;
cx-fx:output cx-health:responseComponentId;
cx-fx:output cx-health:healthIndicatorValues.
cx-health:requestComponentId rdf:type cx-fx:Argument;
dcterms:description "A Health Indicator Input relates to a component."@en ;
dcterms:title "Health Indicator Component Id";
cx-fx:argumentName "componentId".
cx-health:classifiedLoadCollectiveProjectDescription rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a project description."@en ;
dcterms:title "Classified Load Collective Project Description";
cx-fx:argumentName "classifiedLoadCollective.metadata.projectDescription".
cx-health:classifiedLoadCollectiveComponentDescription rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a component description."@en ;
dcterms:title "Classified Load Collective Component Description";
cx-fx:argumentName "classifiedLoadCollective.metadata.componentDescription".
cx-health:classifiedLoadCollectiveCountingValue rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a value for the counting dimension."@en ;
dcterms:title "Classified Load Collective Counting Value";
cx-fx:mandatory "false"^^xsd:boolean;
cx-fx:argumentName "classifiedLoadCollective.header.countingValue".
cx-health:classifiedLoadCollectiveCountingUnit rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a unit for the counting dimension."@en ;
dcterms:title "Classified Load Collective Counting Unit";
cx-fx:argumentName "classifiedLoadCollective.header.countingUnit".
cx-health:classifiedLoadCollectiveCountingMethod rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a method for the counting dimension."@en ;
dcterms:title "Classified Load Collective Counting Method";
cx-fx:argumentName "classifiedLoadCollective.header.countingMethod".
cx-health:classifiedLoadCollectiveChannels rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has descriptors for all channels."@en ;
dcterms:title "Classified Load Collective Channels";
cx-fx:argumentName "classifiedLoadCollective.header.channels".
cx-health:classifiedLoadCollectiveCounts rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a body with the raw measurements."@en ;
dcterms:title "Classified Load Collective Counts";
cx-fx:argumentName "classifiedLoadCollective.body.counts".
cx-health:classifiedLoadCollectiveClasses rdf:type cx-fx:Argument;
dcterms:description "A Load Collective has a body with the class indices."@en ;
dcterms:title "Classified Load Collective Classes";
cx-fx:argumentName "classifiedLoadCollective.body.classes".
cx-health:adaptionValueVersion rdf:type cx-fx:Argument;
dcterms:description "A Health Indicator Adaption needs a version."@en ;
dcterms:title "Adaption Value List Version";
cx-fx:argumentName "adaptionValueList.version".
cx-health:adaptionValueTimestamp rdf:type cx-fx:Argument;
dcterms:description "A Health Indicator Adaption needs a timestamp."@en ;
dcterms:title "Adaption Value List Timestamp";
cx-fx:argumentName "adaptionValueList.timestamp".
cx-health:adaptionValueMileage rdf:type cx-fx:Argument;
dcterms:description "A Health Indicator Adaption needs a mileage of the embedding vehicle."@en ;
dcterms:title "Adaption Value List Mileage";
cx-fx:argumentName "adaptionValueList.mileage_km".
cx-health:adaptionValueOperatingTime rdf:type cx-fx:Argument;
dcterms:description "A Health Indicator Adaption needs an operating time of the embedding vehicle."@en ;
dcterms:title "Adaption Value List Operating Time";
cx-fx:argumentName "adaptionValueList.operatingtime_s".
cx-health:adaptionValueList rdf:type cx-fx:Argument;
dcterms:description "A Health Indicator Adaption needs an array of adaption values."@en ;
dcterms:title "Adaption Value List Values";
cx-fx:argumentName "adaptionValueList.values".
cx-health:indicatorVersion rdf:type cx-fx:ReturnValue;
dcterms:description "Version of the health indicator prognosis."@en ;
dcterms:title "Health Indicator Prognosis Version" ;
cx-fx:valuePath "version";
cx-fx:dataType xsd:string.
cx-health:responseComponentId rdf:type cx-fx:ReturnValue;
dcterms:description "Component Id of the health indicator prognosis."@en ;
dcterms:title "Health Indicator Prognosis Component Id" ;
cx-fx:valuePath "componentId";
cx-fx:dataType xsd:string.
cx-health:healthIndicatorValues rdf:type cx-fx:ReturnValue;
dcterms:description "Health Indicator Values are percentages."@en ;
dcterms:title "Health Indicator Values" ;
cx-fx:valuePath "healthIndicatorValues";
cx-fx:dataType json:Object.
#
# Asynchronous Group Batch Remoting Test Function
#
cx-rul:RemainingUsefulLife rdf:type cx-fx:Function;
dcterms:description "Remaining Useful Life is an asynchronous batch invocation."@en ;
dcterms:title "Remaining Useful Life" ;
cx-fx:targetUri "http://localhost:8888/async";
cx-common:authenticationKey "Authorization";
cx-common:authenticationCode "Basic ufghgfs";
cx-fx:invocationMethod "POST-JSON";
cx-fx:invocationIdProperty "header.notificationID,content.requestRefId";
cx-fx:callbackProperty "header.respondAssetId";
cx-fx:input cx-rul:notification;
cx-fx:input cx-rul:component;
cx-fx:input cx-rul:observationType;
cx-fx:result cx-rul:response.
cx-rul:notification rdf:type cx-fx:Argument;
dcterms:description "A default notification output template."@en ;
dcterms:title "Notification Template";
cx-fx:argumentName ".";
cx-fx:dataType json:Object;
cx-fx:priority "-1"^^xsd:integer;
cx-fx:default "{ \"header\": { \"notificationID\": \"98f507d5-175d-4945-8d06-6aa1fcef9a0c\", \"senderBPN\": \"BPN0000SUPPLIER\", \"senderAddress\": \"edcs://supplier.com/edc\", \"recipientAddress\": \"https://supplier.com/edc\", \"recipientBPN\": \"BPN0000SUPPLIER\", \"severity\": \"MINOR\", \"status\": \"SENT\", \"targetDate\": \"2022-11-24T22:07:02.611048800Z\", \"timeStamp\": \"2022-11-24T11:24:36.744320Z\", \"classification\": \"RemainingUsefulLifePredictor\",\"respondAssetId\": \"http://knowledgeagent/response\" }, \"content\": { \"requestRefId\": \"98f507d5-175d-4945-8d06-6aa1fcef9a0c\", \"endurancePredictorInputs\": []}}"^^json:Object.
cx-rul:component rdf:type cx-fx:Argument;
dcterms:description "The predicted component."@en ;
dcterms:title "Component";
cx-fx:argumentName "content.endurancePredictorInputs.0.componentId,content.endurancePredictorInputs.0.classifiedLoadSpectrum{https://w3id.org/catenax/ontology/rul#observationType}.targetComponentID";
cx-fx:formsBatchGroup "true"^^xsd:boolean;
cx-fx:dataType rdfs:Resource.
cx-rul:observationType rdf:type cx-fx:Argument;
dcterms:description "The type of observation made."@en ;
dcterms:title "Observation Type";
cx-fx:strip "#";
cx-fx:argumentName "content.endurancePredictorInputs.0.classifiedLoadSpectrum{https://w3id.org/catenax/ontology/rul#observationType}.metadata.componentDescription";
cx-fx:dataType xsd:string.
cx-rul:response rdf:type cx-fx:Result;
dcterms:description "Health Indicator is part of a indicator batch."@en ;
dcterms:title "Health Indicator" ;
cx-fx:callbackProperty "header.referencedNotificationID";
cx-fx:output cx-rul:content.
cx-rul:content rdf:type cx-fx:ReturnValue;
dcterms:description "A notification response"@en ;
dcterms:title "Notification response" ;
cx-fx:valuePath "content";
cx-fx:dataType json:Object.