SHACL Flashcards

(10 cards)

1
Q

What is SHACL?

A

The W3C Shapes Constraint Language for defining and validating structural and value constraints on RDF graphs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Components of a SHACL NodeShape?

A

Shape name, targets (class/node/predicate-based), and property constraints.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to target all instances of a class?

A

Use sh:targetClass with the class IRI on a NodeShape.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to enforce exactly one property value?

A

In sh:property, set sh:minCount 1 and sh:maxCount 1 on the sh:path.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to enforce a property’s datatype?

A

Include sh:datatype with the appropriate XSD type in the property shape.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to restrict allowed values to a set?

A

Use sh:in with a list of permissible RDF terms.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to specify node kind (IRI, Literal)?

A

Use sh:nodeKind with sh:IRI, sh:Literal, or sh:BlankNode values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to combine or negate shapes?

A

Use logical constraints sh:and, sh:or, and sh:not.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to limit unknown properties?

A

Set sh:closed true and list exceptions with sh:ignoredProperties.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How are recursive shapes validated?

A

Through a fixpoint assignment process that ensures consistent node-shape mappings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly