Skip to content

Commit 3ab977e

Browse files
authored
Merge pull request #333 from materialdigital/331-create-a-pattern-how-to-name-a-device
improved pattern for naming
2 parents a9c84cd + 515cf55 commit 3ab977e

File tree

2 files changed

+74
-33
lines changed

2 files changed

+74
-33
lines changed

patterns/device identifier/shape-data.ttl

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,54 +8,78 @@
88
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
99
@base <https://w3id.org/pmd/co/test/shape6#> .
1010

11+
12+
@prefix identifier: <http://purl.obolibrary.org/obo/IAO_0020000> .
13+
@prefix exists_at: <http://purl.obolibrary.org/obo/BFO_0000108> .
14+
@prefix temporal_region: <http://purl.obolibrary.org/obo/BFO_0000008> .
15+
@prefix has_first_instant: <http://purl.obolibrary.org/obo/BFO_0000222> .
16+
@prefix has_last_instant: <http://purl.obolibrary.org/obo/BFO_0000224> .
17+
@prefix inXSDDateTime: <http://www.w3.org/2006/time#inXSDDateTime> .
18+
@prefix temporal_instant: <http://purl.obolibrary.org/obo/BFO_0000203> .
19+
@prefix has_value: <https://w3id.org/pmd/co/PMD_0000006> .
20+
@prefix denoted_by: <http://purl.obolibrary.org/obo/IAO_0000235> .
21+
@prefix symbol: <http://purl.obolibrary.org/obo/IAO_0000028> .
22+
@prefix textual_entity: <http://purl.obolibrary.org/obo/IAO_0000300> .
23+
@prefix specified_output_of: <http://purl.obolibrary.org/obo/OBI_0000312> .
24+
@prefix realizes: <http://purl.obolibrary.org/obo/BFO_0000055> .
25+
1126
<https://w3id.org/pmd/co/test/shape6> rdf:type owl:Ontology ;
1227
owl:versionIRI <https://w3id.org/pmd/co/test/shape6/3.0.0> .
1328

1429

15-
#################################################################
16-
# Individuals
17-
#################################################################
18-
19-
### https://w3id.org/pmd/co/test/shape6#device1
2030
:device1 rdf:type owl:NamedIndividual ,
2131
<https://w3id.org/pmd/co/PMD_0000602> ;
22-
obo:IAO_0000235 :device1_identifier .
32+
denoted_by: :device1_identifier .
2333

2434

25-
### https://w3id.org/pmd/co/test/shape6#device1_identifier
2635
:device1_identifier rdf:type owl:NamedIndividual ,
27-
obo:IAO_0020000 ;
28-
obo:OBI_0001938 :device1_identifier_value .
29-
30-
:device1_identifier <http://purl.obolibrary.org/obo/OBI_0000312> :some_process .
36+
identifier: ;
37+
has_value: "literal_id_of_device1" .
3138

32-
33-
### https://w3id.org/pmd/co/test/shape6#device1_identifier_value
34-
:device1_identifier_value rdf:type owl:NamedIndividual ,
35-
obo:OBI_0001933 ;
36-
obo:OBI_0002135 "literal_id_of_device1" .
39+
:device1_identifier specified_output_of: :some_process .
3740

3841

3942
### https://w3id.org/pmd/co/test/shape6#device2
4043
:device2 rdf:type owl:NamedIndividual ,
4144
<https://w3id.org/pmd/co/PMD_0000602> ;
42-
obo:IAO_0000235 :device2_identifier .
45+
denoted_by: :device2_identifier ;
46+
denoted_by: :device2_name1 ;
47+
denoted_by: :device2_name2 .
4348

4449

4550
### https://w3id.org/pmd/co/test/shape6#device2_identifier
4651
:device2_identifier rdf:type owl:NamedIndividual ,
47-
obo:IAO_0000028 ;
48-
obo:OBI_0001938 :device2_identifier_value .
52+
symbol: ;
53+
has_value: "literal_id_of_device2" .
54+
55+
:device2_name1 rdf:type owl:NamedIndividual ,
56+
textual_entity: ;
57+
has_value: "name1 of device2" ;
58+
exists_at: :some_temporal_region1 .
59+
60+
:some_temporal_region1 a temporal_region: .
61+
:some_temporal_region1 has_last_instant: :some_instant .
62+
63+
64+
:device2_name2 rdf:type owl:NamedIndividual ,
65+
textual_entity: ;
66+
has_value: "name2 of device2";
67+
exists_at: :some_temporal_region2 .
68+
69+
:some_temporal_region2 a temporal_region: .
70+
:some_temporal_region2 has_first_instant: :some_instant .
71+
72+
:some_instant inXSDDateTime: "2026-10-10T12:34:56Z"^^xsd:dateTimeStamp ; a temporal_instant:.
73+
74+
75+
76+
:device2_identifier specified_output_of: :some_process .
77+
:some_process realizes: :some_plan .
78+
4979

50-
:device2_identifier <http://purl.obolibrary.org/obo/OBI_0000312> :some_process .
5180

5281

53-
### https://w3id.org/pmd/co/test/shape6#device2_identifier_value
54-
:device2_identifier_value rdf:type owl:NamedIndividual ,
55-
obo:OBI_0001933 ;
56-
obo:OBI_0002135 "literal_id_of_device2" .
5782

58-
:some_process <http://purl.obolibrary.org/obo/BFO_0000055> :some_plan .
5983

6084

6185
### Generated by the OWL API (version 4.5.26.2023-07-17T20:34:13Z) https://github.com/owlcs/owlapi

patterns/device identifier/shape.ttl

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ shape:
1616
shape:device a sh:NodeShape ;
1717
sh:targetClass obi:OBI_0000968 ; ### device
1818
sh:or (
19-
shape:device_identifier
20-
shape:device_symbol
19+
shape:device_identifier ## the ID
20+
shape:device_symbol ## e.g. some serial number
21+
shape:device_name ## the name (or some description)
2122
) .
2223

2324
shape:device_identifier a sh:NodeShape ;
@@ -31,10 +32,9 @@ shape:device_identifier a sh:NodeShape ;
3132
sh:property [
3233
sh:path (
3334
obi:IAO_0000235 ### denoted by
34-
obi:OBI_0001938 ### has value specification
35-
obi:OBI_0002135 ### has specified value
35+
pmd:PMD_0000006 ### has value
3636
) ;
37-
sh:nodeKind sh:IRIOrLiteral;
37+
sh:nodeKind sh:Literal;
3838
sh:minCount 1 ;
3939
] .
4040

@@ -49,9 +49,26 @@ shape:device_symbol a sh:NodeShape ;
4949
sh:property [
5050
sh:path (
5151
obi:IAO_0000235 ### denoted by
52-
obi:OBI_0001938 ### has value specification
53-
obi:OBI_0002135 ### has specified value
52+
pmd:PMD_0000006 ### has value
5453
) ;
55-
sh:nodeKind sh:IRIOrLiteral;
54+
sh:nodeKind sh:Literal;
55+
sh:minCount 1 ;
56+
] .
57+
58+
59+
shape:device_name a sh:NodeShape ;
60+
sh:property [
61+
sh:path obi:IAO_0000235 ; ### denoted by
62+
sh:qualifiedValueShape [
63+
sh:class obi:IAO_0000028 ; ### iao symbol
64+
];
65+
sh:qualifiedMinCount 1 ;
66+
];
67+
sh:property [
68+
sh:path (
69+
obi:IAO_0000235 ### denoted by
70+
pmd:PMD_0000006 ### has value
71+
) ;
72+
sh:nodeKind sh:Literal;
5673
sh:minCount 1 ;
5774
] .

0 commit comments

Comments
 (0)