Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

Commit

Permalink
Fix bug when processing blank nodes with reverse properties
Browse files Browse the repository at this point in the history
  • Loading branch information
lanthaler committed Oct 21, 2013
1 parent 9d807a3 commit abfe79d
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flatten-0045-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@context": {
"foo": "http://example.org/foo",
"bar": { "@reverse": "http://example.org/bar", "@type": "@id" }
},
"foo": "Foo",
"bar": [ "http://example.org/origin", "_:b0" ]
}
14 changes: 14 additions & 0 deletions flatten-0045-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"@id": "_:b0",
"http://example.org/foo": [ { "@value": "Foo" } ]
},
{
"@id": "_:b1",
"http://example.org/bar": [ { "@id": "_:b0" } ]
},
{
"@id": "http://example.org/origin",
"http://example.org/bar": [ { "@id": "_:b0" } ]
}
]
7 changes: 7 additions & 0 deletions flatten-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,13 @@
"input": "flatten-0044-in.jsonld",
"context": "flatten-0044-context.jsonld",
"expect": "flatten-0044-out.jsonld"
}, {
"@id": "#t0045",
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
"name": "Blank nodes with reverse properties",
"purpose": "Proper (re-)labeling of blank nodes if used with reverse properties.",
"input": "flatten-0045-in.jsonld",
"expect": "flatten-0045-out.jsonld"
}
]
}
8 changes: 8 additions & 0 deletions toRdf-0119-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@context": {
"foo": "http://example.org/foo",
"bar": { "@reverse": "http://example.org/bar", "@type": "@id" }
},
"foo": "Foo",
"bar": [ "http://example.org/origin", "_:b0" ]
}
3 changes: 3 additions & 0 deletions toRdf-0119-out.nq
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<http://example.org/origin> <http://example.org/bar> _:b0 .
_:b0 <http://example.org/foo> "Foo" .
_:b1 <http://example.org/bar> _:b0 .
7 changes: 7 additions & 0 deletions toRdf-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,13 @@
},
"input": "toRdf-0118-in.jsonld",
"expect": "toRdf-0118-out.nq"
}, {
"@id": "#t0119",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
"name": "Blank nodes with reverse properties",
"purpose": "Proper (re-)labeling of blank nodes if used with reverse properties.",
"input": "toRdf-0119-in.jsonld",
"expect": "toRdf-0119-out.nq"
}
]
}

0 comments on commit abfe79d

Please sign in to comment.