-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Issue type: 🐛 Bug
Description
when using a function for a predicate, parsing fails with error: TypeError: po.predicates.forEach is not a function
funnily enough, using this approach in subject or object works
Steps
using dummy data:
input data:
{
"persons": [
{
"firstname": "John",
"lastname": "Doe",
"male": true
},
{
"firstname": "Jane",
"lastname": "Smith",
"male": false
},
{
"firstname": "Sarah",
"lastname": "Bladinck",
"male": false
}
]
}prefixes:
ex: "http://example.com/"
grel: "http://users.ugent.be/~bjdmeest/function/grel.ttl#"
mappings:
person:
sources:
- ['data.json~jsonpath', '$.persons[*]']
s: http://example.com/$(firstname)
po:
- [a, foaf:Person]
- [ex:name, $(firstname)]
- p:
function: grel:controls_if
parameters:
- [ grel:bool_b, $(male) ]
- [ grel:any_true, ex:notApplicable~iri ]
- [ grel:any_false, ex:myTest~iri ]
o:
function: grel:controls_if
parameters:
- [ grel:bool_b, $(male) ]
- [ grel:any_true, ex:myTest~iri ]
- [ grel:any_false, "SHE IS FEMALE" ]expected behaviour should be:
if male = true, the po pair should be mapped as ex:notApplicable ex:myTest
if male = false, the po pair should be mapped as ex:myTest "SHE IS FEMALE"
could be related to #206
Environment
Add the version of Java and OS that is used.
=====> Java17 - Windows - yarrrml-parser v.1.11.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels