Skip to content

Commit 3e4c460

Browse files
committed
add missing schemas
1 parent a8be2b5 commit 3e4c460

5 files changed

Lines changed: 473 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ schemas.md
1414
examples/*.md
1515
schemas/*
1616
!schemas/*.schema
17+
!schemas/jsonld
18+
!schemas/salad_schema
1719

1820
# Byte-compiled / optimized / DLL files
1921
__pycache__/

schemas/jsonld/context.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"@context": {
3+
"@vocab" : "http://localhost:8000/context.json#",
4+
"ngff" : "http://localhost:8000/context.json#"
5+
}
6+
}

schemas/jsonld/frame.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"@context": {
3+
"@vocab" : "http://localhost:8000/context.json#",
4+
"xsd": "http://www.w3.org/2001/XMLSchema#",
5+
"ngff" : "http://localhost:8000/context.json#",
6+
"ngff:multiscales": {
7+
"@container": "@set"
8+
},
9+
"ngff:datasets": {
10+
"@container": "@set"
11+
},
12+
"ngff:end": {
13+
"@type": "xsd:decimal"
14+
}
15+
},
16+
"@type": "Image",
17+
"multiscales": {
18+
"@type": {
19+
"@default": "Multiscale"
20+
},
21+
"datasets" : {
22+
"@type": {
23+
"@default": "Dataset"
24+
}
25+
}
26+
},
27+
"omero": {
28+
"@type": {
29+
"@default": "omero"
30+
},
31+
"channels": {
32+
"@type": {
33+
"@default": "Channel"
34+
},
35+
"window": {
36+
"@type": {
37+
"@default": "Window"
38+
}
39+
}
40+
}
41+
}
42+
}

schemas/jsonld/shacl.ttl

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
@prefix dash: <http://datashapes.org/dash#> .
4+
@prefix sh: <http://www.w3.org/ns/shacl#> .
5+
@prefix schema: <http://localhost:8000/schema#> .
6+
@prefix ngff: <http://localhost:8000/context.json#> .
7+
8+
# Collection of wrapped Multiscale objects
9+
schema:TopLevelImageShape a sh:NodeShape;
10+
11+
sh:targetClass ngff:Image;
12+
sh:closed true ;
13+
sh:ignoredProperties ( rdf:type ) ;
14+
15+
sh:property [
16+
sh:path ngff:multiscales;
17+
sh:node dash:ListShape;
18+
sh:property [
19+
sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first);
20+
sh:datatype schema:Multiscale_Shape;
21+
];
22+
sh:minCount 1;
23+
];
24+
25+
sh:property [
26+
sh:path ngff:omero;
27+
sh:node schema:omero_Shape;
28+
].
29+
30+
31+
#
32+
# Contents of the "multiscales" array (NOT YET USED)
33+
#
34+
schema:Multiscale_Wrapper a sh:NodeShape;
35+
36+
sh:targetClass ngff:ListItem;
37+
sh:closed true ;
38+
sh:ignoredProperties ( rdf:type ) ;
39+
40+
sh:property [
41+
sh:path ngff:item ;
42+
] ;
43+
sh:property [
44+
sh:path ngff:position;
45+
sh:datatype xsd:integer ;
46+
] .
47+
48+
49+
#
50+
# Contents of the "multiscales" array
51+
#
52+
schema:Multiscale_Shape a sh:NodeShape;
53+
54+
sh:targetClass ngff:Multiscale;
55+
56+
sh:property [
57+
sh:path ngff:name;
58+
sh:datatype xsd:string;
59+
];
60+
61+
sh:property [
62+
sh:path ngff:version;
63+
sh:datatype xsd:string;
64+
sh:pattern "0.3";
65+
];
66+
67+
sh:property [
68+
sh:path ngff:datasets;
69+
sh:node dash:ListShape;
70+
sh:property [
71+
sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first);
72+
sh:datatype schema:Dataset_Shape;
73+
];
74+
sh:minCount 1;
75+
];
76+
77+
sh:property [
78+
sh:path ngff:axes;
79+
sh:node dash:ListShape;
80+
sh:property [
81+
sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first);
82+
];
83+
sh:minCount 2;
84+
sh:pattern "^[xyzct]$";
85+
sh:datatype xsd:string;
86+
] ;
87+
88+
sh:property [
89+
sh:path ngff:type;
90+
sh:datatype xsd:string;
91+
] ;
92+
93+
sh:property [
94+
sh:path ngff:metadata;
95+
] .
96+
97+
schema:omero_Shape a sh:NodeShape;
98+
99+
sh:targetClass ngff:omero;
100+
sh:closed true ;
101+
sh:ignoredProperties ( rdf:type ) ;
102+
103+
sh:property [
104+
sh:path ngff:id;
105+
sh:datatype xsd:integer;
106+
] ;
107+
108+
sh:property [
109+
sh:path ngff:version;
110+
sh:datatype xsd:string;
111+
] ;
112+
113+
sh:property [
114+
sh:path ngff:channels;
115+
sh:node dash:ListShape;
116+
sh:property [
117+
sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first);
118+
sh:datatype schema:Channel_Shape;
119+
];
120+
sh:minCount 1;
121+
] ;
122+
123+
sh:property [
124+
sh:path ngff:rdefs;
125+
sh:node schema:RDef_Shape;
126+
].
127+
128+
schema:RDef_Shape a sh:NodeShape;
129+
130+
sh:property [
131+
sh:path ngff:model;
132+
sh:datatype xsd:string;
133+
] ;
134+
135+
sh:property [
136+
sh:path ngff:defaultZ;
137+
sh:datatype xsd:integer;
138+
] ;
139+
140+
sh:property [
141+
sh:path ngff:defaultT;
142+
sh:datatype xsd:integer;
143+
] .
144+
145+
#
146+
# Contents of the "datasets" array
147+
#
148+
schema:Dataset_Shape a sh:NodeShape;
149+
150+
sh:targetClass ngff:Dataset;
151+
sh:closed true ;
152+
sh:ignoredProperties ( rdf:type ) ;
153+
154+
sh:property [
155+
sh:path ngff:path;
156+
sh:datatype xsd:string;
157+
sh:minCount 1;
158+
].
159+
160+
schema:Channel_Shape a sh:NodeShape;
161+
sh:targetClass ngff:Channel;
162+
sh:property [
163+
sh:path ngff:window;
164+
sh:node schema:window_Shape;
165+
sh:minCount 1;
166+
];
167+
sh:property [
168+
sh:path ngff:label;
169+
sh:datatype xsd:string;
170+
];
171+
sh:property [
172+
sh:path ngff:family;
173+
sh:datatype xsd:string;
174+
];
175+
sh:property [
176+
sh:path ngff:color;
177+
sh:datatype xsd:string;
178+
sh:minCount 1;
179+
];
180+
sh:property [
181+
sh:path ngff:active;
182+
sh:datatype xsd:boolean;
183+
];
184+
sh:property [
185+
sh:path ngff:inverted;
186+
sh:datatype xsd:boolean;
187+
].
188+
189+
schema:window_Shape a sh:NodeShape;
190+
sh:targetClass ngff:Window;
191+
sh:property [
192+
sh:path ngff:end;
193+
sh:datatype xsd:double;
194+
sh:minCount 1;
195+
];
196+
sh:property [
197+
sh:path ngff:max;
198+
sh:datatype xsd:double;
199+
sh:minCount 1;
200+
];
201+
sh:property [
202+
sh:path ngff:min;
203+
sh:datatype xsd:double;
204+
sh:minCount 1;
205+
];
206+
sh:property [
207+
sh:path ngff:start;
208+
sh:datatype xsd:double;
209+
sh:minCount 1;
210+
].

0 commit comments

Comments
 (0)