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

Commit

Permalink
@graph container support (#549)
Browse files Browse the repository at this point in the history
* Add @graph container tests.

* A couple of more graph expansion and compaction tests for corner cases.

* Add tests for expanding and compacting named graphs where term definition includes `@graphid`.

* Expand and compact `@container: @index` where value is a graph.

* Disable highlight.js, and update our use of the "highlight" class to "hl-bold". This makes rendered JavaScript examples slightly less pretty, but restores the specific highlighting used with "****" in examples.

* Sort many definition lists automatically using `@data-sort`.

* Add @Version to context definitions in examples using 1.1 features.

* Syntax updates to describe Graph Containers.

* Add inline ednotes for places that are affected by issue #480.

* Add compaction and expansion tests for `@graph` with `@index` and `@id`.

* Add syntax for graph maps and API algorithms for all graph containers.
  • Loading branch information
davidlehn authored and gkellogg committed Dec 7, 2017
1 parent c911ac4 commit 149dd63
Show file tree
Hide file tree
Showing 56 changed files with 640 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compact-0077-context.jsonld
@@ -0,0 +1,7 @@
{
"@context": {
"@version": 1.1,
"input": {"@id": "foo:input", "@container": "@graph"},
"value": "foo:value"
}
}
10 changes: 10 additions & 0 deletions compact-0077-in.jsonld
@@ -0,0 +1,10 @@
{
"@context": {
"@version": 1.1,
"input": {"@id": "foo:input", "@container": "@graph"},
"value": "foo:value"
},
"input": {
"value": "x"
}
}
13 changes: 13 additions & 0 deletions compact-0077-out.jsonld
@@ -0,0 +1,13 @@
{
"@context": {
"@version": 1.1,
"input": {
"@id": "foo:input",
"@container": "@graph"
},
"value": "foo:value"
},
"input": {
"value": "x"
}
}
7 changes: 7 additions & 0 deletions compact-0078-context.jsonld
@@ -0,0 +1,7 @@
{
"@context": {
"@version": 1.1,
"input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
"value": "foo:value"
}
}
10 changes: 10 additions & 0 deletions compact-0078-in.jsonld
@@ -0,0 +1,10 @@
{
"@context": {
"@version": 1.1,
"input": {"@id": "foo:input", "@container": "@graph"},
"value": "foo:value"
},
"input": {
"value": "x"
}
}
13 changes: 13 additions & 0 deletions compact-0078-out.jsonld
@@ -0,0 +1,13 @@
{
"@context": {
"@version": 1.1,
"input": {
"@id": "foo:input",
"@container": ["@graph", "@set"]
},
"value": "foo:value"
},
"input": [{
"value": "x"
}]
}
6 changes: 6 additions & 0 deletions compact-0079-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": "@graph"}
}
}
8 changes: 8 additions & 0 deletions compact-0079-in.jsonld
@@ -0,0 +1,8 @@
[{
"http://example.org/input": [{
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}],
"@index": "ndx"
}]
}]
9 changes: 9 additions & 0 deletions compact-0079-out.jsonld
@@ -0,0 +1,9 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": "@graph"}
},
"input": {
"value": "x"
}
}
6 changes: 6 additions & 0 deletions compact-0080-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": "@graph"}
}
}
8 changes: 8 additions & 0 deletions compact-0080-in.jsonld
@@ -0,0 +1,8 @@
[{
"http://example.org/input": [{
"@id": "http://example.org/gid",
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}]
}]
}]
14 changes: 14 additions & 0 deletions compact-0080-out.jsonld
@@ -0,0 +1,14 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": "@graph"}
},
"input": {
"@id": "http://example.org/gid",
"@graph": [
{
"value": "x"
}
]
}
}
6 changes: 6 additions & 0 deletions compact-0081-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@index"]}
}
}
8 changes: 8 additions & 0 deletions compact-0081-in.jsonld
@@ -0,0 +1,8 @@
[{
"http://example.org/input": [{
"@index": "g1",
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}]
}]
}]
9 changes: 9 additions & 0 deletions compact-0081-out.jsonld
@@ -0,0 +1,9 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@index"]}
},
"input": {
"g1": {"value": "x"}
}
}
6 changes: 6 additions & 0 deletions compact-0082-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@index", "@set"]}
}
}
8 changes: 8 additions & 0 deletions compact-0082-in.jsonld
@@ -0,0 +1,8 @@
[{
"http://example.org/input": [{
"@index": "g1",
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}]
}]
}]
9 changes: 9 additions & 0 deletions compact-0082-out.jsonld
@@ -0,0 +1,9 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@index", "@set"]}
},
"input": {
"g1": [{"value": "x"}]
}
}
6 changes: 6 additions & 0 deletions compact-0083-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@index"]}
}
}
9 changes: 9 additions & 0 deletions compact-0083-in.jsonld
@@ -0,0 +1,9 @@
[{
"http://example.org/input": [{
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}],
"@index": "g1",
"@id": "http://example.org/id"
}]
}]
11 changes: 11 additions & 0 deletions compact-0083-out.jsonld
@@ -0,0 +1,11 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@index"]}
},
"input": {
"@id": "http://example.org/id",
"@index": "g1",
"@graph": [{"value": "x"}]
}
}
6 changes: 6 additions & 0 deletions compact-0084-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id"]}
}
}
7 changes: 7 additions & 0 deletions compact-0084-in.jsonld
@@ -0,0 +1,7 @@
[{
"http://example.org/input": [{
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}]
}]
}]
9 changes: 9 additions & 0 deletions compact-0084-out.jsonld
@@ -0,0 +1,9 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id"]}
},
"input": {
"_:b0": {"value": "x"}
}
}
6 changes: 6 additions & 0 deletions compact-0085-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id"]}
}
}
8 changes: 8 additions & 0 deletions compact-0085-in.jsonld
@@ -0,0 +1,8 @@
[{
"http://example.org/input": [{
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}],
"@id": "http://example.org/id"
}]
}]
9 changes: 9 additions & 0 deletions compact-0085-out.jsonld
@@ -0,0 +1,9 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id"]}
},
"input": {
"http://example.org/id" : {"value": "x"}
}
}
6 changes: 6 additions & 0 deletions compact-0086-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id", "@set"]}
}
}
7 changes: 7 additions & 0 deletions compact-0086-in.jsonld
@@ -0,0 +1,7 @@
[{
"http://example.org/input": [{
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}]
}]
}]
7 changes: 7 additions & 0 deletions compact-0086-out.jsonld
@@ -0,0 +1,7 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id", "@set"]}
},
"input": {"_:b0": [{"value": "x"}]}
}
6 changes: 6 additions & 0 deletions compact-0087-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id", "@set"]}
}
}
8 changes: 8 additions & 0 deletions compact-0087-in.jsonld
@@ -0,0 +1,8 @@
[{
"http://example.org/input": [{
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}],
"@id": "http://example.org/id"
}]
}]
9 changes: 9 additions & 0 deletions compact-0087-out.jsonld
@@ -0,0 +1,9 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id", "@set"]}
},
"input": {
"http://example.org/id" : [{"value": "x"}]
}
}
6 changes: 6 additions & 0 deletions compact-0088-context.jsonld
@@ -0,0 +1,6 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id"]}
}
}
8 changes: 8 additions & 0 deletions compact-0088-in.jsonld
@@ -0,0 +1,8 @@
[{
"http://example.org/input": [{
"@graph": [{
"http://example.org/value": [{"@value": "x"}]
}],
"@index": "ndx"
}]
}]
9 changes: 9 additions & 0 deletions compact-0088-out.jsonld
@@ -0,0 +1,9 @@
{
"@context": {
"@vocab": "http://example.org/",
"input": {"@container": ["@graph", "@id"]}
},
"input": {
"_:b0": {"value": "x"}
}
}

0 comments on commit 149dd63

Please sign in to comment.