Skip to content

Supporting conditionals rules  #80

Open
@jatoledo

Description

@jatoledo

Error translating functions in RML at the PO level.

yarrrml mapping:

prefixes:
  grel: http://users.ugent.be/~bjdmeest/function/grel.ttl#
  idlab-fn: http://example.com/idlab/function/

mappings:
  person:
    sources:
     - [test.csv~csv]
    subject: http://example.org/$(firstname)
    predicateobjects:
     - predicates: foaf:firstName
       objects: $(firstname)
       condition:
        function: idlab-fn:equal
        parameters:
         - [grel:valueParameter, $(firstname)]
         - [grel:valueParameter2, "test"]

How is connected the TMP <person_0> with the function <function_person_0> ?

@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>.
@prefix idlab-fn: <http://example.com/idlab/function/>.
@prefix rr: <http://www.w3.org/ns/r2rml#>.
@prefix rml: <http://semweb.mmlab.be/ns/rml#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix ql: <http://semweb.mmlab.be/ns/ql#>.
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix schema: <http://schema.org/>.
@prefix formats: <http://www.w3.org/ns/formats/>.
@prefix comp: <http://semweb.mmlab.be/ns/rml-compression#>.
@prefix void: <http://rdfs.org/ns/void#>.
@prefix fnml: <http://semweb.mmlab.be/ns/fnml#>.
@base <http://example.com/ns#>.


<function_person_0> a fnml:Execution;
	fnml:function idlab-fn:equal ; 
	fnml:input
		[
			a fnml:Input;
			fnml:parameter grel:valueParameter;
			fnml:valueMap [
				a fnml:ValueMap;
				rml:reference "firstname";
			];
		],
		[
			a fnml:Input;
			fnml:parameter grel:valueParameter2;
			fnml:valueMap [
				a fnml:ValueMap;
				rr:constant "test";
			];
		].

<person_0> a rr:TriplesMap;

	rml:logicalSource [
		a rml:LogicalSource;
		rml:source "test.csv";
		rml:referenceFormulation ql:CSV
	];
	rr:subjectMap [
		a rr:SubjectMap;
		rr:template "http://example.org/{firstname}";
	];
	rr:predicateObjectMap [
		rr:predicateMap [
			a rr:PredicateMap;
			rr:constant foaf:firstName;
		];
		rr:objectMap [
			a rr:ObjectMap;
			rml:reference "firstname";
		];
	].



Version:
yatter: 1.1.2

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestnew-featurepetition for new feature supportto-doFor implementing in the future

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions