Download presentation
Presentation is loading. Please wait.
1
CIMI / FHIR and Shape Expressions
5
Local DB … …
6
Preferred Strategy – Full Interoperability Local databases, CDA, HL7 V.2, etc. Term and Structure Translators Application Standard Structure AND Standard Terms (As defined by CIMI Models) Application and User Requirements
7
Addressing Instances Semantics – A combination of identifiers and structure – Have to determine whether two columns / elements / attributes / classes / … reference the same thing – (Potentially) have to split or join multiple elements to achieve the same level of granularity (e.g. by microparsing or exploiting contextual information) – Have to recognize and make explicit tacit information (units / data referent / workflow state / …)
8
Addressing Instances Syntax – With the exception of granularity/compositional issues, should be orthogonal to semantics – As such, it would be really handy to arrive at a representational form (syntax) that: Is readily transformed to and from multiple “native” syntaxes That has minimal restrictions on what can be said in the syntax
9
Proposal RDF is close to ideal for a “neutral” syntax – Triples provide minimal (absolute minimum?) restrictions on semantic aspects – Semantic identifiers have single form (URI) – Links to ontologies and terminologies provide key need for mapping – Tools exist today (any23, …) for mapping any syntax to RDF and visa-versa.
10
What is Missing? Schema XML Schema Java Class / Interface (… under construction …) DDL UML OWL ( ? ) Instance XML Java Object JSON SQL Tables (XMI -- …?) ( --- not really a schema ---) RDF
11
RDF Data Shapes Define a schema for RDF RDF – a set of triples. Constraints: – Subject must be IRI or Blank Node – Predicate must be a IRI – Object must be a IRI, a Blank Node or a Literal Any set of triples that meets the constraints above is valid – Even basic structures like lists, reification, etc. are not constraints…
12
RDF Data Shapes Constraints on a set of triples: – Triples that MUST exist – Triples that MAY NOT exist – Triple references – Object values – … A Schema language for RDF
13
Data Shape Example start = # Issue validation starts with { # An has: ex:state (ex:unassigned ex:assigned), # ex:state predicate with a target of either # ex:unassigned or ex:assigned ex:reportedBy @, # ex:peportedBy predicate whose target matches # ex:reportedOn xsd:dateTime, # ex:reportedOn predicate whose object is # a valid xsd:dateTime ( # optionally ex:reproducedBy @, # a ex:reproducedBy predicate w/ # Target URI that references vaid UserShape ex:reproducedOn xsd:dateTime # and a ex:reproducedOn predicate w/ date time )?, ex:related @ * # 0 or more ex:related predicates whose objects # are the subject of a valid issue shape } <UserShape { … }
14
RDF Data Shapes Previous example is in a specific grammar (ShEx) – W3C is working on other representational forms under “SHACL” rubric RDF Data Shapes do not specify semantics (!!)
15
This is a valid “Issue” shape … ex:state ex:unassigned ; ex:reportedBy ; ex:reportedOn "2013-01- 23T10:18:00"^^xsd:dateTime. foaf:name "Bob" ; foaf:mbox.
16
… but so is this foaf:firstName ex:state ex:unassigned ; ex:reportedBy ex:cornflakes; ex:reportedOn "2013-01- 23T10:18:00"^^xsd:dateTime. ex:cornflakes foaf:name ”Kellog’s Corn Flakes" ; foaf:mbox.
17
Why RDF Data Shapes? Tools exist (or soon will) to transform XML Schema, UML Models, FHIR models, CIMI models, SQL DDL, … into ShEx – XML Schema ShEx – XML RDF – … RDF can be validated / queried using ShEx
18
Why ShEx? ShEx is based on parser semantics – Essentially a grammar with a fixed RDF Lexer – ShEx includes the notion of “semantic annotations” (!!!) ShEx can be used as: – A validation tool … “Are these triples a valid instance of X” – A query tool … “Find all subjects whose triples are valid instances of X” – A transformation tool (!) … “Every time you see a valid instance of X, emit the triple “(subj) rdf:type ex: X”
19
ShEx as a transformation tool Shape expression serves the role of a digital “ribosome”, crawling sets of related triples – Can be used to copy and modify RDF – Can emit other languages (XML, TSV, …) – Can generate code – Can create forms – …
20
Transformation Model Source Schema In ShEx Target Schema In Shex Source Instance Any23 transform RDF “Native” Common Model Common Model
21
ShEx Example http://shexspec.github.io/extensions/Map/
22
DNA Translation
23
Data Translation Any23 transform Visitor / Listeners ShEx Process Data Synthesis Generated Data/Code RDF Triples
24
Current Projects FHIR RDF FHIR Schema ShEx UML ShEx AML / ADL ShEx
25
ShEx Processors JavaScript Implementation – JISON Haskell Implementation Scala Implemention Python Implementation – (ANTLR)
26
Additional Work W3C SHACL Group – RDF Representation – ShEx compatible (?) – Currently spearheaded by Holger Knoblauch (TopQuadrant) w/ SPIN focus ShEx Group – Face to Face in Lille August 17-21
27
Links any23: “Anything to triples” https://any23.apache.org/https://any23.apache.org/ http://www.w3.org/2013/ShEx/FancyShExDemo — demo (not examples bar hidden on LHS) http://www.w3.org/2013/ShEx/FancyShExDemo http://www.w3.org/2005/01/yacker/uploads/ShEx3/bnf?lang=perl — BNF for ShEx http://www.w3.org/2005/01/yacker/uploads/ShEx3/bnf?lang=perl https://github.com/shexSpec/grammar/blob/master/shExDoc.g4 — ANTLR for ShEx https://github.com/shexSpec/grammar/blob/master/shExDoc.g4 https://www.w3.org/2014/data-shapes/wiki/Main_Page — SHACL working group https://www.w3.org/2014/data-shapes/wiki/Main_Page http://www.w3.org/2013/ShEx/Primer — intro http://www.w3.org/2013/ShEx/Primer https://github.com/shexSpec — general repository https://github.com/shexSpec
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.