This repository has been archived by the owner on Jun 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Example #2: shacl validation before sink
Nordine Bittich edited this page Mar 22, 2020
·
1 revision
- Create a new project (see previous example)
- Upload the following two files in it, then copy their id:
- run the /shacl-validation. You will need the shapesFileId uploaded before, and also the rdfModelFileId (either the bad input file or the valid one)
eg. :
curl -X GET "http://localhost:8088/api/project/738e4acb-3b5b-4560-aa85-df10879ea998/shacl-validation?rdfModelFileId=13ab4a21-6405-4da2-a1e8-4d5968e24599&shapesFileId=4f9945d4-96e1-47bc-890d-658e3936ff41" -H "accept: */*"
Response (in case of bad input):
{
"@graph" : [ {
"@id" : "_:b0",
"@type" : "sh:ValidationResult",
"focusNode" : "ex:pete",
"resultMessage" : "DatatypeConstraint[xsd:integer] : Got datatype http://www.w3.org/2001/XMLSchema#string : Node \"30\"",
"resultPath" : "ex:age",
"resultSeverity" : "sh:Violation",
"sourceConstraintComponent" : "sh:DatatypeConstraintComponent",
"sourceShape" : "_:b1",
"value" : "30"
}, {
"@id" : "_:b2",
"@type" : "sh:ValidationReport",
"sh:conforms" : false,
"result" : "_:b0"
} ],
"@context" : {
"value" : {
"@id" : "http://www.w3.org/ns/shacl#value"
},
"resultPath" : {
"@id" : "http://www.w3.org/ns/shacl#resultPath",
"@type" : "@id"
},
"sourceShape" : {
"@id" : "http://www.w3.org/ns/shacl#sourceShape",
"@type" : "@id"
},
"resultMessage" : {
"@id" : "http://www.w3.org/ns/shacl#resultMessage"
},
"sourceConstraintComponent" : {
"@id" : "http://www.w3.org/ns/shacl#sourceConstraintComponent",
"@type" : "@id"
},
"resultSeverity" : {
"@id" : "http://www.w3.org/ns/shacl#resultSeverity",
"@type" : "@id"
},
"focusNode" : {
"@id" : "http://www.w3.org/ns/shacl#focusNode",
"@type" : "@id"
},
"conforms" : {
"@id" : "http://www.w3.org/ns/shacl#conforms",
"@type" : "http://www.w3.org/2001/XMLSchema#boolean"
},
"result" : {
"@id" : "http://www.w3.org/ns/shacl#result",
"@type" : "@id"
},
"ex" : "http://azerty.com/",
"rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"sh" : "http://www.w3.org/ns/shacl#",
"xsd" : "http://www.w3.org/2001/XMLSchema#",
"rdfs" : "http://www.w3.org/2000/01/rdf-schema#"
}
}
© artcoded.tech