forked from semantifyit/RocketRML
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from comake/fix/json-arrays
Fix: Allow json arrays
- Loading branch information
Showing
5 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name":"Tom A.", | ||
"favorite-numbers": [ 3, 33, 13 ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@prefix rr: <http://www.w3.org/ns/r2rml#> . | ||
@prefix rml: <http://semweb.mmlab.be/ns/rml#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix ql: <http://semweb.mmlab.be/ns/ql#> . | ||
@base <http://sti2.at/> . #the base for the classes | ||
|
||
<#LOGICALSOURCE> | ||
rml:source "./tests/arrayValueMapping/input.json"; | ||
rml:referenceFormulation ql:JSONPath; | ||
rml:iterator "$". | ||
|
||
|
||
<#Mapping> | ||
rml:logicalSource <#LOGICALSOURCE>; | ||
|
||
rr:subjectMap [ | ||
rr:termType rr:BlankNode; | ||
rr:class schema:Person; | ||
]; | ||
|
||
|
||
rr:predicateObjectMap [ | ||
rr:predicateMap [ rr:constant "http://schema.org/name" ]; | ||
rr:objectMap [ rml:reference "name" ]; | ||
]; | ||
|
||
rr:predicateObjectMap [ | ||
rr:predicateMap [ rr:constant "http://example.com/favorite-numbers" ]; | ||
rr:objectMap [ | ||
rml:reference "favorite-numbers" ; | ||
rr:datatype "http://www.w3.org/2001/XMLSchema#integer" ; | ||
]; | ||
] . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[ | ||
{ | ||
"@type": "http://schema.org/Person", | ||
"http://schema.org/name": "Tom A.", | ||
"http://example.com/favorite-numbers": [ | ||
{ | ||
"@value": "3", | ||
"@type": "http://www.w3.org/2001/XMLSchema#integer" | ||
}, | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#integer", | ||
"@value": "33" | ||
}, | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#integer", | ||
"@value": "13" | ||
} | ||
], | ||
"@id": "_:http%3A%2F%2Fsti2.at%2F%23Mapping_1" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters