PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation . ?obs sdmx-dimension:age ?age . FILTER (?age < 0) } THEN { ?obs ler:inconsistentWith leri:num1 . }
0 <= age
Age must be zero or a positive number
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX eg: <http://example.org/ns#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation . ?obs eg:height ?height . FILTER (?height <= 0) } THEN { ?obs ler:inconsistentWith leri:num2 . }
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX eg: <http://example.org/ns#> PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation . ?obs sdmx-dimension:age ?age . FILTER (?age > 150) } THEN { ?obs ler:inconsistentWith leri:num3 . }
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX eg: <http://example.org/ns#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation . ?obs sdmx-dimension:age ?age . ?obs eg:yearsMarried ?yearsMarried . FILTER (?yearsMarried > ?age) } THEN { ?obs ler:inconsistentWith leri:num4 . }
A person can't be married more years than her age
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX eg: <http://example.org/ns#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#> PREFIX sdmx-code: <http://purl.org/linked-data/sdmx/2009/code#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation . ?obs sdmx-dimension:civilStatus ?civilStatus . ?obs eg:agegroup ?ageGroup . FILTER (?ageGroup = eg:child && ?civilStatus = sdmx-code:status-M) } THEN { ?obs ler:inconsistentWith leri:cat5 . }
if( agegroup == 'child' ) status != 'married'
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX eg: <http://example.org/ns#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#> PREFIX sdmx-code: <http://purl.org/linked-data/sdmx/2009/code#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation . ?obs sdmx-dimension:civilStatus ?civilStatus . ?obs eg:yearsMarried ?yearsMarried . ?obs sdmx-dimension:age ?age . FILTER ((?age < ?yearsMarried + 17) && (?civilStatus = sdmx-code:status-M || ?civilStatus = sdmx-code:status-W)) } THEN { ?obs ler:inconsistentWith leri:mix6 . }
if( age < yearsmarried + 17 ) !( status %in% c('married', 'widowed') )
An underage can't be married nor widowed
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX eg: <http://example.org/ns#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation . ?obs eg:agegroup ?ageGroup . ?obs sdmx-dimension:age ?age . FILTER ((?age < 18) && (?ageGroup = eg:adult || ?ageGroup = eg:elderly)) } THEN { ?obs ler:inconsistentWith leri:mix7 . }
if( age < 18 ) !( agegroup %in% c('adult', 'elderly') )
An underage can't be an adult nor an elderly
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX eg: <http://example.org/ns#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation . ?obs eg:agegroup ?ageGroup . ?obs sdmx-dimension:age ?age . FILTER ((18 <= ?age && ?age < 65) && (?ageGroup = eg:child || ?ageGroup = eg:elderly)) } THEN { ?obs ler:inconsistentWith leri:mix8 . }
if( 18 <= age & age < 65 ) !( agegroup %in% c('child', 'elderly') )
Persons aged between 18 and 64 can't be children nor elderly
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX eg: <http://example.org/ns#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation . ?obs eg:agegroup ?ageGroup . ?obs sdmx-dimension:age ?age . FILTER ((65 <= ?age) && (?ageGroup = eg:adult || ?ageGroup = eg:child)) } THEN { ?obs ler:inconsistentWith leri:mix9 . }
if( 65 <= age ) !( agegroup %in% c('adult', 'child') )
People above 65 years old can't be adults nor children