SlideShare uma empresa Scribd logo
1 de 58
ShEx by example
RDF Validation tutorial
Eric Prud'hommeaux
World Wide Web Consortium
MIT, Cambridge, MA, USA
https://www.w3.org/People/Eric/
Dimitris Kontokostas
GeoPhy
http://kontokostas.com/
Jose Emilio Labra Gayo
WESO Research group
University of Oviedo, Spain
http://labra.weso.es
Iovka Boneva
LINKS, INRIA & CNRS
University of Lille, France
http://www.lifl.fr/~boneva/
More info
Chapter 4 of Validating RDF Data book
Online HTML version
ShEx
ShEx (Shape Expressions Language)
High level, concise Language for RDF validation
& description
Official info: http://shex.io
Inspired by RelaxNG, Turtle
ShEx as a language
Language based approach
ShEx = domain specific language for RDF validation
Specification: http://shex.io/shex-semantics/
Primer: http://shex.io/shex-primer
Different serializations:
ShExC (Compact syntax)
JSON-LD (ShExJ)
RDF obtained from JSON-LD (ShExR)
Short history of ShEx
2013 - RDF Validation Workshop
Conclusions: "SPARQL queries cannot easily be inspected and understood…"
Need of a higher level, concise language
Agreement on the term "Shape"
2014 First proposal of Shape Expressions (ShEx 1.0)
2014 - Data Shapes Working Group chartered
Mutual influence between SHACL & ShEx
2017 - ShEx Community Group - ShEx 2.0
ShEx implementations
Javascript: https://github.com/shexSpec/shex.js
Scala: http://labra.github.io/shaclex/
Ruby: https://ruby-rdf.github.io/shex/
Python: https://github.com/hsolbrig/PyShEx
Java: https://github.com/iovka/shex-java
Other prototypes: https://www.w3.org/2001/sw/wiki/ShEx
ShEx Online demos
Online Validator https://rawgit.com/shexSpec/shex.js/master/doc/shex-simple.html
Based on Javascript implementation
RDFShape http://rdfshape.weso.es/
Also has support for SHACL
ShEx-Java: http://shexjava.lille.inria.fr/
ShExValidata https://www.w3.org/2015/03/ShExValidata/
Based on ShEx 1.0, 3 deployments for different profiles HCLS,
DCat, PHACTS
First example
Shapes conforming to <User> must contain one property
schema:name with a value of type xsd:string
prefix schema: <http://schema.org/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
<User> IRI {
schema:name xsd:string ;
schema:knows @<User> *
}
Prefix declarations
as in Turtle
Note: We will omit prefix declarations and use the aliases from:
http://prefix.cc
A node conforms to :User if:
- It is an IRI
- There is exactly one value of shema:name which is a xsd:string
- There are zero or more values of schema:knows whose value conforms to :User
RDF Validation using ShEx
:alice schema:name "Alice" ;
schema:knows :alice .
:bob schema:name 234 .
:carol schema:name "Carol", "Carole" .
:dave foaf:name "Dave" .
:emily schema:name "Emily" ;
schema:email <mailto:emily@example.org> ;
schema:knows :alice, :emily .
_:1 schema:name "Unknown" .
Try it (RDFShape): https://goo.gl/LVFTRw Try it (ShExDemo): https://goo.gl/wp4SWf
Schema Instance





User shapes must contain one property schema:name with a value of type xsd:string
:User IRI {
schema:name xsd:string ;
schema:knows @<User> *
}

ShExC - Compact syntax
BNF Grammar: http://shex.io/shex-semantics/#shexc
Directly inspired by Turtle (reuses several definitions)
Prefix declarations
Comments starting by #
a keyword for rdf:type
Keywords aren't case sensitive (MinInclusive = MININCLUSIVE)
Shape Labels can be URIs or BlankNodes
ShEx-Json
Json serialization for Shape Expressions and validation results
<UserShape> {
schema:name xsd:string
}
≡
{ "type" : "Schema",
"@context" : "http://www.w3.org/ns/shex.jsonld",
"shapes" :[{"type" : "Shape",
"id" : "User",
"expression" : {
"type" : "TripleConstraint",
"predicate" : "http://schema.org/name",
"valueExpr" : { "type" : "NodeConstraint",
"datatype" : "http://www.w3.org/2001/XMLSchema#string"
}
}
}]
}
<UserShape> {
schema:name xsd:string
}
Some definitions
Schema = set of Shape Expressions
Shape Expression = labeled pattern <label> {
...pattern...
}
Label
Pattern
Focus Node and Neighborhood
Focus Node = node that is being validated
Neighborhood of a node = set of incoming/outgoing triples
:alice schema:name "Alice";
schema:follows :bob;
schema:worksFor :OurCompany .
:bob foaf:name "Robert" ;
schema:worksFor :OurCompany .
:carol schema:name "Carol" ;
schema:follows :alice .
:dave schema:name "Dave" .
:OurCompany schema:founder :dave ;
schema:employee :alice, :bob .
Neighbourhood of :alice = {
(:alice, schema:name, "Alice")
(:alice, schema:follows, :bob),
(:alice, schema:worksFor, :OurCompany),
(:carol, schema:follows, :alice),
(:OurCompany, schema:employee, :alice)
}
Shape maps
Shape maps declare which node/shape pairs are selected
They declare the queries that ShEx engines solve
Example: Does :alice conform to <User> ?
:alice@<User>
Example: Do all subjects of schema:knows conform to <User> ?
{FOCUS schema:knows _ }@<User>
3 types of shape maps:
Query shape maps: Input shape maps (can be entiched)
Fixed shape maps: Simple pairs of node/shape
Result shape maps: Shape maps generated by the validation process
Shape map resolver
Converts query shape maps to fixed shape maps
{FOCUS schema:worksFor _ }@:User
{FOCUS rdf:type schema:Person}@:User,
{_ schema:worksFor FOCUS }@:Company
ShapeMap
Resolver
Fixed shape map
:alice a :User .
:bob schema:worksFor :c1,
:c2 .
:carol a :User ;
schema:worksFor :c1 .
RDF Graph
Query shape map
:alice@:User,
:bob@:User,
:carol@:User,
:c1@:Company,
:c2@:Company,
ShEx validator
Takes as input a Fixed shape map and creates a result shape map
:alice@:User,
:bob @:User
ShEx
Validator
Result Shape map
:User {
schema:name xsd:string ;
schema:knows @:User*
}
ShEx Schema
:alice schema:name "Alice";
schema:knows :carol .
:bob schema:name "Robert" .
:carol schema:name "Carol" .
RDF Graph
Fixed shape map
:alice@:User,
:bob@:User,
:carol@:User
Validation process
:alice@:User,
:bob@:User
ShEx
Validator
Result shape map
:User {
schema:name xsd:string ;
schema:knows @:User*
}
ShEx Schema
:alice schema:name "Alice";
schema:knows :carol .
:bob schema:name "Robert";
schema:knows :carol .
:carol schema:name "Carol" .
RDF Graph
Fixed map
:alice@:User,
:bob@:User,
:carol@:User
Query shape map
ShapeMap
Resolver
{FOCUS schema:knows _ }@:User
Node constraints
Constraints over an RDF node
:User {
schema:name xsd:string ;
schema:birthDate xsd:date? ;
schema:gender [schema:Male schema:Female] OR xsd:string;
schema:knows IRI @:User*
}
Node constraints
Node constraints
Triple constraints
Constraints about the incoming/outgoing arcs of a node
:User {
schema:name xsd:string ;
schema:birthDate xsd:date ? ;
schema:gender [schema:Male schema:Female] OR xsd:string;
schema:knows IRI @:User *
}
Triple
constraints
<User> {
schema:name xsd:string
}
Triple constraints
A basic expression consists of a Triple Constraint
Triple constraint ≈ predicate + value constraint + cardinality
:alice Alice
predicate value constraint
schema:name
cardinality , if omitted {1,1}
{1,1}
Shape expressions
Labelled rules
:User {
schema:name xsd:string ;
schema:birthDate xsd:date ? ;
schema:gender [schema:Male schema:Female] OR xsd:string;
schema:knows IRI @:User *
}
ShapeShape expression
label
Triple expression
Simple expressions and grouping
; can be used to group components
:User {
schema:name xsd:string ;
foaf:age xsd:integer ;
schema:email xsd:string ;
}
:alice schema:name "Alice";
foaf:age 10 ;
schema:email "alice@example.org" .
:bob schema:name "Robert Smith" ;
foaf:age 45 ;
schema:email <mailto:bob@example.org> .
:carol schema:name "Carol" ;
foaf:age 56, 66 ;
schema:email "carol@example.org" .


Cardinalities
Inspired by regular expressions
If omitted {1,1} = default cardinality*
* 0 or more
+ 1 or more
? 0 or 1
{m} m repetitions
{m,n} Between m and n repetitions
{m,} m or more repetitions
*Note: In SHACL, cardinality by default = (0,unbounded)
Example with cardinalities
:User {
schema:name xsd:string ;
schema:worksFor IRI ? ;
schema:follows IRI *
}
:Company {
schema:founder IRI ?;
schema:employee IRI {1,100}
}
:alice schema:name "Alice";
schema:follows :bob;
schema:worksFor :OurCompany .
:bob foaf:name "Robert" ;
schema:worksFor :OurCompany .
:carol schema:name "Carol" ;
schema:follows :alice .
:dave schema:name "Dave" .
:OurCompany schema:founder :dave ;
schema:employee :alice, :bob .
Choices - OneOf
The operator | represents alternatives (either one or the other)
:alice schema:name "Alice Cooper" .
:bob schema:givenName "Bob", "Robert" ;
schema:lastName "Smith" .
:carol schema:name "Carol King" ;
schema:givenName "Carol" ;
schema:lastName "King" .
:emily foaf:name "Emily" .
:User {
schema:name xsd:string ;
| schema:givenName xsd:string + ;
schema:lastName xsd:string
}
Try it (RDFShape): http://goo.gl/R3pjA2 (ShExDemo): https://goo.gl/xLZRLf


Value expressions
Type Example Description
Anything . The object can be anything
Datatype xsd:string Matches a value of type xsd:string
Kind IRI BNode
Literal NonLiteral
The object must have that kind
Value set [:Male :Female ] The value must be an element of a that set
Reference @<UserShape> The object must have shape <UserShape>
Composed xsd:string OR IRI The Composition of value expressions using OR AND NOT
IRI Range foaf:~ Starts with the IRI associated with foaf
Any except... - :Checked Any value except :Checked
No constraint
A dot (.) matches anything  no constraint on values
Try it: http://goo.gl/xBndCT
:User {
schema:name . ;
schema:affiliation . ;
schema:email . ;
schema:birthDate .
}
:alice
schema:name "Alice";
schema:affiliation [ schema:name "OurCompany" ] ;
schema:email <mailto:alice@example.org> ;
schema:birthDate "2010-08-23"^^xsd:date .
Datatypes
Datatypes are directly declared by their URIs
Predefined datatypes from XML Schema:
xsd:string xsd:integer xsd:date ...
:User {
schema:name xsd:string;
schema:birthDate xsd:date
}
:alice schema:name "Alice";
schema:birthDate "2010-08-23"^^xsd:date.
:bob schema:name "Robert" ;
schema:birthDate "2012-10-23" .
:carol schema:name _:unknown ;
schema:birthDate 2012 .
Try it: http://goo.gl/hqYDqu


Facets on Datatypes
It is possible to qualify the datatype with XML Schema facets
See: http://www.w3.org/TR/xmlschema-2/#rf-facets
Facet Description
MinInclusive, MaxInclusive
MinExclusive, MaxExclusive
Constraints on numeric values which declare the min/max
value allowed (either included or excluded)
TotalDigits, FractionDigits Constraints on numeric values which declare the total
digits and fraction digits allowed
Length, MinLength,
MaxLength
Constraints on string values which declare the length
allowed, or the min/max length allowed
Pattern Regular expression pattern
Facets on Datatypes
:User {
schema:name xsd:string MaxLength 10 ;
foaf:age xsd:integer MinInclusive 1 MaxInclusive 99 ;
schema:phone xsd:string /d{3}-d{3}-d{3}/
}
:alice schema:name "Alice";
foaf:age 10 ;
schema:phone "123-456-555" .
:bob schema:name "Robert Smith" ;
foaf:age 45 ;
schema:phone "333-444-555" .
:carol schema:name "Carol" ;
foaf:age 23 ;
schema:phone "+34-123-456-555" .
Try it: http://goo.gl/LMwXRi


Node Kinds
Value Description Examples
Literal Literal values "Alice"
"Spain"@en
23
true
IRI IRIs <http://example.org/alice>
ex:alice
BNode Blank nodes _:1
NonLiteral Blank nodes or IRIs _:1
<http://example.org/alice>
ex:alice
Define the kind of RDF nodes: Literal, IRI, BNode, ...
Example with node kinds
:alice schema:name "Alice" ;
schema:follows :bob .
:bob schema:name :Robert ;
schema:follows :carol .
:carol schema:name "Carol" ;
schema:follows "Dave" .
:User {
schema:name Literal ;
schema:follows IRI
}
Try it: http://goo.gl/vouWCU


Value sets
The value must be one of the values of a given set
Denoted by [ and ]
:Product {
schema:color [ "Red" "Green" "Blue" ] ;
schema:manufacturer [ :OurCompany :AnotherCompany ]
}
:x1 schema:color "Red";
schema:manufacturer :OurCompany .
:x2 schema:color "Cyan" ;
schema:manufacturer :OurCompany .
:x3 schema:color "Green" ;
schema:manufacturer :Unknown .
Try it: http://goo.gl/TgaoJ0


Single value sets
Value sets with a single element
A very common pattern
Try it: http://goo.gl/W464fn
<SpanishProduct> {
schema:country [ :Spain ]
}
<FrenchProduct> {
schema:country [ :France ]
}
<VideoGame> {
a [ :VideoGame ]
}
:product1 schema:country :Spain .
:product2 schema:country :France .
:product3 a :VideoGame ;
schema:country :Spain .
Note: ShEx doesn't interact with inference
It just checks if there is an rdf:type arc
Inference can be done before/after validating
ShEx can even be used to test inference systems
Shape references
Defines that the value must match another shape
References are marked as @
:User {
schema:worksFor @:Company ;
}
:Company {
schema:name xsd:string
}
:alice a :User;
schema:worksFor :OurCompany .
:bob a :User;
schema:worksFor :Another .
:OurCompany
schema:name "OurCompany" .
:Another
schema:name 23 .
Try it: http://goo.gl/qPh7ry


Recursion and cyclic references
Try it: http://goo.gl/507zss
:User {
schema:worksFor @:Company ;
}
:Company {
schema:name xsd:string ;
schema:employee @:User
}
:alice a :User;
schema:worksFor :OurCompany .
:bob a :User;
schema:worksFor :Another .
:OurCompany
schema:name "OurCompany" ;
schema:employee :alice .
:Another
schema:name 23 .


:Company
schema:legalName xsd:string
schema:worksFor
schema:employee
:User
schema:name xsd:string
Composed Shapes
It is possible to use AND , OR and NOT to compose shapes
Try it:http://goo.gl/XXlKs4
:User {
schema:name xsd:string ;
schema:worksFor IRI OR @:Company ?;
schema:follows IRI OR BNode *
}
:Company {
schema:founder IRI ?;
schema:employee IRI {1,100}
}
:alice schema:name "Alice";
schema:follows :bob;
schema:worksFor :OurCompany .
:bob schema:name "Robert" ;
schema:worksFor [
schema:Founder "Frank" ;
schema:employee :carol ;
] .
:carol schema:name "Carol" ;
schema:follows [
schema:name "Emily" ;
] .
:OurCompany schema:founder :dave ;
schema:employee :alice, :bob .
IRI ranges
Try it: https://goo.gl/sNQi8n
Note: IRI ranges are not yet implemented in RDFShape
prefix codes: <http://example.codes/>
:User {
:status [ codes:~ ]
}
uri:~ represents the set of all URIs that start with stem uri
prefix codes: <http://example.codes/>
prefix other: <http://other.codes/>
:x1 :status codes:resolved .
:x2 :status other:done .
:x3 :status <http://example.codes/pending> .

IRI Range exclusions
The operator - excludes IRIs or IRI ranges from an IRI range
prefix codes: <http://example.codes/>
:User {
:status [
codes:~ - codes:deleted
]
}
:x1 :status codes:resolved .
:x2 :status other:done.
:x3 :status <http://example.codes/pending> .
:x4 :status codes:deleted .


Try it: https://goo.gl/BvtTi2
Exercise
Define a Schema for the following domain model
:University :Course
schema:name xsd:string
:hasCourse
:universityschema:name xsd:string
:Student
:hasStudent
schema:name xsd:string
rdf:type [schema:Person]
:hasFriend
schema:mbox IRI
:Teacher
rdf:type [schema:Person]
schema:name xsd:string
:empoloyee :teaches :isEnroledIn
Nested shapes
Syntax simplification to avoid defining two shapes
Internally, the inner shape is identified using a blank node
Try it (ShExDemo): https://goo.gl/z05kpL
Try it (RDFShape): http://goo.gl/aLt4rO
:User {
schema:name xsd:string ;
schema:worksFor {
a [ schema:Company ]
}
}
User {
schema:name xsd:string ;
schema:worksFor _:1
}
_:1 a [ schema:Company ] .
:alice schema:name "Alice" ;
schema:worksFor :OurCompany .
:OurCompany a schema:Company .
≡
Implicit AND
Shapes can be combined (implicit AND)
:User {
schema:name xsd:string ;
schema:worksFor IRI @:Manager /^http://hr.example/id#[0-9]+/
}
:Manager {
schema:name xsd:string
}
:alice schema:name "Alice";
schema:worksFor <http://hr.example/id#9> .
<http://hr.example/id> a :Manager .
Labeled constraints
$label <constraint> associates a constraint to a label
It can later be used as &label
:User {
$:name ( schema:name .
| schema:givenName . ;
schema:familyName .
) ;
schema:email IRI
}
:Employee {
&:name ;
:employeeId .
}
:Employee {
( schema:name .
| schema:givenName . ;
schema:familyName .) ;
:employeeId .
}
Inverse triple constraints
^ reverses the order of the triple constaint
Try it (RDFShape): http://goo.gl/CRj7J8
:User {
schema:name xsd:string ;
schema:woksFor @:Company
}
:Company {
a [schema:Company] ;
^schema:worksFor @:User+
}
:alice schema:name "Alice";
schema:worksFor :OurCompany .
:bob schema:name "Bob" ;
schema:worksFor :OurCompany .
:OurCompany a schema:Company .
Try it (ShEx demo): https://goo.gl/8omekl
Repeated properties
Try it (RDFShape): http://goo.gl/ik4IZc
<User> {
schema:name xsd:string;
schema:parent @<Male>;
schema:parent @<Female>
}
<Male> {
schema:gender [schema:Male ]
}
<Female> {
schema:gender [schema:Female]
}
:alice schema:name "Alice" ;
schema:parent :bob, :carol .
:bob schema:name "Bob" ;
schema:gender schema:Male .
:carol schema:name "Carol" ;
schema:gender schema:Female .
Allowing other triples
Triple constraints limit all triples with a given predicate to match one of
the constraints
This is called closing a property
Example:
Try it (RDFShape): http://goo.gl/m4fPzY
<Company> {
a [ schema:Organization ] ;
a [ org:Organization ]
}
:OurCompany a org:Organization,
schema:Organization .
:OurUniversity a org:Organization,
schema:Organization,
schema:CollegeOrUniversity .
Sometimes we would like to permit other triples (open the property)

