Skip to content

Commit b928183

Browse files
committed
add generated artifacts, remodel schema, add tests that match schema
1 parent 98bd4fe commit b928183

File tree

8 files changed

+801
-23
lines changed

8 files changed

+801
-23
lines changed
Lines changed: 321 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,321 @@
1+
name: linkml-tutorial-2025
2+
description: This is a demo schema for use in training LinkML Schema developers in
3+
key LinkML model and build features.
4+
title: linkml-tutorial-2025
5+
id: https://w3id.org/linkml/linkml-tutorial-2025
6+
imports:
7+
- linkml:types
8+
license: MIT
9+
prefixes:
10+
linkml_tutorial_2025:
11+
prefix_prefix: linkml_tutorial_2025
12+
prefix_reference: https://w3id.org/linkml/linkml-tutorial-2025/
13+
linkml:
14+
prefix_prefix: linkml
15+
prefix_reference: https://w3id.org/linkml/
16+
example:
17+
prefix_prefix: example
18+
prefix_reference: https://example.org/
19+
default_prefix: linkml_tutorial_2025
20+
default_range: string
21+
types:
22+
string:
23+
name: string
24+
definition_uri: https://w3id.org/linkml/String
25+
description: A character string
26+
notes:
27+
- In RDF serializations, a slot with range of string is treated as a literal or
28+
type xsd:string. If you are authoring schemas in LinkML YAML, the type is
29+
referenced with the lower case "string".
30+
from_schema: https://w3id.org/linkml/types
31+
imported_from: linkml:types
32+
exact_mappings:
33+
- schema:Text
34+
base: str
35+
uri: xsd:string
36+
integer:
37+
name: integer
38+
definition_uri: https://w3id.org/linkml/Integer
39+
description: An integer
40+
notes:
41+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
42+
lower case "integer".
43+
from_schema: https://w3id.org/linkml/types
44+
imported_from: linkml:types
45+
exact_mappings:
46+
- schema:Integer
47+
base: int
48+
uri: xsd:integer
49+
boolean:
50+
name: boolean
51+
definition_uri: https://w3id.org/linkml/Boolean
52+
description: A binary (true or false) value
53+
notes:
54+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
55+
lower case "boolean".
56+
from_schema: https://w3id.org/linkml/types
57+
imported_from: linkml:types
58+
exact_mappings:
59+
- schema:Boolean
60+
base: Bool
61+
uri: xsd:boolean
62+
repr: bool
63+
float:
64+
name: float
65+
definition_uri: https://w3id.org/linkml/Float
66+
description: A real number that conforms to the xsd:float specification
67+
notes:
68+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
69+
lower case "float".
70+
from_schema: https://w3id.org/linkml/types
71+
imported_from: linkml:types
72+
exact_mappings:
73+
- schema:Float
74+
base: float
75+
uri: xsd:float
76+
double:
77+
name: double
78+
definition_uri: https://w3id.org/linkml/Double
79+
description: A real number that conforms to the xsd:double specification
80+
notes:
81+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
82+
lower case "double".
83+
from_schema: https://w3id.org/linkml/types
84+
imported_from: linkml:types
85+
close_mappings:
86+
- schema:Float
87+
base: float
88+
uri: xsd:double
89+
decimal:
90+
name: decimal
91+
definition_uri: https://w3id.org/linkml/Decimal
92+
description: A real number with arbitrary precision that conforms to the xsd:decimal
93+
specification
94+
notes:
95+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
96+
lower case "decimal".
97+
from_schema: https://w3id.org/linkml/types
98+
imported_from: linkml:types
99+
broad_mappings:
100+
- schema:Number
101+
base: Decimal
102+
uri: xsd:decimal
103+
time:
104+
name: time
105+
definition_uri: https://w3id.org/linkml/Time
106+
description: A time object represents a (local) time of day, independent of any
107+
particular day
108+
notes:
109+
- URI is dateTime because OWL reasoners do not work with straight date or time
110+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
111+
lower case "time".
112+
from_schema: https://w3id.org/linkml/types
113+
imported_from: linkml:types
114+
exact_mappings:
115+
- schema:Time
116+
base: XSDTime
117+
uri: xsd:time
118+
repr: str
119+
date:
120+
name: date
121+
definition_uri: https://w3id.org/linkml/Date
122+
description: a date (year, month and day) in an idealized calendar
123+
notes:
124+
- URI is dateTime because OWL reasoners don't work with straight date or time
125+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
126+
lower case "date".
127+
from_schema: https://w3id.org/linkml/types
128+
imported_from: linkml:types
129+
exact_mappings:
130+
- schema:Date
131+
base: XSDDate
132+
uri: xsd:date
133+
repr: str
134+
datetime:
135+
name: datetime
136+
definition_uri: https://w3id.org/linkml/Datetime
137+
description: The combination of a date and time
138+
notes:
139+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
140+
lower case "datetime".
141+
from_schema: https://w3id.org/linkml/types
142+
imported_from: linkml:types
143+
exact_mappings:
144+
- schema:DateTime
145+
base: XSDDateTime
146+
uri: xsd:dateTime
147+
repr: str
148+
date_or_datetime:
149+
name: date_or_datetime
150+
definition_uri: https://w3id.org/linkml/DateOrDatetime
151+
description: Either a date or a datetime
152+
notes:
153+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
154+
lower case "date_or_datetime".
155+
from_schema: https://w3id.org/linkml/types
156+
imported_from: linkml:types
157+
base: str
158+
uri: linkml:DateOrDatetime
159+
repr: str
160+
uriorcurie:
161+
name: uriorcurie
162+
definition_uri: https://w3id.org/linkml/Uriorcurie
163+
description: a URI or a CURIE
164+
notes:
165+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
166+
lower case "uriorcurie".
167+
from_schema: https://w3id.org/linkml/types
168+
imported_from: linkml:types
169+
base: URIorCURIE
170+
uri: xsd:anyURI
171+
repr: str
172+
curie:
173+
name: curie
174+
definition_uri: https://w3id.org/linkml/Curie
175+
conforms_to: https://www.w3.org/TR/curie/
176+
description: a compact URI
177+
notes:
178+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
179+
lower case "curie".
180+
comments:
181+
- in RDF serializations this MUST be expanded to a URI
182+
- in non-RDF serializations MAY be serialized as the compact representation
183+
from_schema: https://w3id.org/linkml/types
184+
imported_from: linkml:types
185+
base: Curie
186+
uri: xsd:string
187+
repr: str
188+
uri:
189+
name: uri
190+
definition_uri: https://w3id.org/linkml/Uri
191+
conforms_to: https://www.ietf.org/rfc/rfc3987.txt
192+
description: a complete URI
193+
notes:
194+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
195+
lower case "uri".
196+
comments:
197+
- in RDF serializations a slot with range of uri is treated as a literal or type
198+
xsd:anyURI unless it is an identifier or a reference to an identifier, in which
199+
case it is translated directly to a node
200+
from_schema: https://w3id.org/linkml/types
201+
imported_from: linkml:types
202+
close_mappings:
203+
- schema:URL
204+
base: URI
205+
uri: xsd:anyURI
206+
repr: str
207+
ncname:
208+
name: ncname
209+
definition_uri: https://w3id.org/linkml/Ncname
210+
description: Prefix part of CURIE
211+
notes:
212+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
213+
lower case "ncname".
214+
from_schema: https://w3id.org/linkml/types
215+
imported_from: linkml:types
216+
base: NCName
217+
uri: xsd:string
218+
repr: str
219+
objectidentifier:
220+
name: objectidentifier
221+
definition_uri: https://w3id.org/linkml/Objectidentifier
222+
description: A URI or CURIE that represents an object in the model.
223+
notes:
224+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
225+
lower case "objectidentifier".
226+
comments:
227+
- Used for inheritance and type checking
228+
from_schema: https://w3id.org/linkml/types
229+
imported_from: linkml:types
230+
base: ElementIdentifier
231+
uri: shex:iri
232+
repr: str
233+
nodeidentifier:
234+
name: nodeidentifier
235+
definition_uri: https://w3id.org/linkml/Nodeidentifier
236+
description: A URI, CURIE or BNODE that represents a node in a model.
237+
notes:
238+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
239+
lower case "nodeidentifier".
240+
from_schema: https://w3id.org/linkml/types
241+
imported_from: linkml:types
242+
base: NodeIdentifier
243+
uri: shex:nonLiteral
244+
repr: str
245+
jsonpointer:
246+
name: jsonpointer
247+
definition_uri: https://w3id.org/linkml/Jsonpointer
248+
conforms_to: https://datatracker.ietf.org/doc/html/rfc6901
249+
description: A string encoding a JSON Pointer. The value of the string MUST conform
250+
to JSON Point syntax and SHOULD dereference to a valid object within the current
251+
instance document when encoded in tree form.
252+
notes:
253+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
254+
lower case "jsonpointer".
255+
from_schema: https://w3id.org/linkml/types
256+
imported_from: linkml:types
257+
base: str
258+
uri: xsd:string
259+
repr: str
260+
jsonpath:
261+
name: jsonpath
262+
definition_uri: https://w3id.org/linkml/Jsonpath
263+
conforms_to: https://www.ietf.org/archive/id/draft-goessner-dispatch-jsonpath-00.html
264+
description: A string encoding a JSON Path. The value of the string MUST conform
265+
to JSON Point syntax and SHOULD dereference to zero or more valid objects within
266+
the current instance document when encoded in tree form.
267+
notes:
268+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
269+
lower case "jsonpath".
270+
from_schema: https://w3id.org/linkml/types
271+
imported_from: linkml:types
272+
base: str
273+
uri: xsd:string
274+
repr: str
275+
sparqlpath:
276+
name: sparqlpath
277+
definition_uri: https://w3id.org/linkml/Sparqlpath
278+
conforms_to: https://www.w3.org/TR/sparql11-query/#propertypaths
279+
description: A string encoding a SPARQL Property Path. The value of the string
280+
MUST conform to SPARQL syntax and SHOULD dereference to zero or more valid objects
281+
within the current instance document when encoded as RDF.
282+
notes:
283+
- If you are authoring schemas in LinkML YAML, the type is referenced with the
284+
lower case "sparqlpath".
285+
from_schema: https://w3id.org/linkml/types
286+
imported_from: linkml:types
287+
base: str
288+
uri: xsd:string
289+
repr: str
290+
slots:
291+
id:
292+
name: id
293+
definition_uri: https://w3id.org/linkml/linkml-tutorial-2025/id
294+
description: A unique identifier for a thing
295+
from_schema: https://w3id.org/linkml/linkml-tutorial-2025
296+
mappings:
297+
- schema:identifier
298+
slot_uri: schema:identifier
299+
identifier: true
300+
owner: NamedThing
301+
domain_of:
302+
- NamedThing
303+
range: uriorcurie
304+
required: true
305+
classes:
306+
NamedThing:
307+
name: NamedThing
308+
definition_uri: https://w3id.org/linkml/linkml-tutorial-2025/NamedThing
309+
description: A generic grouping for any identifiable entity
310+
from_schema: https://w3id.org/linkml/linkml-tutorial-2025
311+
mappings:
312+
- schema:Thing
313+
slots:
314+
- id
315+
class_uri: schema:Thing
316+
metamodel_version: 1.7.0
317+
source_file: linkml_tutorial_2025.yaml
318+
source_file_date: '2025-11-04T11:21:07'
319+
source_file_size: 765
320+
generation_date: '2025-11-04T11:21:09'
321+

0 commit comments

Comments
 (0)