Skip to content

Commit

Permalink
Merge pull request #159 from linkml/proposal-add-jsonpointer-path-types
Browse files Browse the repository at this point in the history
proposal add jsonpointer path types
  • Loading branch information
cmungall committed Jun 16, 2023
2 parents 597f504 + 5498ff6 commit 0228f50
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
46 changes: 46 additions & 0 deletions examples/pointer-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
id: https://w3id.org/linkml/examples/pointer-example
name: pointer-example
description: pointer-example
imports:
- linkml:types
prefixes:
linkml: https://w3id.org/linkml/
ex: https://w3id.org/linkml/examples/pointer-example/
default_prefix: ex
slots:
property:
examples:
- value: '#/address[1]'
identifier: true
range: jsonpointer
source:
examples:
- value: bazSource
range: string
id:
examples:
- value: object1234
identifier: true
range: string
height:
multivalued: true
range: string
width:
multivalued: true
range: string
address:
multivalued: true
range: string
classes:
Source:
slots:
- property
- source
MyObject:
slots:
- id
- source
- height
- width
- address

28 changes: 28 additions & 0 deletions linkml_model/model/schema/types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,31 @@ types:
base: NodeIdentifier
repr: str
description: A URI, CURIE or BNODE that represents a node in a model.

jsonpointer:
uri: xsd:string
base: str
repr: str
description: >-
A string encoding a JSON Pointer. The value of the string MUST conform to JSON Point syntax and
SHOULD dereference to a valid object within the current instance document when encoded in tree form.
conforms_to: https://datatracker.ietf.org/doc/html/rfc6901

jsonpath:
uri: xsd:string
base: str
repr: str
description: >-
A string encoding a JSON Path. The value of the string MUST conform to JSON Point syntax and
SHOULD dereference to zero or more valid objects within the current instance document when encoded
in tree form.
conforms_to: https://www.ietf.org/archive/id/draft-goessner-dispatch-jsonpath-00.html

sparqlpath:
uri: xsd:string
base: str
repr: str
description: >-
A string encoding a SPARQL Property Path. The value of the string MUST conform to SPARQL syntax and
SHOULD dereference to zero or more valid objects within the current instance document when encoded as RDF.
conforms_to: https://www.w3.org/TR/sparql11-query/#propertypaths

0 comments on commit 0228f50

Please sign in to comment.