Allowing other triples
EXTRA <listOfProperties> declares that a list of properties
can contain extra values
Example:
Try it (RDFShape): http://goo.gl/m4fPzY
<Company> EXTRA a {
a [ schema:Organization ] ;
a [ org:Organization ]
}
:OurCompany a org:Organization,
schema:Organization .
:OurUniversity a org:Organization,
schema:Organization,
schema:CollegeOrUniversity .
Closed Shapes
CLOSED can be used to limit the appearance of any predicate not
mentioned in the shape expression
:alice schema:name "Alice" ;
schema:knows :bob .
:bob schema:name "Bob" ;
schema:knows :alice .
:dave schema:name "Dave" ;
schema:knows :emily ;
:link2virus <virus> .
:emily schema:name "Emily" ;
schema:knows :dave .
<User> {
schema:name IRI;
schema:knows @<User>*
}
<User> CLOSED {
schema:name IRI;
schema:knows @<User>*
}
Without closed, all match <User> With closed, only :alice and
:bob match <User>Try without closed: http://goo.gl/vJEG5G
Try with closed: http://goo.gl/KWDEEs
Node constraints
Constraints on the focus node
<User> IRI {
schema:name xsd:string ;
schema:worksFor IRI
}
:alice schema:name "Alice";
:worksFor :OurCompany .
_:1 schema:name "Unknown";
:worksFor :OurCompany . 
Conjunction of Shape Expressions
AND can be used to define conjunction on Shape Expressions
<User> { schema:name xsd:string ;
schema:worksFor IRI
}
AND {
schema:worksFor @<Company>
}
Conjunctions are the default operator in SHACL
Disjunction of Shape Expressions
OR can be used to define disjunction of Shape Expressions
:User { schema:name xsd:string }
OR { schema:givenName xsd:string ;
schema:familyName xsd:string
}
Negation
NOT s creates a new shape expression from a shape s.
Nodes conform to NOT s when they do not conform to s.
:NoName Not {
schema:name .
}
:alice schema:givenName "Alice" ; #Passes
schema:familyName "Cooper" .
:bob schema:name "Robert" . #Fails
:carol schema:givenName "Carol" ; #Fails
schema:name "Carol" .
IF-THEN pattern
Combining OR, NOT and AND it is possible to define IF-THEN…
:Product { schema:productID . } AND
NOT{ a [ schema:Vehicle ] }
OR { schema:vehicleEngine . ;
schema:fuelType .
}
Cyclic dependencies with negation
One problem of combining NOT and recursion is the possibility
of declarin ill-defined shapes
:Barber { # Violates the negation requirement
:shaves @:Person
} AND NOT {
:shaves @:Barber
}
:Person {
schema:name xsd:string
}
:albert :shaves :dave . #Passes as a :Barber
:bob schema:name "Robert" ; # Passes as a :Person
:shaves :bob . # Passes :Barber?
:dave schema:name "Dave" . #Passes as a :Person
Restriction on cyclic dependencies and
negation
Constraint to avoid ill formed data models:
Whenever a shape refers to itself either directly or indirectly, the chain of
references cannot traverse an occurrence of the negation operation NOT.
Semantic Actions
Arbitrary code attached to shapes
Can be used to perform operations with side effects
Independent of any language/technology
Several extension languages: GenX, GenJ (http://shex.io/extensions/)
:alice schema:name "Alice" ;
schema:birthDate "1980-01-23"^^xsd:date ;
schema:deathDate "2013-01-23"^^xsd:date .
:bob schema:name "Robert" ;
schema:birthDate "2013-08-12"^^xsd:date ;
schema:deathDate "1990-01-23"^^xsd:date .
<Person> {
schema:name xsd:string,
schema:birthDate xsd:dateTime
%js:{ report = _.o; return true; %},
schema:deathDate xsd:dateTime
%js:{ return _[1].triple.o.lex > report.lex; %}
%sparql:{
?s schema:birthDate ?bd . FILTER (?o > ?bd) %}
}
Other features
Current ShEx version: 2.0
Several features have been postponed for next version
UNIQUE
Inheritance (a Shape that extends another Shape)
Future work & contributions
More info http://shex.io
ShEx currently under active development
Curent work
Improve error messages
Language expressivity (combination of different operators)
If you are interested, you can help
List of issues: https://github.com/shexSpec/shex/issues

Mais conteúdo relacionado

Mais procurados

SPARQL-DL - Theory & Practice
SPARQL-DL - Theory & PracticeSPARQL-DL - Theory & Practice
SPARQL-DL - Theory & PracticeAdriel Café
 
SHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudSHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudRichard Cyganiak
 
Overview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developmentsOverview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developmentsMaxime Lefrançois
 
Introduction to RDF & SPARQL
Introduction to RDF & SPARQLIntroduction to RDF & SPARQL
Introduction to RDF & SPARQLOpen Data Support
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaAleksander Pohl
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFSNilesh Wagmare
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksAmit Tyagi
 
SPARQL 사용법
SPARQL 사용법SPARQL 사용법
SPARQL 사용법홍수 허
 
SPARQL in a nutshell
SPARQL in a nutshellSPARQL in a nutshell
SPARQL in a nutshellFabien Gandon
 
Resource description framework
Resource description frameworkResource description framework
Resource description frameworkStanley Wang
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic WebLuigi De Russis
 
RDF 개념 및 구문 소개
RDF 개념 및 구문 소개RDF 개념 및 구문 소개
RDF 개념 및 구문 소개Dongbum Kim
 
RDF, SPARQL and Semantic Repositories
RDF, SPARQL and Semantic RepositoriesRDF, SPARQL and Semantic Repositories
RDF, SPARQL and Semantic RepositoriesMarin Dimitrov
 
Querying Linked Data with SPARQL
Querying Linked Data with SPARQLQuerying Linked Data with SPARQL
Querying Linked Data with SPARQLOlaf Hartig
 

Mais procurados (20)

SPARQL-DL - Theory & Practice
SPARQL-DL - Theory & PracticeSPARQL-DL - Theory & Practice
SPARQL-DL - Theory & Practice
 
SHACL Overview
SHACL OverviewSHACL Overview
SHACL Overview
 
SPARQL Tutorial
SPARQL TutorialSPARQL Tutorial
SPARQL Tutorial
 
SHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudSHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data Mud
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
Overview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developmentsOverview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developments
 
Introduction to RDF & SPARQL
Introduction to RDF & SPARQLIntroduction to RDF & SPARQL
Introduction to RDF & SPARQL
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for Java
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFS
 
RDF data model
RDF data modelRDF data model
RDF data model
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
SPARQL 사용법
SPARQL 사용법SPARQL 사용법
SPARQL 사용법
 
SPARQL in a nutshell
SPARQL in a nutshellSPARQL in a nutshell
SPARQL in a nutshell
 
Resource description framework
Resource description frameworkResource description framework
Resource description framework
 
RDF Data Model
RDF Data ModelRDF Data Model
RDF Data Model
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
 
RDF 개념 및 구문 소개
RDF 개념 및 구문 소개RDF 개념 및 구문 소개
RDF 개념 및 구문 소개
 
RDF, SPARQL and Semantic Repositories
RDF, SPARQL and Semantic RepositoriesRDF, SPARQL and Semantic Repositories
RDF, SPARQL and Semantic Repositories
 
Css
CssCss
Css
 
Querying Linked Data with SPARQL
Querying Linked Data with SPARQLQuerying Linked Data with SPARQL
Querying Linked Data with SPARQL
 

Semelhante a ShEx by Example

Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapesJose Emilio Labra Gayo
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphsandyseaborne
 
Part04_SHACL By Example presentation.pptx
Part04_SHACL By Example presentation.pptxPart04_SHACL By Example presentation.pptx
Part04_SHACL By Example presentation.pptxvudinhphuong96
 
Self-Enforcing Access Control for Encrypted RDF
Self-Enforcing Access Control for Encrypted RDFSelf-Enforcing Access Control for Encrypted RDF
Self-Enforcing Access Control for Encrypted RDFSabrina Kirrane
 
Semantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLSemantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLDaniel D.J. UM
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIsJosef Petrák
 
Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialAdonisDamian
 
Sparql service-description
Sparql service-descriptionSparql service-description
Sparql service-descriptionSTIinnsbruck
 
SuRf – Tapping Into The Web Of Data
SuRf – Tapping Into The Web Of DataSuRf – Tapping Into The Web Of Data
SuRf – Tapping Into The Web Of Datacosbas
 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphsandyseaborne
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebShamod Lacoul
 
2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDFandyseaborne
 
Towards an RDF Validation Language based on Regular Expression Derivatives
Towards an RDF Validation Language based on Regular Expression DerivativesTowards an RDF Validation Language based on Regular Expression Derivatives
Towards an RDF Validation Language based on Regular Expression DerivativesJose Emilio Labra Gayo
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2Dimitris Kontokostas
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQLLino Valdivia
 

Semelhante a ShEx by Example (20)

Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
 
Part04_SHACL By Example presentation.pptx
Part04_SHACL By Example presentation.pptxPart04_SHACL By Example presentation.pptx
Part04_SHACL By Example presentation.pptx
 
Sparql
SparqlSparql
Sparql
 
Self-Enforcing Access Control for Encrypted RDF
Self-Enforcing Access Control for Encrypted RDFSelf-Enforcing Access Control for Encrypted RDF
Self-Enforcing Access Control for Encrypted RDF
 
Semantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLSemantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQL
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
HyperGraphQL
HyperGraphQLHyperGraphQL
HyperGraphQL
 
Optimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdfOptimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdf
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
 
Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorial
 
Sparql service-description
Sparql service-descriptionSparql service-description
Sparql service-description
 
SuRf – Tapping Into The Web Of Data
SuRf – Tapping Into The Web Of DataSuRf – Tapping Into The Web Of Data
SuRf – Tapping Into The Web Of Data
 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphs
 
SHACL Specification Draft
SHACL Specification DraftSHACL Specification Draft
SHACL Specification Draft
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic Web
 
2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF
 
Towards an RDF Validation Language based on Regular Expression Derivatives
Towards an RDF Validation Language based on Regular Expression DerivativesTowards an RDF Validation Language based on Regular Expression Derivatives
Towards an RDF Validation Language based on Regular Expression Derivatives
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
 

Mais de Jose Emilio Labra Gayo

Introducción a la investigación/doctorado
Introducción a la investigación/doctoradoIntroducción a la investigación/doctorado
Introducción a la investigación/doctoradoJose Emilio Labra Gayo
 
Legislative data portals and linked data quality
Legislative data portals and linked data qualityLegislative data portals and linked data quality
Legislative data portals and linked data qualityJose Emilio Labra Gayo
 
Legislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologiesLegislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologiesJose Emilio Labra Gayo
 
Como publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazadosComo publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazadosJose Emilio Labra Gayo
 
Arquitectura de la Web y Computación en el Servidor
Arquitectura de la Web y Computación en el ServidorArquitectura de la Web y Computación en el Servidor
Arquitectura de la Web y Computación en el ServidorJose Emilio Labra Gayo
 
RDF Validation Future work and applications
RDF Validation Future work and applicationsRDF Validation Future work and applications
RDF Validation Future work and applicationsJose Emilio Labra Gayo
 

Mais de Jose Emilio Labra Gayo (20)

Publicaciones de investigación
Publicaciones de investigaciónPublicaciones de investigación
Publicaciones de investigación
 
Introducción a la investigación/doctorado
Introducción a la investigación/doctoradoIntroducción a la investigación/doctorado
Introducción a la investigación/doctorado
 
Legislative data portals and linked data quality
Legislative data portals and linked data qualityLegislative data portals and linked data quality
Legislative data portals and linked data quality
 
Wikidata
WikidataWikidata
Wikidata
 
Legislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologiesLegislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologies
 
Introducción a la Web Semántica
Introducción a la Web SemánticaIntroducción a la Web Semántica
Introducción a la Web Semántica
 
2017 Tendencias en informática
2017 Tendencias en informática2017 Tendencias en informática
2017 Tendencias en informática
 
RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic web
 
19 javascript servidor
19 javascript servidor19 javascript servidor
19 javascript servidor
 
Como publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazadosComo publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazados
 
16 Alternativas XML
16 Alternativas XML16 Alternativas XML
16 Alternativas XML
 
XSLT
XSLTXSLT
XSLT
 
XPath
XPathXPath
XPath
 
Arquitectura de la Web y Computación en el Servidor
Arquitectura de la Web y Computación en el ServidorArquitectura de la Web y Computación en el Servidor
Arquitectura de la Web y Computación en el Servidor
 
RDF Validation Future work and applications
RDF Validation Future work and applicationsRDF Validation Future work and applications
RDF Validation Future work and applications
 
Máster en Ingeniería Web
Máster en Ingeniería WebMáster en Ingeniería Web
Máster en Ingeniería Web
 
2016 temuco tecnologias_websemantica
2016 temuco tecnologias_websemantica2016 temuco tecnologias_websemantica
2016 temuco tecnologias_websemantica
 
2015 bogota datos_enlazados
2015 bogota datos_enlazados2015 bogota datos_enlazados
2015 bogota datos_enlazados
 
17 computacion servidor
17 computacion servidor17 computacion servidor
17 computacion servidor
 
Tecnologias Web Semantica
Tecnologias Web SemanticaTecnologias Web Semantica
Tecnologias Web Semantica
 

Último

Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 

Último (20)

Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

ShEx by Example

  • 1. ShEx by example RDF Validation tutorial Eric Prud'hommeaux World Wide Web Consortium MIT, Cambridge, MA, USA https://www.w3.org/People/Eric/ Dimitris Kontokostas GeoPhy http://kontokostas.com/ Jose Emilio Labra Gayo WESO Research group University of Oviedo, Spain http://labra.weso.es Iovka Boneva LINKS, INRIA & CNRS University of Lille, France http://www.lifl.fr/~boneva/
  • 2. More info Chapter 4 of Validating RDF Data book Online HTML version
  • 3. ShEx ShEx (Shape Expressions Language) High level, concise Language for RDF validation & description Official info: http://shex.io Inspired by RelaxNG, Turtle
  • 4. ShEx as a language Language based approach ShEx = domain specific language for RDF validation Specification: http://shex.io/shex-semantics/ Primer: http://shex.io/shex-primer Different serializations: ShExC (Compact syntax) JSON-LD (ShExJ) RDF obtained from JSON-LD (ShExR)
  • 5. Short history of ShEx 2013 - RDF Validation Workshop Conclusions: "SPARQL queries cannot easily be inspected and understood…" Need of a higher level, concise language Agreement on the term "Shape" 2014 First proposal of Shape Expressions (ShEx 1.0) 2014 - Data Shapes Working Group chartered Mutual influence between SHACL & ShEx 2017 - ShEx Community Group - ShEx 2.0
  • 6. ShEx implementations Javascript: https://github.com/shexSpec/shex.js Scala: http://labra.github.io/shaclex/ Ruby: https://ruby-rdf.github.io/shex/ Python: https://github.com/hsolbrig/PyShEx Java: https://github.com/iovka/shex-java Other prototypes: https://www.w3.org/2001/sw/wiki/ShEx
  • 7. ShEx Online demos Online Validator https://rawgit.com/shexSpec/shex.js/master/doc/shex-simple.html Based on Javascript implementation RDFShape http://rdfshape.weso.es/ Also has support for SHACL ShEx-Java: http://shexjava.lille.inria.fr/ ShExValidata https://www.w3.org/2015/03/ShExValidata/ Based on ShEx 1.0, 3 deployments for different profiles HCLS, DCat, PHACTS
  • 8. First example Shapes conforming to <User> must contain one property schema:name with a value of type xsd:string prefix schema: <http://schema.org/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> <User> IRI { schema:name xsd:string ; schema:knows @<User> * } Prefix declarations as in Turtle Note: We will omit prefix declarations and use the aliases from: http://prefix.cc
  • 9. A node conforms to :User if: - It is an IRI - There is exactly one value of shema:name which is a xsd:string - There are zero or more values of schema:knows whose value conforms to :User RDF Validation using ShEx :alice schema:name "Alice" ; schema:knows :alice . :bob schema:name 234 . :carol schema:name "Carol", "Carole" . :dave foaf:name "Dave" . :emily schema:name "Emily" ; schema:email <mailto:emily@example.org> ; schema:knows :alice, :emily . _:1 schema:name "Unknown" . Try it (RDFShape): https://goo.gl/LVFTRw Try it (ShExDemo): https://goo.gl/wp4SWf Schema Instance      User shapes must contain one property schema:name with a value of type xsd:string :User IRI { schema:name xsd:string ; schema:knows @<User> * } 
  • 10. ShExC - Compact syntax BNF Grammar: http://shex.io/shex-semantics/#shexc Directly inspired by Turtle (reuses several definitions) Prefix declarations Comments starting by # a keyword for rdf:type Keywords aren't case sensitive (MinInclusive = MININCLUSIVE) Shape Labels can be URIs or BlankNodes
  • 11. ShEx-Json Json serialization for Shape Expressions and validation results <UserShape> { schema:name xsd:string } ≡ { "type" : "Schema", "@context" : "http://www.w3.org/ns/shex.jsonld", "shapes" :[{"type" : "Shape", "id" : "User", "expression" : { "type" : "TripleConstraint", "predicate" : "http://schema.org/name", "valueExpr" : { "type" : "NodeConstraint", "datatype" : "http://www.w3.org/2001/XMLSchema#string" } } }] }
  • 12. <UserShape> { schema:name xsd:string } Some definitions Schema = set of Shape Expressions Shape Expression = labeled pattern <label> { ...pattern... } Label Pattern
  • 13. Focus Node and Neighborhood Focus Node = node that is being validated Neighborhood of a node = set of incoming/outgoing triples :alice schema:name "Alice"; schema:follows :bob; schema:worksFor :OurCompany . :bob foaf:name "Robert" ; schema:worksFor :OurCompany . :carol schema:name "Carol" ; schema:follows :alice . :dave schema:name "Dave" . :OurCompany schema:founder :dave ; schema:employee :alice, :bob . Neighbourhood of :alice = { (:alice, schema:name, "Alice") (:alice, schema:follows, :bob), (:alice, schema:worksFor, :OurCompany), (:carol, schema:follows, :alice), (:OurCompany, schema:employee, :alice) }
  • 14. Shape maps Shape maps declare which node/shape pairs are selected They declare the queries that ShEx engines solve Example: Does :alice conform to <User> ? :alice@<User> Example: Do all subjects of schema:knows conform to <User> ? {FOCUS schema:knows _ }@<User> 3 types of shape maps: Query shape maps: Input shape maps (can be entiched) Fixed shape maps: Simple pairs of node/shape Result shape maps: Shape maps generated by the validation process
  • 15. Shape map resolver Converts query shape maps to fixed shape maps {FOCUS schema:worksFor _ }@:User {FOCUS rdf:type schema:Person}@:User, {_ schema:worksFor FOCUS }@:Company ShapeMap Resolver Fixed shape map :alice a :User . :bob schema:worksFor :c1, :c2 . :carol a :User ; schema:worksFor :c1 . RDF Graph Query shape map :alice@:User, :bob@:User, :carol@:User, :c1@:Company, :c2@:Company,
  • 16. ShEx validator Takes as input a Fixed shape map and creates a result shape map :alice@:User, :bob @:User ShEx Validator Result Shape map :User { schema:name xsd:string ; schema:knows @:User* } ShEx Schema :alice schema:name "Alice"; schema:knows :carol . :bob schema:name "Robert" . :carol schema:name "Carol" . RDF Graph Fixed shape map :alice@:User, :bob@:User, :carol@:User
  • 17. Validation process :alice@:User, :bob@:User ShEx Validator Result shape map :User { schema:name xsd:string ; schema:knows @:User* } ShEx Schema :alice schema:name "Alice"; schema:knows :carol . :bob schema:name "Robert"; schema:knows :carol . :carol schema:name "Carol" . RDF Graph Fixed map :alice@:User, :bob@:User, :carol@:User Query shape map ShapeMap Resolver {FOCUS schema:knows _ }@:User
  • 18. Node constraints Constraints over an RDF node :User { schema:name xsd:string ; schema:birthDate xsd:date? ; schema:gender [schema:Male schema:Female] OR xsd:string; schema:knows IRI @:User* } Node constraints Node constraints
  • 19. Triple constraints Constraints about the incoming/outgoing arcs of a node :User { schema:name xsd:string ; schema:birthDate xsd:date ? ; schema:gender [schema:Male schema:Female] OR xsd:string; schema:knows IRI @:User * } Triple constraints
  • 20. <User> { schema:name xsd:string } Triple constraints A basic expression consists of a Triple Constraint Triple constraint ≈ predicate + value constraint + cardinality :alice Alice predicate value constraint schema:name cardinality , if omitted {1,1} {1,1}
  • 21. Shape expressions Labelled rules :User { schema:name xsd:string ; schema:birthDate xsd:date ? ; schema:gender [schema:Male schema:Female] OR xsd:string; schema:knows IRI @:User * } ShapeShape expression label Triple expression
  • 22. Simple expressions and grouping ; can be used to group components :User { schema:name xsd:string ; foaf:age xsd:integer ; schema:email xsd:string ; } :alice schema:name "Alice"; foaf:age 10 ; schema:email "alice@example.org" . :bob schema:name "Robert Smith" ; foaf:age 45 ; schema:email <mailto:bob@example.org> . :carol schema:name "Carol" ; foaf:age 56, 66 ; schema:email "carol@example.org" .  
  • 23. Cardinalities Inspired by regular expressions If omitted {1,1} = default cardinality* * 0 or more + 1 or more ? 0 or 1 {m} m repetitions {m,n} Between m and n repetitions {m,} m or more repetitions *Note: In SHACL, cardinality by default = (0,unbounded)
  • 24. Example with cardinalities :User { schema:name xsd:string ; schema:worksFor IRI ? ; schema:follows IRI * } :Company { schema:founder IRI ?; schema:employee IRI {1,100} } :alice schema:name "Alice"; schema:follows :bob; schema:worksFor :OurCompany . :bob foaf:name "Robert" ; schema:worksFor :OurCompany . :carol schema:name "Carol" ; schema:follows :alice . :dave schema:name "Dave" . :OurCompany schema:founder :dave ; schema:employee :alice, :bob .
  • 25. Choices - OneOf The operator | represents alternatives (either one or the other) :alice schema:name "Alice Cooper" . :bob schema:givenName "Bob", "Robert" ; schema:lastName "Smith" . :carol schema:name "Carol King" ; schema:givenName "Carol" ; schema:lastName "King" . :emily foaf:name "Emily" . :User { schema:name xsd:string ; | schema:givenName xsd:string + ; schema:lastName xsd:string } Try it (RDFShape): http://goo.gl/R3pjA2 (ShExDemo): https://goo.gl/xLZRLf  
  • 26. Value expressions Type Example Description Anything . The object can be anything Datatype xsd:string Matches a value of type xsd:string Kind IRI BNode Literal NonLiteral The object must have that kind Value set [:Male :Female ] The value must be an element of a that set Reference @<UserShape> The object must have shape <UserShape> Composed xsd:string OR IRI The Composition of value expressions using OR AND NOT IRI Range foaf:~ Starts with the IRI associated with foaf Any except... - :Checked Any value except :Checked
  • 27. No constraint A dot (.) matches anything  no constraint on values Try it: http://goo.gl/xBndCT :User { schema:name . ; schema:affiliation . ; schema:email . ; schema:birthDate . } :alice schema:name "Alice"; schema:affiliation [ schema:name "OurCompany" ] ; schema:email <mailto:alice@example.org> ; schema:birthDate "2010-08-23"^^xsd:date .
  • 28. Datatypes Datatypes are directly declared by their URIs Predefined datatypes from XML Schema: xsd:string xsd:integer xsd:date ... :User { schema:name xsd:string; schema:birthDate xsd:date } :alice schema:name "Alice"; schema:birthDate "2010-08-23"^^xsd:date. :bob schema:name "Robert" ; schema:birthDate "2012-10-23" . :carol schema:name _:unknown ; schema:birthDate 2012 . Try it: http://goo.gl/hqYDqu  
  • 29. Facets on Datatypes It is possible to qualify the datatype with XML Schema facets See: http://www.w3.org/TR/xmlschema-2/#rf-facets Facet Description MinInclusive, MaxInclusive MinExclusive, MaxExclusive Constraints on numeric values which declare the min/max value allowed (either included or excluded) TotalDigits, FractionDigits Constraints on numeric values which declare the total digits and fraction digits allowed Length, MinLength, MaxLength Constraints on string values which declare the length allowed, or the min/max length allowed Pattern Regular expression pattern
  • 30. Facets on Datatypes :User { schema:name xsd:string MaxLength 10 ; foaf:age xsd:integer MinInclusive 1 MaxInclusive 99 ; schema:phone xsd:string /d{3}-d{3}-d{3}/ } :alice schema:name "Alice"; foaf:age 10 ; schema:phone "123-456-555" . :bob schema:name "Robert Smith" ; foaf:age 45 ; schema:phone "333-444-555" . :carol schema:name "Carol" ; foaf:age 23 ; schema:phone "+34-123-456-555" . Try it: http://goo.gl/LMwXRi  
  • 31. Node Kinds Value Description Examples Literal Literal values "Alice" "Spain"@en 23 true IRI IRIs <http://example.org/alice> ex:alice BNode Blank nodes _:1 NonLiteral Blank nodes or IRIs _:1 <http://example.org/alice> ex:alice Define the kind of RDF nodes: Literal, IRI, BNode, ...
  • 32. Example with node kinds :alice schema:name "Alice" ; schema:follows :bob . :bob schema:name :Robert ; schema:follows :carol . :carol schema:name "Carol" ; schema:follows "Dave" . :User { schema:name Literal ; schema:follows IRI } Try it: http://goo.gl/vouWCU  
  • 33. Value sets The value must be one of the values of a given set Denoted by [ and ] :Product { schema:color [ "Red" "Green" "Blue" ] ; schema:manufacturer [ :OurCompany :AnotherCompany ] } :x1 schema:color "Red"; schema:manufacturer :OurCompany . :x2 schema:color "Cyan" ; schema:manufacturer :OurCompany . :x3 schema:color "Green" ; schema:manufacturer :Unknown . Try it: http://goo.gl/TgaoJ0  
  • 34. Single value sets Value sets with a single element A very common pattern Try it: http://goo.gl/W464fn <SpanishProduct> { schema:country [ :Spain ] } <FrenchProduct> { schema:country [ :France ] } <VideoGame> { a [ :VideoGame ] } :product1 schema:country :Spain . :product2 schema:country :France . :product3 a :VideoGame ; schema:country :Spain . Note: ShEx doesn't interact with inference It just checks if there is an rdf:type arc Inference can be done before/after validating ShEx can even be used to test inference systems
  • 35. Shape references Defines that the value must match another shape References are marked as @ :User { schema:worksFor @:Company ; } :Company { schema:name xsd:string } :alice a :User; schema:worksFor :OurCompany . :bob a :User; schema:worksFor :Another . :OurCompany schema:name "OurCompany" . :Another schema:name 23 . Try it: http://goo.gl/qPh7ry  
  • 36. Recursion and cyclic references Try it: http://goo.gl/507zss :User { schema:worksFor @:Company ; } :Company { schema:name xsd:string ; schema:employee @:User } :alice a :User; schema:worksFor :OurCompany . :bob a :User; schema:worksFor :Another . :OurCompany schema:name "OurCompany" ; schema:employee :alice . :Another schema:name 23 .   :Company schema:legalName xsd:string schema:worksFor schema:employee :User schema:name xsd:string
  • 37. Composed Shapes It is possible to use AND , OR and NOT to compose shapes Try it:http://goo.gl/XXlKs4 :User { schema:name xsd:string ; schema:worksFor IRI OR @:Company ?; schema:follows IRI OR BNode * } :Company { schema:founder IRI ?; schema:employee IRI {1,100} } :alice schema:name "Alice"; schema:follows :bob; schema:worksFor :OurCompany . :bob schema:name "Robert" ; schema:worksFor [ schema:Founder "Frank" ; schema:employee :carol ; ] . :carol schema:name "Carol" ; schema:follows [ schema:name "Emily" ; ] . :OurCompany schema:founder :dave ; schema:employee :alice, :bob .
  • 38. IRI ranges Try it: https://goo.gl/sNQi8n Note: IRI ranges are not yet implemented in RDFShape prefix codes: <http://example.codes/> :User { :status [ codes:~ ] } uri:~ represents the set of all URIs that start with stem uri prefix codes: <http://example.codes/> prefix other: <http://other.codes/> :x1 :status codes:resolved . :x2 :status other:done . :x3 :status <http://example.codes/pending> . 
  • 39. IRI Range exclusions The operator - excludes IRIs or IRI ranges from an IRI range prefix codes: <http://example.codes/> :User { :status [ codes:~ - codes:deleted ] } :x1 :status codes:resolved . :x2 :status other:done. :x3 :status <http://example.codes/pending> . :x4 :status codes:deleted .   Try it: https://goo.gl/BvtTi2
  • 40. Exercise Define a Schema for the following domain model :University :Course schema:name xsd:string :hasCourse :universityschema:name xsd:string :Student :hasStudent schema:name xsd:string rdf:type [schema:Person] :hasFriend schema:mbox IRI :Teacher rdf:type [schema:Person] schema:name xsd:string :empoloyee :teaches :isEnroledIn
  • 41. Nested shapes Syntax simplification to avoid defining two shapes Internally, the inner shape is identified using a blank node Try it (ShExDemo): https://goo.gl/z05kpL Try it (RDFShape): http://goo.gl/aLt4rO :User { schema:name xsd:string ; schema:worksFor { a [ schema:Company ] } } User { schema:name xsd:string ; schema:worksFor _:1 } _:1 a [ schema:Company ] . :alice schema:name "Alice" ; schema:worksFor :OurCompany . :OurCompany a schema:Company . ≡
  • 42. Implicit AND Shapes can be combined (implicit AND) :User { schema:name xsd:string ; schema:worksFor IRI @:Manager /^http://hr.example/id#[0-9]+/ } :Manager { schema:name xsd:string } :alice schema:name "Alice"; schema:worksFor <http://hr.example/id#9> . <http://hr.example/id> a :Manager .
  • 43. Labeled constraints $label <constraint> associates a constraint to a label It can later be used as &label :User { $:name ( schema:name . | schema:givenName . ; schema:familyName . ) ; schema:email IRI } :Employee { &:name ; :employeeId . } :Employee { ( schema:name . | schema:givenName . ; schema:familyName .) ; :employeeId . }
  • 44. Inverse triple constraints ^ reverses the order of the triple constaint Try it (RDFShape): http://goo.gl/CRj7J8 :User { schema:name xsd:string ; schema:woksFor @:Company } :Company { a [schema:Company] ; ^schema:worksFor @:User+ } :alice schema:name "Alice"; schema:worksFor :OurCompany . :bob schema:name "Bob" ; schema:worksFor :OurCompany . :OurCompany a schema:Company . Try it (ShEx demo): https://goo.gl/8omekl
  • 45. Repeated properties Try it (RDFShape): http://goo.gl/ik4IZc <User> { schema:name xsd:string; schema:parent @<Male>; schema:parent @<Female> } <Male> { schema:gender [schema:Male ] } <Female> { schema:gender [schema:Female] } :alice schema:name "Alice" ; schema:parent :bob, :carol . :bob schema:name "Bob" ; schema:gender schema:Male . :carol schema:name "Carol" ; schema:gender schema:Female .
  • 46. Allowing other triples Triple constraints limit all triples with a given predicate to match one of the constraints This is called closing a property Example: Try it (RDFShape): http://goo.gl/m4fPzY <Company> { a [ schema:Organization ] ; a [ org:Organization ] } :OurCompany a org:Organization, schema:Organization . :OurUniversity a org:Organization, schema:Organization, schema:CollegeOrUniversity . Sometimes we would like to permit other triples (open the property) 
  • 47. Allowing other triples EXTRA <listOfProperties> declares that a list of properties can contain extra values Example: Try it (RDFShape): http://goo.gl/m4fPzY <Company> EXTRA a { a [ schema:Organization ] ; a [ org:Organization ] } :OurCompany a org:Organization, schema:Organization . :OurUniversity a org:Organization, schema:Organization, schema:CollegeOrUniversity .
  • 48. Closed Shapes CLOSED can be used to limit the appearance of any predicate not mentioned in the shape expression :alice schema:name "Alice" ; schema:knows :bob . :bob schema:name "Bob" ; schema:knows :alice . :dave schema:name "Dave" ; schema:knows :emily ; :link2virus <virus> . :emily schema:name "Emily" ; schema:knows :dave . <User> { schema:name IRI; schema:knows @<User>* } <User> CLOSED { schema:name IRI; schema:knows @<User>* } Without closed, all match <User> With closed, only :alice and :bob match <User>Try without closed: http://goo.gl/vJEG5G Try with closed: http://goo.gl/KWDEEs
  • 49. Node constraints Constraints on the focus node <User> IRI { schema:name xsd:string ; schema:worksFor IRI } :alice schema:name "Alice"; :worksFor :OurCompany . _:1 schema:name "Unknown"; :worksFor :OurCompany . 
  • 50. Conjunction of Shape Expressions AND can be used to define conjunction on Shape Expressions <User> { schema:name xsd:string ; schema:worksFor IRI } AND { schema:worksFor @<Company> } Conjunctions are the default operator in SHACL
  • 51. Disjunction of Shape Expressions OR can be used to define disjunction of Shape Expressions :User { schema:name xsd:string } OR { schema:givenName xsd:string ; schema:familyName xsd:string }
  • 52. Negation NOT s creates a new shape expression from a shape s. Nodes conform to NOT s when they do not conform to s. :NoName Not { schema:name . } :alice schema:givenName "Alice" ; #Passes schema:familyName "Cooper" . :bob schema:name "Robert" . #Fails :carol schema:givenName "Carol" ; #Fails schema:name "Carol" .
  • 53. IF-THEN pattern Combining OR, NOT and AND it is possible to define IF-THEN… :Product { schema:productID . } AND NOT{ a [ schema:Vehicle ] } OR { schema:vehicleEngine . ; schema:fuelType . }
  • 54. Cyclic dependencies with negation One problem of combining NOT and recursion is the possibility of declarin ill-defined shapes :Barber { # Violates the negation requirement :shaves @:Person } AND NOT { :shaves @:Barber } :Person { schema:name xsd:string } :albert :shaves :dave . #Passes as a :Barber :bob schema:name "Robert" ; # Passes as a :Person :shaves :bob . # Passes :Barber? :dave schema:name "Dave" . #Passes as a :Person
  • 55. Restriction on cyclic dependencies and negation Constraint to avoid ill formed data models: Whenever a shape refers to itself either directly or indirectly, the chain of references cannot traverse an occurrence of the negation operation NOT.
  • 56. Semantic Actions Arbitrary code attached to shapes Can be used to perform operations with side effects Independent of any language/technology Several extension languages: GenX, GenJ (http://shex.io/extensions/) :alice schema:name "Alice" ; schema:birthDate "1980-01-23"^^xsd:date ; schema:deathDate "2013-01-23"^^xsd:date . :bob schema:name "Robert" ; schema:birthDate "2013-08-12"^^xsd:date ; schema:deathDate "1990-01-23"^^xsd:date . <Person> { schema:name xsd:string, schema:birthDate xsd:dateTime %js:{ report = _.o; return true; %}, schema:deathDate xsd:dateTime %js:{ return _[1].triple.o.lex > report.lex; %} %sparql:{ ?s schema:birthDate ?bd . FILTER (?o > ?bd) %} }
  • 57. Other features Current ShEx version: 2.0 Several features have been postponed for next version UNIQUE Inheritance (a Shape that extends another Shape)
  • 58. Future work & contributions More info http://shex.io ShEx currently under active development Curent work Improve error messages Language expressivity (combination of different operators) If you are interested, you can help List of issues: https://github.com/shexSpec/shex/issues