13
Validata: A tool for testing profile conformance Alasdair J G Gray Heriot-Watt University www.macs.hw.ac.uk/~ajg33 [email protected] @gray_alasdair Andrew Beveridge Jacob Baungard Hansen Johnny Val Leif Gehrmann Roisin Farmer Sunil Khutan Tomas Robertson

Validata: A tool for testing profile conformance

Embed Size (px)

Citation preview

Page 1: Validata: A tool for testing profile conformance

Validata: A tool for testing

profile conformance

Alasdair J G GrayHeriot-Watt University www.macs.hw.ac.uk/~ajg33

[email protected]@gray_alasdair

Andrew BeveridgeJacob Baungard HansenJohnny ValLeif GehrmannRoisin FarmerSunil KhutanTomas Robertson

Page 2: Validata: A tool for testing profile conformance

HCLS Dataset Descriptions

https://www.w3.org/TR/hcls-dataset/Dumontier M, Gray AJG, Marshall MS, et al. (2016) The health care

and life sciences community profile for dataset descriptions.

PeerJ 4:e2331 https://doi.org/10.7717/peerj.2331

1 December 2016@gray_alasdair www.macs.hw.ac.uk/~ajg33

2

Page 3: Validata: A tool for testing profile conformance

Requirements

• Online tool

– Deployable on W3C server

– GUI

– API

• Support multiple constraints

–Properties

–Data values

–…

• Requirement levels

– Different levels of user messages: Error, Warning, Information

• Configurable

– HCLS (Required)

– DCAT, Open PHACTS, etc(Optional)

1 December 2016@gray_alasdair

www.macs.hw.ac.uk/~ajg333

Page 4: Validata: A tool for testing profile conformance

Example Constraint

1 December 2016 4

• Shape

• A Dataset

– MUST be declared to be of type dctype:Dataset

– MUST have a dcterms:title as a language typed string

– MUST NOT have dcterms:created date

<Dataset> rdf:langString

.✗

@gray_alasdair

www.macs.hw.ac.uk/~ajg33

Dates are associated with versions in HCLS

Page 5: Validata: A tool for testing profile conformance

Example Validation

1 December 2016 5

<Dataset> rdf:langString

.✗

@gray_alasdair

www.macs.hw.ac.uk/~ajg33

• Shape

• Data

Page 6: Validata: A tool for testing profile conformance

Example Validation

• Shape

• Data

1 December 2016 6

<Dataset> rdf:langString

.✗

@gray_alasdair

www.macs.hw.ac.uk/~ajg33

Page 7: Validata: A tool for testing profile conformance

Example Validation

1 December 2016 7

<Dataset> rdf:langString

.✗

@gray_alasdair

www.macs.hw.ac.uk/~ajg33

• Shape

• Data

Page 8: Validata: A tool for testing profile conformance

<Dataset> {

rdf:type (dctypes:Dataset),

dct:title rdf:langString,

dct:alternative rdf:langString+,

!dct:created .

}

Shape

1 December 2016 8

<Dataset> rdf:langString

.✗

@gray_alasdair

www.macs.hw.ac.uk/~ajg33

Shape Expressions (ShEx)

Page 9: Validata: A tool for testing profile conformance

1 December 2016 9@gray_alasdair

www.macs.hw.ac.uk/~ajg33

ShEx: Validation

<Dataset> {

rdf:type (dctypes:Dataset),

dct:title rdf:langString,

dct:alternative rdf:langString+,

!dct:created .

}

<Dataset> {

rdf:type (dctypes:Dataset),

dct:title rdf:langString,

dct:alternative rdf:langString+,

!dct:created .

}

<Dataset> {

rdf:type (dctypes:Dataset),

dct:title rdf:langString,

dct:alternative rdf:langString+,

!dct:created .

}

<Dataset> {

rdf:type (dctypes:Dataset),

dct:title rdf:langString,

dct:alternative rdf:langString+,

!dct:created .

}

<Dataset> {

rdf:type (dctypes:Dataset),

dct:title rdf:langString,

dct:alternative rdf:langString+,

!dct:created .

}

<Dataset> {

rdf:type (dctypes:Dataset),

dct:title rdf:langString,

dct:alternative rdf:langString+,

!dct:created .

}

Validator can’t warn of missing property

Example data

Page 10: Validata: A tool for testing profile conformance

<Dataset> {

`MUST` rdf:type (dctypes:Dataset),

`MUST` dct:title rdf:langString,

`MAY` dct:alternative rdf:langString+,

`MUST` !dct:created .

}

Shape

1 December 2016 10

<Dataset> rdf:langString

.✗

@gray_alasdair

www.macs.hw.ac.uk/~ajg33

Requirement Levels

Validator can warn of missing property

Page 11: Validata: A tool for testing profile conformance

Implementation

Validata

• Web app front end

• Javascript + HTML

• Relies on ShEx-validator

– Validates documents

– Returns report

https://github.com/HW-

SWeL/Validata

ShEx-validator

• Validation system

• Validation API

• Javascript

– nodejs engine

• Reuses

– n3: RDF Library

– ShExParser

https://github.com/HW-

SWeL/ShEx-validator

1 December 2016@gray_alasdair www.macs.hw.ac.uk/~ajg33

11

Page 12: Validata: A tool for testing profile conformance

http://hw-swel.github.io/Validata/

VALIDATA DEMO

Page 13: Validata: A tool for testing profile conformance

Validata

https://github.com/HW-SWeL/Validata

• RDF constraint validation tool

– Configurable to any profile

• Shape Expression (ShEx) constraints

• Open source javascript implementation

www.macs.hw.ac.uk/~ajg33/

[email protected]

@gray_alasdair