Skip to content

Commit

Permalink
add expression field shape and expression or iterable field shape
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaria committed Jan 10, 2025
1 parent 6bfa7ec commit ba8dfd4
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions shapes/lv.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ rmlsh:LogicalViewShape a sh:NodeShape ;
sh:path rml:field ;
sh:minCount 1 ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:xone (
[ sh:node rmlsh:ExpressionFieldShape ]
[ sh:node rmlsh:IterableFieldShape ]
)
] , [
sh:description """
A left join of the logical view.
Expand Down Expand Up @@ -110,19 +114,37 @@ rmlsh:FieldShape a sh:NodeShape ;
""" ;
sh:path rml:field ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:xone (
[ sh:node rmlsh:ExpressionFieldShape ]
[ sh:node rmlsh:IterableFieldShape ]
)
] .

rmlsh:ExpressionFieldShape a sh:NodeShape ;
rdfs:label "Expression Field" ;
rdfs:comment """
A expression field is an expression map that gives a name to an expression.
""" ;
sh:message """
Node must have a valid rml:ExpressionField description.
rml:ExpressionField requires what an rml:ExpressionMap and rml:Field requires.
""" ;
sh:targetClass rml:ExpressionField ;
sh:node rmlsh:ExpressionMap, rmlsh:Field ; # TODO requires rmlsh:ExpressionMap to be defined in core
.

rmlsh:IterableFieldShape a sh:NodeShape ;
rdfs:label "Iterable Field" ;
rdfs:comment """
An iterable field is a construction that gives a name to logical iterations derived from the parent of the field.
""" ;
sh:message """
Node must have a valid rml:IterableField description.
rml:IterableField must one or more rml:field properties.
Furthermore, rml:IterableField requires what an rml:Iterable and rml:Field requires,.
rml:IterableField must have one or more rml:field properties.
Furthermore, rml:IterableField requires what an rml:Iterable and rml:Field requires.
""" ;
sh:targetClass rml:IterableField ;
sh:node rmlsh:Iterable, rmlsh:Field ; # TODO requires rmlsh:Iterable to be defined in core
sh:property [
sh:description """
A child field of the iterable field.
Expand All @@ -133,6 +155,10 @@ rmlsh:IterableFieldShape a sh:NodeShape ;
sh:path rml:field ;
sh:minCount 1 ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:xone (
[ sh:node rmlsh:ExpressionFieldShape ]
[ sh:node rmlsh:IterableFieldShape ]
)
] .

rmlsh:LogicalViewJoinShape a sh:NodeShape ;
Expand Down Expand Up @@ -181,6 +207,10 @@ rmlsh:LogicalViewJoinShape a sh:NodeShape ;
sh:path rml:field ;
sh:minCount 1 ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:xone (
[ sh:node rmlsh:ExpressionFieldShape ]
[ sh:node rmlsh:IterableFieldShape ]
)
] .

rmlsh:StructuralAnnotationShape a sh:NodeShape;
Expand Down

0 comments on commit ba8dfd4

Please sign in to comment.