Skip to content

condition and function on same predicate-object returns undefined #17

@bjdmeest

Description

@bjdmeest

The yarrrml document below used on the "People (JSON)" example on Matey gives output below-below. I would expect the output of below-below-below. A rml document gets generated though, so I'm not sure whether this is an issue with the yarrrml-parser, or the RMLMapper

prefixes:
  ex: "http://example.com/"
  idlab-fn: http://example.com/idlab/function/
  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]
      - predicates: foaf:firstName
        objects:
          - function: grel:toUpperCase
            parameters:
              - parameter: grel:valueParameter
                value: $(firstname)
        condition:
          function: idlab-fn:stringContainsOtherString
          parameters:
            - [idlab-fn:str, $(firstname)]
            - [idlab-fn:otherStr, "J"]
            - [idlab-fn:delimiter, ""]

gives

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix ex: <http://example.com/>.
@prefix idlab-fn: <http://example.com/idlab/function/>.
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>.

ex:John a foaf:Person;
    foaf:firstName "undefined".
ex:Jane a foaf:Person;
    foaf:firstName "undefined".
ex:Sarah a foaf:Person.

but I would expect

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix ex: <http://example.com/>.
@prefix idlab-fn: <http://example.com/idlab/function/>.
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>.

ex:John a foaf:Person;
    foaf:firstName "JOHN".
ex:Jane a foaf:Person;
    foaf:firstName "JANE".
ex:Sarah a foaf:Person.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions