Browse Source

chore: refactor project

Arnaud Vergnet 2 years ago
parent
commit
9776ba727a

+ 1
- 0
.gitignore View File

@@ -1 +1,2 @@
1 1
 target/*
2
+export.ttl

+ 1
- 1
assignments/lab-2.html View File

@@ -35,7 +35,7 @@
35 35
     <p>After having written each functions, run the tests. You can read the code for the tests if you are unsure of what you should do.</p>
36 36
 
37 37
     <h3>Implementing IControlFunctions</h3>
38
-    <p>The controler uses functions from the model, and uses them to enrich the dataset. Once you complete the interface implementation, go to the main function in the Controler class. You must edit some code snippets depending on your environment. </p>
38
+    <p>The controller uses functions from the model, and uses them to enrich the dataset. Once you complete the interface implementation, go to the main function in the Controler class. You must edit some code snippets depending on your environment. </p>
39 39
 
40 40
     <h3>Remarks</h3>
41 41
     This is a purely pedagogical codebase, and its performances are not great: many optimisations could be done. Moreover, the generated knowledge graph is managed in memory only: when the software stops, the knowledge base disappears. <b>Export it if you want to persist it</b>. The bottleneck are queries to the knowledge base, so think about caching.

+ 0
- 476
export.ttl View File

@@ -1,476 +0,0 @@
1
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_03047893_45b5_4b9f_90cb_01eaab27d536>
2
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#SensingDevice> ;
3
-        <http://www.w3.org/2000/01/rdf-schema#label>
4
-                "TemperatureSensor_1@en" ;
5
-        <http://purl.oclc.org/NET/ssnx/ssn#hasOperatingRange>
6
-                <http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_76f08a90_4bfe_4c0b_89f8_4a729587a8aa> .
7
-
8
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Continent>
9
-        a       <http://www.w3.org/2002/07/owl#Class> ;
10
-        <http://www.w3.org/2000/01/rdf-schema#label>
11
-                "Continent@en" , "Continent@fr" ;
12
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
13
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Place> .
14
-
15
-<http://purl.oclc.org/NET/ssnx/ssn#SensingDevice>
16
-        a       <http://www.w3.org/2002/07/owl#Class> .
17
-
18
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#measures>
19
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
20
-        <http://www.w3.org/2000/01/rdf-schema#domain>
21
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#WeatherObservation> ;
22
-        <http://www.w3.org/2000/01/rdf-schema#label>
23
-                "mesure@fr" , "measures@en" ;
24
-        <http://www.w3.org/2000/01/rdf-schema#range>
25
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Parameters> .
26
-
27
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_0021ac01_ffff_4c2f_825b_f785ca896c45>
28
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#SensingDevice> ;
29
-        <http://www.w3.org/2000/01/rdf-schema#label>
30
-                "TemperatureSensor_3@en" ;
31
-        <http://purl.oclc.org/NET/ssnx/ssn#hasOperatingRange>
32
-                <http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_ea074e3d_0263_4210_8567_730d34fe4991> .
33
-
34
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Place>
35
-        a       <http://www.w3.org/2002/07/owl#Class> ;
36
-        <http://www.w3.org/2000/01/rdf-schema#label>
37
-                "Lieu@fr" , "Place@en" .
38
-
39
-<http://www.semanticweb.org/5iss/tp2#OWLDataProperty_83a4c21e_0890_4f57_a7ec_ce2be3515a46>
40
-        a       <http://www.w3.org/2002/07/owl#DatatypeProperty> ;
41
-        <http://www.w3.org/2000/01/rdf-schema#label>
42
-                "a pour maximum@en" .
43
-
44
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#NiceWeather>
45
-        a       <http://www.w3.org/2002/07/owl#Class> ;
46
-        <http://www.w3.org/2000/01/rdf-schema#label>
47
-                "Beau temps@fr" , "Nice Weather@en" ;
48
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
49
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phenomenon> .
50
-
51
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasCapital>
52
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
53
-        <http://www.w3.org/2000/01/rdf-schema#domain>
54
-                "3043c3cfe6c9e26bb1a96a9ea27976f2" ;
55
-        <http://www.w3.org/2000/01/rdf-schema#domain>
56
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Country> ;
57
-        <http://www.w3.org/2000/01/rdf-schema#label>
58
-                "a pour capitale@fr" , "has capital@en" ;
59
-        <http://www.w3.org/2000/01/rdf-schema#range>
60
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#City> ;
61
-        <http://www.w3.org/2002/07/owl#inverseOf>
62
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#isCapital> .
63
-
64
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_b95bbab6_16d9_4238_9ba6_b4c2874a3912>
65
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#City> ;
66
-        <http://www.w3.org/2000/01/rdf-schema#label>
67
-                "Paris@fr" .
68
-
69
-<http://www.w3.org/2002/07/owl#OWLNamedIndividual_2a8dc066_4bd2_454c_a56b_11db9452e7dd>
70
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://www.w3.org/2002/07/owl#Parameter> ;
71
-        <http://www.w3.org/2000/01/rdf-schema#label>
72
-                "Pluviométrie@en" .
73
-
74
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#startsAt>
75
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
76
-        <http://www.w3.org/2000/01/rdf-schema#domain>
77
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phenomenon> ;
78
-        <http://www.w3.org/2000/01/rdf-schema#label>
79
-                "débute à@fr" , "starts at@en" ;
80
-        <http://www.w3.org/2000/01/rdf-schema#range>
81
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Instant> .
82
-
83
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_818bcc98_efa7_4501_b5db_ff9122f2e082>
84
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#Condition> ;
85
-        <http://www.w3.org/2000/01/rdf-schema#comment>
86
-                "Positive temperature range relatively common on earth. Expressed in °C" ;
87
-        <http://www.w3.org/2000/01/rdf-schema#label>
88
-                "Positive earthly temperatures@en" , "Températures positives" ;
89
-        <http://purl.oclc.org/NET/ssnx/ssn#forProperty>
90
-                <http://www.semanticweb.org/seydoux/ontologies/2015/11/untitled-ontology-29#OWLNamedIndividual_2b887a87_5d83_4d70_b7c9_6f8b1c3e54f0> ;
91
-        <http://www.semanticweb.org/5iss/tp2#OWLDataProperty_7c0f8588_780a_4d6e_abe1_6b493059b9fe>
92
-                "0.0^^http://www.w3.org/2001/XMLSchema#float" ;
93
-        <http://www.semanticweb.org/5iss/tp2#OWLDataProperty_83a4c21e_0890_4f57_a7ec_ce2be3515a46>
94
-                "50.0^^http://www.w3.org/2001/XMLSchema#float" .
95
-
96
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_148731a7_7d98_4896_8aa5_41423bb1345f>
97
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#SensorOutput> ;
98
-        <http://www.w3.org/2000/01/rdf-schema#label>
99
-                "Output  T2@en" ;
100
-        <http://purl.oclc.org/NET/ssnx/ssn#isProducedBy>
101
-                <http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_0021ac01_ffff_4c2f_825b_f785ca896c45> .
102
-
103
-<http://purl.oclc.org/NET/ssnx/ssn#Property>
104
-        a       <http://www.w3.org/2002/07/owl#Class> ;
105
-        <http://www.w3.org/2002/07/owl#equivalentClass>
106
-                <http://www.w3.org/2002/07/owl#OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce> .
107
-
108
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_779078ef_da9a_47ac_bb61_59a30ffffa85>
109
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Country> ;
110
-        <http://www.w3.org/2000/01/rdf-schema#label>
111
-                "France@fr" ;
112
-        <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasCapital>
113
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_b95bbab6_16d9_4238_9ba6_b4c2874a3912> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_e51e3974_f657_469e_b7a1_6ebaf4935b6a> .
114
-
115
-<http://www.w3.org/2002/07/owl#Parameter>
116
-        a       <http://www.w3.org/2002/07/owl#Class> ;
117
-        <http://www.w3.org/2000/01/rdf-schema#label>
118
-                "Paramètre observable@en" .
119
-
120
-<http://www.semanticweb.org/5iss/tp2#OWLDataProperty_7c0f8588_780a_4d6e_abe1_6b493059b9fe>
121
-        a       <http://www.w3.org/2002/07/owl#DatatypeProperty> ;
122
-        <http://www.w3.org/2000/01/rdf-schema#label>
123
-                "a pour minimum@en" .
124
-
125
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasLocation>
126
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
127
-        <http://www.w3.org/2000/01/rdf-schema#domain>
128
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#WeatherObservation> ;
129
-        <http://www.w3.org/2000/01/rdf-schema#label>
130
-                "a pour localisation@fr" , "has location@en" ;
131
-        <http://www.w3.org/2000/01/rdf-schema#range>
132
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Place> .
133
-
134
-<http://purl.oclc.org/NET/ssnx/ssn#attachedSystem>
135
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> .
136
-
137
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phenomenon>
138
-        a       <http://www.w3.org/2002/07/owl#Class> ;
139
-        <http://www.w3.org/2000/01/rdf-schema#label>
140
-                "Phénomène@fr" , "Phenomenon@en" .
141
-
142
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#WeatherObservation>
143
-        a       <http://www.w3.org/2002/07/owl#Class> ;
144
-        <http://www.w3.org/2000/01/rdf-schema#label>
145
-                "Observation@fr" , "Observation météo@fr" , "WeatherObservation@en" .
146
-
147
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_f9d9c0b6_f1b8_419f_bb8f_01ea9e5d783e>
148
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#SensingDevice> ;
149
-        <http://www.w3.org/2000/01/rdf-schema#label>
150
-                "TemperatureSensor_2@en" ;
151
-        <http://purl.oclc.org/NET/ssnx/ssn#hasOperatingRange>
152
-                <http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_76f08a90_4bfe_4c0b_89f8_4a729587a8aa> .
153
-
154
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Sunshine>
155
-        a       <http://www.w3.org/2002/07/owl#Class> ;
156
-        <http://www.w3.org/2000/01/rdf-schema#label>
157
-                "Ensoleillement@fr" , "Sunshine@en" ;
158
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
159
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#NiceWeather> .
160
-
161
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasCharacteristics>
162
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
163
-        <http://www.w3.org/2000/01/rdf-schema#domain>
164
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phenomenon> ;
165
-        <http://www.w3.org/2000/01/rdf-schema#label>
166
-                "caractérisé par@fr" , "has characteristics@en" ;
167
-        <http://www.w3.org/2000/01/rdf-schema#range>
168
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Parameters> .
169
-
170
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_2be00ec6_20f0_4ce1_a370_949a455cb0a1>
171
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#WeatherObservation> ;
172
-        <http://www.w3.org/2000/01/rdf-schema#label>
173
-                "P1@en" ;
174
-        <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasDate>
175
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_4f731814_91f0_4d75_a5cf_4a0d3629a308> ;
176
-        <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasLocation>
177
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_40c87ce2_4767_4cb0_9cd7_1dda03352a38> ;
178
-        <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasValue>
179
-                "3.0^^http://www.w3.org/2001/XMLSchema#float" ;
180
-        <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#measures>
181
-                <http://www.w3.org/2002/07/owl#OWLNamedIndividual_2a8dc066_4bd2_454c_a56b_11db9452e7dd> .
182
-
183
-<http://www.w3.org/2002/07/owl#OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce>
184
-        a       <http://www.w3.org/2002/07/owl#Class> .
185
-
186
-<http://www.w3.org/2002/07/owl#OWLNamedIndividual_61237d59_bb40_44ac_bfe3_d9e45ffe04d6>
187
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#Platform> ;
188
-        <http://www.w3.org/2000/01/rdf-schema#label>
189
-                "Platform1@en" ;
190
-        <http://purl.oclc.org/NET/ssnx/ssn#attachedSystem>
191
-                <http://www.w3.org/2002/07/owl#OWLNamedIndividual_dbca17ec_b04b_47fd_a523_4698b3d40ba5> ;
192
-        <http://www.w3.org/2002/07/owl#OWLObjectProperty_c71b5265_ff81_4c91_b30d_a3e858340405>
193
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_40c87ce2_4767_4cb0_9cd7_1dda03352a38> .
194
-
195
-<http://www.semanticweb.org/seydoux/ontologies/2015/11/untitled-ontology-29#OWLNamedIndividual_2b887a87_5d83_4d70_b7c9_6f8b1c3e54f0>
196
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://www.w3.org/2002/07/owl#OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce> ;
197
-        <http://www.w3.org/2000/01/rdf-schema#label>
198
-                "Température" .
199
-
200
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_e2cea48d_7da1_41cf_9a6e_167bd3b64a8f>
201
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://www.w3.org/2002/07/owl#Thing> ;
202
-        <http://www.w3.org/2000/01/rdf-schema#label>
203
-                "France@en" .
204
-
205
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_c85bf788_ee5b_4da6_a867_08c79d7380e3>
206
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Parameters> ;
207
-        <http://www.w3.org/2000/01/rdf-schema#label>
208
-                "Vitesse du vent@en" .
209
-
210
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#isCapital>
211
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
212
-        <http://www.w3.org/2000/01/rdf-schema#label>
213
-                "est la capitale de@fr" , "is capital@en" ;
214
-        <http://www.w3.org/2000/01/rdf-schema#subPropertyOf>
215
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#isIncludedIn> .
216
-
217
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss>
218
-        a       <http://www.w3.org/2002/07/owl#Ontology> .
219
-
220
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasSymptom>
221
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
222
-        <http://www.w3.org/2000/01/rdf-schema#domain>
223
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phenomenon> ;
224
-        <http://www.w3.org/2000/01/rdf-schema#label>
225
-                "a pour symptome@fr" , "has symptom@en" ;
226
-        <http://www.w3.org/2000/01/rdf-schema#range>
227
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#WeatherObservation> .
228
-
229
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Fog>
230
-        a       <http://www.w3.org/2002/07/owl#Class> ;
231
-        <http://www.w3.org/2000/01/rdf-schema#label>
232
-                "Brouillard@fr" , "Fog@en" ;
233
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
234
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#BadWeather> .
235
-
236
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_76f08a90_4bfe_4c0b_89f8_4a729587a8aa>
237
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#OperatingRange> ;
238
-        <http://www.w3.org/2000/01/rdf-schema#label>
239
-                "Range B@en" ;
240
-        <http://purl.oclc.org/NET/ssnx/ssn#inCondition>
241
-                <http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_818bcc98_efa7_4501_b5db_ff9122f2e082> .
242
-
243
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Rainfall>
244
-        a       <http://www.w3.org/2002/07/owl#Class> ;
245
-        <http://www.w3.org/2000/01/rdf-schema#label>
246
-                "Pluie@en" ;
247
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
248
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#BadWeather> ;
249
-        <http://www.w3.org/2002/07/owl#equivalentClass>
250
-                "591fc5014267cd4faa70a08765865245" .
251
-
252
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#endsAt>
253
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
254
-        <http://www.w3.org/2000/01/rdf-schema#domain>
255
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phenomenon> ;
256
-        <http://www.w3.org/2000/01/rdf-schema#label>
257
-                "finit à@fr" , "end at@en" ;
258
-        <http://www.w3.org/2000/01/rdf-schema#range>
259
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Instant> .
260
-
261
-<http://purl.oclc.org/NET/ssnx/ssn#onPlatform>
262
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> .
263
-
264
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#BadWeather>
265
-        a       <http://www.w3.org/2002/07/owl#Class> ;
266
-        <http://www.w3.org/2000/01/rdf-schema#label>
267
-                "Mauvais temps@fr" , "Bad Weather@en" ;
268
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
269
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phenomenon> .
270
-
271
-<http://www.w3.org/2002/07/owl#OWLNamedIndividual_268609f4_8a6e_4076_a5c9_cfd144dde88e>
272
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://www.w3.org/2002/07/owl#Parameter> ;
273
-        <http://www.w3.org/2000/01/rdf-schema#label>
274
-                "Pression athmosphérique@en" .
275
-
276
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_c4043e50_f8ce_4170_9d5a_794943e46bd9>
277
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#Condition> ;
278
-        <http://www.w3.org/2000/01/rdf-schema#comment>
279
-                "Temperatures commonly measured on earth, both positive and negative, expressed in °C." ;
280
-        <http://www.w3.org/2000/01/rdf-schema#label>
281
-                "Common temperatures@en" ;
282
-        <http://purl.oclc.org/NET/ssnx/ssn#forProperty>
283
-                <http://www.semanticweb.org/seydoux/ontologies/2015/11/untitled-ontology-29#OWLNamedIndividual_2b887a87_5d83_4d70_b7c9_6f8b1c3e54f0> ;
284
-        <http://www.semanticweb.org/5iss/tp2#OWLDataProperty_7c0f8588_780a_4d6e_abe1_6b493059b9fe>
285
-                "-30.0^^http://www.w3.org/2001/XMLSchema#float" ;
286
-        <http://www.semanticweb.org/5iss/tp2#OWLDataProperty_83a4c21e_0890_4f57_a7ec_ce2be3515a46>
287
-                "50.0^^http://www.w3.org/2001/XMLSchema#float" .
288
-
289
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_fc080a98_fa88_4825_b227_641894457026>
290
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#SensorOutput> ;
291
-        <http://www.w3.org/2000/01/rdf-schema#label>
292
-                "Output T1@en" ;
293
-        <http://purl.oclc.org/NET/ssnx/ssn#isProducedBy>
294
-                <http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_03047893_45b5_4b9f_90cb_01eaab27d536> .
295
-
296
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_ea074e3d_0263_4210_8567_730d34fe4991>
297
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#OperatingRange> ;
298
-        <http://www.w3.org/2000/01/rdf-schema#label>
299
-                "Range A@en" ;
300
-        <http://purl.oclc.org/NET/ssnx/ssn#inCondition>
301
-                <http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_c4043e50_f8ce_4170_9d5a_794943e46bd9> .
302
-
303
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_ddf74788_0035_4c06_bdc7_e519b04c7f99>
304
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phenomenon> ;
305
-        <http://www.w3.org/2000/01/rdf-schema#label>
306
-                "A1@en" ;
307
-        <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasSymptom>
308
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_2be00ec6_20f0_4ce1_a370_949a455cb0a1> .
309
-
310
-<http://purl.oclc.org/NET/ssnx/ssn#System>
311
-        a       <http://www.w3.org/2002/07/owl#Class> .
312
-
313
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasDate>
314
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
315
-        <http://www.w3.org/2000/01/rdf-schema#domain>
316
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#WeatherObservation> ;
317
-        <http://www.w3.org/2000/01/rdf-schema#label>
318
-                "a pour date@fr" , "has date@en" ;
319
-        <http://www.w3.org/2000/01/rdf-schema#range>
320
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Instant> .
321
-
322
-<http://purl.oclc.org/NET/ssnx/ssn#observes>
323
-        a       <http://www.w3.org/2002/07/owl#AnnotationProperty> .
324
-
325
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_e51e3974_f657_469e_b7a1_6ebaf4935b6a>
326
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#City> ;
327
-        <http://www.w3.org/2000/01/rdf-schema#label>
328
-                "La ville Lumière@fr" .
329
-
330
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#isIncludedIn>
331
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> , <http://www.w3.org/2002/07/owl#TransitiveProperty> ;
332
-        <http://www.w3.org/2000/01/rdf-schema#domain>
333
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Place> ;
334
-        <http://www.w3.org/2000/01/rdf-schema#label>
335
-                "est inclus dans@fr" , "is included in@en" ;
336
-        <http://www.w3.org/2000/01/rdf-schema#range>
337
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Place> .
338
-
339
-<http://www.semanticweb.org/5iss/tp2>
340
-        a       <http://www.w3.org/2002/07/owl#Ontology> ;
341
-        <http://www.w3.org/2002/07/owl#imports>
342
-                <http://purl.oclc.org/NET/ssnx/ssn> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss> .
343
-
344
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasDuration>
345
-        a       <http://www.w3.org/2002/07/owl#DatatypeProperty> .
346
-
347
-<http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_68f0ea2c_e5c8_4940_bfc6_14d61d262d86>
348
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#SensorOutput> ;
349
-        <http://www.w3.org/2000/01/rdf-schema#label>
350
-                "Output T3@en" ;
351
-        <http://purl.oclc.org/NET/ssnx/ssn#isProducedBy>
352
-                <http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_f9d9c0b6_f1b8_419f_bb8f_01ea9e5d783e> .
353
-
354
-<http://www.w3.org/2002/07/owl#compatibleWith>
355
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
356
-        <http://www.w3.org/2000/01/rdf-schema#domain>
357
-                <http://purl.oclc.org/NET/ssnx/ssn#System> ;
358
-        <http://www.w3.org/2000/01/rdf-schema#label>
359
-                "est compatible avec@fr" , "compatible with@en" ;
360
-        <http://www.w3.org/2000/01/rdf-schema#range>
361
-                <http://purl.oclc.org/NET/ssnx/ssn#System> ;
362
-        <http://www.w3.org/2002/07/owl#propertyChainAxiom>
363
-                "5b8182:17e291f0415:-7ffb" .
364
-
365
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_4f731814_91f0_4d75_a5cf_4a0d3629a308>
366
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Instant> ;
367
-        <http://www.w3.org/2000/01/rdf-schema#label>
368
-                "I1@en" ;
369
-        <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasTimestamp>
370
-                "2015-10-11T13:20:00Z^^http://www.w3.org/2001/XMLSchema#dateTimeStamp" .
371
-
372
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Parameters>
373
-        a       <http://www.w3.org/2002/07/owl#Class> ;
374
-        <http://www.w3.org/2000/01/rdf-schema#label>
375
-                "Paramètre mesurables@fr" , "Parameters@en" ;
376
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
377
-                <http://purl.oclc.org/NET/ssnx/ssn#Property> .
378
-
379
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_4ef6700d_d3ca_437e_96a6_5f531744c9fd>
380
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_6d5bb482_3e1e_47a0_be94_995d4df0f35e> ;
381
-        <http://www.w3.org/2000/01/rdf-schema#label>
382
-                "Hygrométrie@fr" , "Humidity" .
383
-
384
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#City>
385
-        a       <http://www.w3.org/2002/07/owl#Class> ;
386
-        <http://www.w3.org/2000/01/rdf-schema#label>
387
-                "Ville@fr" , "City@en" ;
388
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
389
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Place> .
390
-
391
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasValue>
392
-        a       <http://www.w3.org/2002/07/owl#DatatypeProperty> ;
393
-        <http://www.w3.org/2000/01/rdf-schema#domain>
394
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#WeatherObservation> ;
395
-        <http://www.w3.org/2000/01/rdf-schema#label>
396
-                "a pour valeur@fr" , "has value@en" ;
397
-        <http://www.w3.org/2000/01/rdf-schema#range>
398
-                <http://www.w3.org/2001/XMLSchema#float> .
399
-
400
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Temperature>
401
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Parameters> ;
402
-        <http://www.w3.org/2000/01/rdf-schema#label>
403
-                "Température@fr" , "Temperature@en" .
404
-
405
-<http://purl.oclc.org/NET/ssnx/ssn#Platform>
406
-        a       <http://www.w3.org/2002/07/owl#Class> ;
407
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
408
-                "4f32868b7102faf5c78538d8d9010e96" .
409
-
410
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Instant>
411
-        a       <http://www.w3.org/2002/07/owl#Class> ;
412
-        <http://www.w3.org/2000/01/rdf-schema#label>
413
-                "Instant@en" , "Instant@fr" .
414
-
415
-<http://www.w3.org/2002/07/owl#OWLNamedIndividual_b544466b_449c_4af9_a082_33aa45fcda65>
416
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://www.w3.org/2002/07/owl#Parameter> ;
417
-        <http://www.w3.org/2000/01/rdf-schema#label>
418
-                "Hygrométrie@en" .
419
-
420
-<http://www.w3.org/2002/07/owl#OWLNamedIndividual_61229c23_41e4_4ec8_aa17_04ca3dcc42d2>
421
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#SensingDevice> ;
422
-        <http://www.w3.org/2000/01/rdf-schema#label>
423
-                "Sonde T1@en" ;
424
-        <http://purl.oclc.org/NET/ssnx/ssn#onPlatform>
425
-                <http://www.w3.org/2002/07/owl#OWLNamedIndividual_61237d59_bb40_44ac_bfe3_d9e45ffe04d6> .
426
-
427
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#hasTimestamp>
428
-        a       <http://www.w3.org/2002/07/owl#DatatypeProperty> ;
429
-        <http://www.w3.org/2000/01/rdf-schema#domain>
430
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Instant> ;
431
-        <http://www.w3.org/2000/01/rdf-schema#label>
432
-                "a pour timestamp@fr" , "has timestamp@en" ;
433
-        <http://www.w3.org/2000/01/rdf-schema#range>
434
-                <http://www.w3.org/2001/XMLSchema#dateTimeStamp> .
435
-
436
-<http://www.w3.org/2002/07/owl#OWLObjectProperty_c71b5265_ff81_4c91_b30d_a3e858340405>
437
-        a       <http://www.w3.org/2002/07/owl#ObjectProperty> ;
438
-        <http://www.w3.org/2000/01/rdf-schema#label>
439
-                "se situe dans@en" ;
440
-        <http://www.w3.org/2002/07/owl#propertyChainAxiom>
441
-                "5b8182:17e291f0415:-7fff" , "5b8182:17e291f0415:-7ffd" .
442
-
443
-<http://www.w3.org/2002/07/owl#OWLNamedIndividual_dbca17ec_b04b_47fd_a523_4698b3d40ba5>
444
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.oclc.org/NET/ssnx/ssn#SensingDevice> ;
445
-        <http://www.w3.org/2000/01/rdf-schema#label>
446
-                "Sonde_P1@en" ;
447
-        <http://purl.oclc.org/NET/ssnx/ssn#observes>
448
-                <http://www.w3.org/2002/07/owl#OWLNamedIndividual_2a8dc066_4bd2_454c_a56b_11db9452e7dd> .
449
-
450
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phénomène_court>
451
-        a       <http://www.w3.org/2002/07/owl#Class> ;
452
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
453
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phenomenon> ;
454
-        <http://www.w3.org/2002/07/owl#equivalentClass>
455
-                "71f7ea4964da0ace95707802f7c19a48" .
456
-
457
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Country>
458
-        a       <http://www.w3.org/2002/07/owl#Class> ;
459
-        <http://www.w3.org/2000/01/rdf-schema#label>
460
-                "Pays@fr" , "Country@en" ;
461
-        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
462
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Place> ;
463
-        <http://www.w3.org/2002/07/owl#disjointWith>
464
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#City> .
465
-
466
-<http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_40c87ce2_4767_4cb0_9cd7_1dda03352a38>
467
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#City> , <http://www.w3.org/2002/07/owl#Thing> ;
468
-        <http://www.w3.org/2000/01/rdf-schema#label>
469
-                "Toulouse@en" ;
470
-        <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#isIncludedIn>
471
-                <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_e2cea48d_7da1_41cf_9a6e_167bd3b64a8f> .
472
-
473
-<http://www.w3.org/2002/07/owl#OWLNamedIndividual_babab508_1c69_472e_8f83_56a6d02a4b52>
474
-        a       <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://www.w3.org/2002/07/owl#Parameter> ;
475
-        <http://www.w3.org/2000/01/rdf-schema#label>
476
-                "Vitesse du vent@en" .

+ 0
- 73
src/main/java/semantic/controler/Controler.java View File

@@ -1,73 +0,0 @@
1
-package semantic.controler;
2
-
3
-import java.io.IOException;
4
-import java.util.List;
5
-
6
-import semantic.model.DoItYourselfModel;
7
-import semantic.model.IModelFunctions;
8
-import semantic.model.ObservationEntity;
9
-import semantic.model.SemanticModel;
10
-import semantic.view.JSONEndpoint;
11
-
12
-public class Controler
13
-{
14
-	private SemanticModel model;
15
-	private IModelFunctions customModel;
16
-	private IControlFunctions customControl;
17
-	
18
-	public Controler()
19
-	{
20
-		// TODO : Change the path to the one to your own ontology
21
-		this.model = new SemanticModel("tp-iss.ttl");
22
-		this.customModel = new DoItYourselfModel(this.model);
23
-		this.customControl = new DoItYourselfControl(this.model, this.customModel);
24
-		this.initializeContext();
25
-	}
26
-	
27
-	private void initializeContext()
28
-	{
29
-		this.customModel.createPlace("Aarhus");
30
-	}
31
-	
32
-	public void exportModel(String path)
33
-	{
34
-		this.model.exportModel(path);
35
-	}
36
-	
37
-	public SemanticModel getModel()
38
-	{
39
-		return this.model;
40
-	}
41
-	
42
-	public IModelFunctions getCustomModel()
43
-	{
44
-		return this.customModel;
45
-	}
46
-	
47
-	public IControlFunctions getCustomControl()
48
-	{
49
-		return this.customControl;
50
-	}
51
-	
52
-	public static void main(String[] args) 
53
-	{
54
-		Controler c = new Controler();
55
-		try
56
-		{
57
-			// TODO : Change the path to the one of the file you downloaded
58
-			List<ObservationEntity> obsList = JSONEndpoint.parseObservations("tempm.txt");
59
-			String tempURI = c.model.getEntityURI("Temperature").get(0);
60
-			c.getCustomControl().instantiateObservations(obsList, tempURI);
61
-			// TODO : Same thing, for humidity
62
-			obsList = JSONEndpoint.parseObservations("tempm.txt");
63
-			String humidityURI = c.model.getEntityURI("Température").get(0);
64
-			c.getCustomControl().instantiateObservations(obsList, humidityURI);
65
-			// TODO : Change the path so that it points where you want the export to be done
66
-			c.exportModel("export.ttl");
67
-		}
68
-		catch (IOException e)
69
-		{
70
-			e.printStackTrace();
71
-		}
72
-	}
73
-}

+ 58
- 0
src/main/java/semantic/controler/Controller.java View File

@@ -0,0 +1,58 @@
1
+package semantic.controler;
2
+
3
+import semantic.model.DoItYourselfModel;
4
+import semantic.model.IModelFunctions;
5
+import semantic.model.ObservationEntity;
6
+import semantic.model.SemanticModel;
7
+import semantic.view.JSONEndpoint;
8
+
9
+import java.io.IOException;
10
+import java.util.List;
11
+
12
+public class Controller {
13
+	private final SemanticModel model;
14
+	private final IModelFunctions customModel;
15
+	private final IControlFunctions customControl;
16
+
17
+	public Controller() {
18
+		this.model = new SemanticModel("tp-iss.ttl");
19
+		this.customModel = new DoItYourselfModel(this.model);
20
+		this.customControl = new DoItYourselfControl(this.model, this.customModel);
21
+		this.initializeContext();
22
+	}
23
+
24
+	public static void main(String[] args) {
25
+		Controller controller = new Controller();
26
+		try {
27
+			List<ObservationEntity> obsList = JSONEndpoint.parseObservations("tempm.txt");
28
+			String tempURI = controller.model.getEntityURI("Temperature").get(0);
29
+			controller.getCustomControl().instantiateObservations(obsList, tempURI);
30
+			obsList = JSONEndpoint.parseObservations("hum.txt");
31
+			String humidityURI = controller.model.getEntityURI("Humidity").get(0);
32
+			controller.getCustomControl().instantiateObservations(obsList, humidityURI);
33
+			controller.exportModel("export.ttl");
34
+		} catch (IOException e) {
35
+			e.printStackTrace();
36
+		}
37
+	}
38
+
39
+	private void initializeContext() {
40
+		this.customModel.createPlace("Aarhus");
41
+	}
42
+
43
+	public void exportModel(String path) {
44
+		this.model.exportModel(path);
45
+	}
46
+
47
+	public SemanticModel getModel() {
48
+		return this.model;
49
+	}
50
+
51
+	public IModelFunctions getCustomModel() {
52
+		return this.customModel;
53
+	}
54
+
55
+	public IControlFunctions getCustomControl() {
56
+		return this.customControl;
57
+	}
58
+}

+ 3
- 3
src/main/java/semantic/model/IConvenienceInterface.java View File

@@ -10,7 +10,7 @@ public interface IConvenienceInterface
10 10
 	/**
11 11
 	 * There are multiple temperature sensors on the platform. This method indicates
12 12
 	 * which one performed a measure based on its timestamp.
13
-	 * @param obs, useful to get the timestamp
13
+	 * @param timestamp, useful to get the timestamp
14 14
 	 * @param paramURI, the URI of the observed parameter
15 15
 	 * @return the URI of the sensor having performed the measure.
16 16
 	 */
@@ -30,7 +30,7 @@ public interface IConvenienceInterface
30 30
 	public boolean hasSensorDoneIt(String obsURI, String sensorURI);
31 31
 	
32 32
 	/**
33
-	 * @param label
33
+	 * @param classURI
34 34
 	 * @return all the URIs of instances of the class of concepts associated to this label.
35 35
 	 */
36 36
 	public List<String> getInstancesURI(String classURI);
@@ -51,7 +51,7 @@ public interface IConvenienceInterface
51 51
 	/**
52 52
 	 * Creates an instance of the provided type, with the provided label.
53 53
 	 * @param label
54
-	 * @param the URI of the type
54
+	 * @param type the URI of the type
55 55
 	 * @return the URI of the created individual
56 56
 	 */
57 57
 	public String createInstance(String label, String type);

+ 6
- 6
src/test/java/semantic/TestModelFunctions.java View File

@@ -3,7 +3,7 @@ package semantic;
3 3
 import org.junit.Assert;
4 4
 import org.junit.Test;
5 5
 
6
-import semantic.controler.Controler;
6
+import semantic.controler.Controller;
7 7
 import semantic.model.TimestampEntity;
8 8
 
9 9
 public class TestModelFunctions
@@ -11,7 +11,7 @@ public class TestModelFunctions
11 11
 	@Test
12 12
 	public void testPlaceCreation()
13 13
 	{
14
-		Controler c = new Controler();
14
+		Controller c = new Controller();
15 15
 		String jurassicParkURI = c.getCustomModel().createPlace("Jurassic park");
16 16
 		String placeClassURI = c.getModel().getEntityURI("Lieu").get(0);
17 17
 		Assert.assertTrue("L'entité créée n'est pas de classe Lieu", c.getModel().isOfType(jurassicParkURI, placeClassURI));
@@ -21,7 +21,7 @@ public class TestModelFunctions
21 21
 	@Test
22 22
 	public void testInstantCreation()
23 23
 	{
24
-		Controler c = new Controler();
24
+		Controller c = new Controller();
25 25
 		TimestampEntity t = new TimestampEntity("2014-02-13T06:20:00");
26 26
 		String instantURI = c.getCustomModel().createInstant(t);
27 27
 		String instantClassURI = c.getModel().getEntityURI("Instant").get(0);
@@ -34,7 +34,7 @@ public class TestModelFunctions
34 34
 	@Test
35 35
 	public void testInstantRetrieval()
36 36
 	{
37
-		Controler c = new Controler();
37
+		Controller c = new Controller();
38 38
 		TimestampEntity t = new TimestampEntity("2014-02-13T06:20:00");
39 39
 		TimestampEntity t2 = new TimestampEntity("2015-02-13T06:20:00");
40 40
 		String instantURI = c.getCustomModel().createInstant(t);
@@ -45,7 +45,7 @@ public class TestModelFunctions
45 45
 	@Test
46 46
 	public void testTimestampRetrieval()
47 47
 	{
48
-		Controler c = new Controler();
48
+		Controller c = new Controller();
49 49
 		TimestampEntity t = new TimestampEntity("2014-02-13T06:20:00");
50 50
 		String instantURI = c.getCustomModel().createInstant(t);
51 51
 		Assert.assertTrue("Le timestamp ne correspond pas", c.getCustomModel().getInstantTimestamp(instantURI).equals("2014-02-13T06:20:00"));
@@ -54,7 +54,7 @@ public class TestModelFunctions
54 54
 	@Test
55 55
 	public void testObservationCreation()
56 56
 	{
57
-		Controler c = new Controler();
57
+		Controller c = new Controller();
58 58
 		TimestampEntity t = new TimestampEntity("2014-02-13T06:20:00");
59 59
 		String instantURI = c.getCustomModel().createInstant(t);
60 60
 		String paramURI = c.getModel().getEntityURI("Temperature").get(0);

Loading…
Cancel
Save