Skip to content

Commit 4fab97c

Browse files
authored
Fix sh:or/sh:property (#418)
1 parent 368aa37 commit 4fab97c

File tree

1 file changed

+35
-63
lines changed

1 file changed

+35
-63
lines changed

shacl/BrickEntityShapeBase.ttl

Lines changed: 35 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -52,40 +52,28 @@ brick:Equipment a sh:NodeShape ;
5252
sh:class brick:Equipment;
5353
sh:message "A piece of Equipment's parts should be always other Equipment."
5454
];
55-
sh:or (
56-
sh:property [
57-
sh:path brick:isPartOf;
58-
sh:class brick:System;
59-
sh:message "Equipment can be part of a Collection, System or other Equipment"
60-
]
61-
sh:property [
62-
sh:path brick:isPartOf;
63-
sh:class brick:Equipment;
64-
sh:message "Equipment can be part of a Collection, System or other Equipment"
65-
]
66-
sh:property [
67-
sh:path brick:isPartOf;
68-
sh:class brick:Collection;
69-
sh:message "Equipment can be part of a Collection, System or other Equipment"
70-
]
71-
) ;
55+
sh:property [
56+
sh:path brick:isPartOf;
57+
sh:or (
58+
[ sh:class brick:System ]
59+
[ sh:class brick:Equipment ]
60+
[ sh:class brick:Collection ]
61+
);
62+
sh:message "Equipment can be part of a Collection, System or other Equipment."
63+
];
7264
sh:property [
7365
sh:path brick:hasLocation;
7466
sh:class brick:Location;
7567
sh:message "A piece of Equipment can be located only at a Location"
7668
];
77-
sh:or (
78-
sh:property [
79-
sh:path brick:feeds;
80-
sh:class brick:Equipment ;
81-
sh:message "A piece of Equipment can feed a Equipment" ;
82-
]
83-
sh:property [
84-
sh:path brick:feeds;
85-
sh:class brick:Location ;
86-
sh:message "A piece of Equipment can feed a Location" ;
87-
]
88-
) ;
69+
sh:property [
70+
sh:path brick:feeds;
71+
sh:or (
72+
[ sh:class brick:Equipment ]
73+
[ sh:class brick:Location ]
74+
);
75+
sh:message "A piece of Equipment can feed a Equipment or Location."
76+
];
8977
sh:property [
9078
sh:path brick:hasPoint;
9179
sh:class brick:Point;
@@ -102,18 +90,14 @@ brick:Point a sh:NodeShape;
10290
[sh:not [ sh:class brick:Collection ] ; sh:message "Point is an exclusive top class." ]
10391
);
10492
sh:message "Point is an exclusive top class." ;
105-
sh:or (
106-
sh:property [
107-
sh:path brick:isPointOf;
108-
sh:class brick:Location ;
109-
sh:message "A point can be associated with Locations or Equipment" ;
110-
]
111-
sh:property [
112-
sh:path brick:isPointOf;
113-
sh:class brick:Equipment ;
114-
sh:message "A point can be associated with Locations or Equipment" ;
115-
]
116-
) ;
93+
sh:property [
94+
sh:path brick:isPointOf;
95+
sh:or (
96+
[ sh:class brick:Location ]
97+
[ sh:class brick:Equipment ]
98+
);
99+
sh:message "A point can be associated with Locations or Equipment."
100+
];
117101
.
118102

119103
brick:Collection a sh:NodeShape;
@@ -125,28 +109,16 @@ brick:Collection a sh:NodeShape;
125109
[sh:not [ sh:class brick:Point ] ; sh:message "Collection is an exclusive top class." ]
126110
);
127111
sh:message "Collection is an exclusive top class." ;
128-
sh:or (
129-
sh:property [
130-
sh:path brick:hasPart;
131-
sh:class brick:Equipment;
132-
sh:message "A Collection can be associated with Equipments, Locations, Points, and other Collections."
133-
]
134-
sh:property [
135-
sh:path brick:hasPart;
136-
sh:class brick:Location;
137-
sh:message "A Collection can be associated with Equipments, Locations, Points, and other Collections."
138-
]
139-
sh:property [
140-
sh:path brick:hasPart;
141-
sh:class brick:Point;
142-
sh:message "A Collection can be associated with Equipments, Locations, Points, and other Collections."
143-
]
144-
sh:property [
145-
sh:path brick:hasPart;
146-
sh:class brick:Collection;
147-
sh:message "A Collection can be associated with Equipments, Locations, Points, and other Collections."
148-
]
149-
);
112+
sh:property [
113+
sh:path brick:hasPart;
114+
sh:or (
115+
[ sh:class brick:Equipment ]
116+
[ sh:class brick:Location ]
117+
[ sh:class brick:Point ]
118+
[ sh:class brick:Collection ]
119+
);
120+
sh:message "A Collection can be associated with Equipments, Locations, Points, and other Collections."
121+
];
150122
.
151123

152124
brick:Location a sh:NodeShape ;

0 commit comments

Comments
 (0)