Skip to content

AST and validation plan

hmottestad edited this page Apr 12, 2017 · 1 revision

Notes from April 12th 2017

Shape
	targetClass
	property PropertyShape


PropertyShape
	minCount MinCount
	maxCount MaxCount
	path rdf4j Resource
	or	PropertyShape | or | and | not
	and PropertyShape | or | and | not
	not PropertyShape | or | and | not




AST --generate--> (validation) Plan

### SHACL ###
[]
	sh:targetClass foaf:Person;
	sh:property [
		sh:path foaf:name;
		sh:maxCount 1
	]

### AST ###
shape = new Shape(foaf:Person);

property = new Property();
property.setPath(foaf:name)
property.setMaxCount(1)

shape.addProperty(property)


### Plan ###
Iterate over all instances of foaf:Person. (STORE)
 - Iterate over all foaf:name predicates (STORE)
 	- Count
 		- compare with 1


Added data
Store data


### Optimize ###
-Iterate over all instances of foaf:Person. (ADDED)
 - Iterate over all foaf:name predicates (ADDED)
 	- count
 		- compare with 1
 	- Iterate over all foaf:name predicates where count > 0(STORE)

Iterate over all instances of foaf:Person. (STORE)
 - Iterate over all foaf:name predicates (STORE)
 	- Count
 		- compare with 1



add:
	:a foaf:name "A".

	:b a foaf:Person;
		foaf:name "B".







Clone this wiki locally