diff --git a/README.md b/README.md index c60d033..b6a9b5f 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,9 @@ The [original library](https://github.com/kazarena/json-gold) was written by Sta ## Testing & Compliance ## -As of December 1, 2017: +As of December 26, 2018: -* all JSON-LD 1.0 tests from the [official JSON-LD test suite](https://github.com/json-ld/json-ld.org/tree/master/test-suite) pass +* all JSON-LD 1.0 tests from the [official JSON-LD test suite](https://github.com/json-ld/json-ld.org/tree/master/test-suite) pass, with one exception: [framing test #tg010](https://github.com/melville-wiley/json-ld.org/blob/3461fd0005cd8e338cd3729c4714163e9217e619/test-suite/tests/frame-manifest.jsonld#L530). See the discussion [here](https://github.com/json-ld/json-ld.org/pull/663). It appears that while it's meant to be a 1.0 test, the fix in pyLD was implemented in the 1.1 section of the framing code. This needs further investigation. * all RDF Dataset Normalisation tests from the [current test suite](https://json-ld.github.io/normalization/tests/index.html) pass * JSON-LD 1.1 spec is not currenty supported diff --git a/ld/context.go b/ld/context.go index 9118a8f..ac7fdee 100644 --- a/ld/context.go +++ b/ld/context.go @@ -167,6 +167,12 @@ func (c *Context) parse(localContext interface{}, remoteContexts []string) (*Con } else if vocabString, isString := vocabValue.(string); isString { if IsAbsoluteIri(vocabString) { result.values["@vocab"] = vocabValue + } else if vocabString == "" { + if baseVal, hasBase := result.values["@base"]; hasBase { + result.values["@vocab"] = baseVal + } else { + return nil, NewJsonLdError(InvalidVocabMapping, "@vocab is empty but @base is not specified") + } } else { return nil, NewJsonLdError(InvalidVocabMapping, "@vocab must be an absolute IRI") } @@ -1012,22 +1018,27 @@ func (c *Context) ExpandValue(activeProperty string, value interface{}) (interfa td := c.GetTermDefinition(activeProperty) // 1) if td != nil && td["@type"] == "@id" { - // TODO: i'm pretty sure value should be a string if the @type is - // @id - var err error - rval["@id"], err = c.ExpandIri(value.(string), true, false, nil, nil) - if err != nil { - return nil, err + if strVal, isString := value.(string); isString { + var err error + rval["@id"], err = c.ExpandIri(strVal, true, false, nil, nil) + if err != nil { + return nil, err + } + } else { + rval["@value"] = value } return rval, nil } // 2) if td != nil && td["@type"] == "@vocab" { - // TODO: same as above - var err error - rval["@id"], err = c.ExpandIri(value.(string), true, true, nil, nil) - if err != nil { - return nil, err + if strVal, isString := value.(string); isString { + var err error + rval["@id"], err = c.ExpandIri(strVal, true, true, nil, nil) + if err != nil { + return nil, err + } + } else { + rval["@value"] = value } return rval, nil } diff --git a/ld/processor_test.go b/ld/processor_test.go index 2e4a552..2f32407 100644 --- a/ld/processor_test.go +++ b/ld/processor_test.go @@ -244,9 +244,14 @@ func TestSuite(t *testing.T) { expectedFileName = testMap["result"].(string) } + testName := testId + if strings.HasPrefix(testName, "#") { + testName = manifestURI + testName + } + td := &TestDefinition{ Id: testId, - Name: manifestURI + testId, + Name: testName, Type: testType, EvaluationType: testEvaluationType, InputURL: inputURL, @@ -402,7 +407,7 @@ func TestSuite(t *testing.T) { options.Algorithm = "URGNA2012" result, opError = proc.Normalize(input, options) case "rdfn:Urdna2015EvalTest": - log.Println("Running URDNA2015 test", td.Id, ":", td.Name) + log.Println("Running URDNA2015 test", td.Name) inputBytes, err := ioutil.ReadFile(td.InputFileName) assert.NoError(t, err) diff --git a/ld/serialize_nquads.go b/ld/serialize_nquads.go index 0c78af9..70dc8ab 100644 --- a/ld/serialize_nquads.go +++ b/ld/serialize_nquads.go @@ -132,9 +132,47 @@ func escape(str string) string { } const ( - wso = "[ \\t]*" - iri = "(?:<([^>]*)>)" - bnode = "(_:(?:[A-Za-z][A-Za-z0-9]*))" + wso = "[ \\t]*" + iri = "(?:<([^:]+:[^>]*)>)" + + // https://www.w3.org/TR/turtle/#grammar-production-BLANK_NODE_LABEL + + pnCharsBase = "A-Z" + "a-z" + + "\u00C0-\u00D6" + + "\u00D8-\u00F6" + + "\u00F8-\u02FF" + + "\u0370-\u037D" + + "\u037F-\u1FFF" + + "\u200C-\u200D" + + "\u2070-\u218F" + + "\u2C00-\u2FEF" + + "\u3001-\uD7FF" + + "\uF900-\uFDCF" + + "\uFDF0-\uFFFD" + // TODO: + //"\u10000-\uEFFFF" + + pnCharsU = pnCharsBase + "_" + + pnChars = pnCharsU + + "0-9" + + "-" + + "\u00B7" + + "\u0300-\u036F" + + "\u203F-\u2040" + + blankNodeLabel = "(_:" + + "(?:[" + pnCharsU + "0-9])" + + "(?:(?:[" + pnChars + ".])*(?:[" + pnChars + "]))?" + + ")" + + // '(_:' + + // '(?:[' + PN_CHARS_U + '0-9])' + + // '(?:(?:[' + PN_CHARS + '.])*(?:[' + PN_CHARS + ']))?' + + // ')'; + + bnode = blankNodeLabel + plain = "\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"" datatype = "(?:\\^\\^" + iri + ")" language = "(?:@([a-z]+(?:-[a-zA-Z0-9]+)*))" diff --git a/ld/testdata/compact-0077-context.jsonld b/ld/testdata/compact-0077-context.jsonld new file mode 100644 index 0000000..f447559 --- /dev/null +++ b/ld/testdata/compact-0077-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + } +} diff --git a/ld/testdata/compact-0077-in.jsonld b/ld/testdata/compact-0077-in.jsonld new file mode 100644 index 0000000..8514ced --- /dev/null +++ b/ld/testdata/compact-0077-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + }, + "input": { + "value": "x" + } +} diff --git a/ld/testdata/compact-0077-out.jsonld b/ld/testdata/compact-0077-out.jsonld new file mode 100644 index 0000000..3f44ffb --- /dev/null +++ b/ld/testdata/compact-0077-out.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "@version": 1.1, + "input": { + "@id": "foo:input", + "@container": "@graph" + }, + "value": "foo:value" + }, + "input": { + "value": "x" + } +} diff --git a/ld/testdata/compact-0078-context.jsonld b/ld/testdata/compact-0078-context.jsonld new file mode 100644 index 0000000..6b66ae3 --- /dev/null +++ b/ld/testdata/compact-0078-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": ["@graph", "@set"]}, + "value": "foo:value" + } +} diff --git a/ld/testdata/compact-0078-in.jsonld b/ld/testdata/compact-0078-in.jsonld new file mode 100644 index 0000000..8514ced --- /dev/null +++ b/ld/testdata/compact-0078-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + }, + "input": { + "value": "x" + } +} diff --git a/ld/testdata/compact-0078-out.jsonld b/ld/testdata/compact-0078-out.jsonld new file mode 100644 index 0000000..b283b6f --- /dev/null +++ b/ld/testdata/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" + }] +} diff --git a/ld/testdata/compact-0079-context.jsonld b/ld/testdata/compact-0079-context.jsonld new file mode 100644 index 0000000..24bd024 --- /dev/null +++ b/ld/testdata/compact-0079-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": "@graph"} + } +} diff --git a/ld/testdata/compact-0079-in.jsonld b/ld/testdata/compact-0079-in.jsonld new file mode 100644 index 0000000..e34a943 --- /dev/null +++ b/ld/testdata/compact-0079-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }], + "@index": "ndx" + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0079-out.jsonld b/ld/testdata/compact-0079-out.jsonld new file mode 100644 index 0000000..f7c67f8 --- /dev/null +++ b/ld/testdata/compact-0079-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": "@graph"} + }, + "input": { + "value": "x" + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0080-context.jsonld b/ld/testdata/compact-0080-context.jsonld new file mode 100644 index 0000000..24bd024 --- /dev/null +++ b/ld/testdata/compact-0080-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": "@graph"} + } +} diff --git a/ld/testdata/compact-0080-in.jsonld b/ld/testdata/compact-0080-in.jsonld new file mode 100644 index 0000000..369917c --- /dev/null +++ b/ld/testdata/compact-0080-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.org/gid", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0080-out.jsonld b/ld/testdata/compact-0080-out.jsonld new file mode 100644 index 0000000..53d524d --- /dev/null +++ b/ld/testdata/compact-0080-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": "@graph"} + }, + "input": { + "@id": "http://example.org/gid", + "@graph": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0081-context.jsonld b/ld/testdata/compact-0081-context.jsonld new file mode 100644 index 0000000..5db515f --- /dev/null +++ b/ld/testdata/compact-0081-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0081-in.jsonld b/ld/testdata/compact-0081-in.jsonld new file mode 100644 index 0000000..dfc5b0a --- /dev/null +++ b/ld/testdata/compact-0081-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0081-out.jsonld b/ld/testdata/compact-0081-out.jsonld new file mode 100644 index 0000000..83d3182 --- /dev/null +++ b/ld/testdata/compact-0081-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + }, + "input": { + "g1": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0082-context.jsonld b/ld/testdata/compact-0082-context.jsonld new file mode 100644 index 0000000..f12919c --- /dev/null +++ b/ld/testdata/compact-0082-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index", "@set"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0082-in.jsonld b/ld/testdata/compact-0082-in.jsonld new file mode 100644 index 0000000..dfc5b0a --- /dev/null +++ b/ld/testdata/compact-0082-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0082-out.jsonld b/ld/testdata/compact-0082-out.jsonld new file mode 100644 index 0000000..02b54e3 --- /dev/null +++ b/ld/testdata/compact-0082-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index", "@set"]} + }, + "input": { + "g1": [{"value": "x"}] + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0083-context.jsonld b/ld/testdata/compact-0083-context.jsonld new file mode 100644 index 0000000..5db515f --- /dev/null +++ b/ld/testdata/compact-0083-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0083-in.jsonld b/ld/testdata/compact-0083-in.jsonld new file mode 100644 index 0000000..d362e26 --- /dev/null +++ b/ld/testdata/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" + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0083-out.jsonld b/ld/testdata/compact-0083-out.jsonld new file mode 100644 index 0000000..d7d42df --- /dev/null +++ b/ld/testdata/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"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0084-context.jsonld b/ld/testdata/compact-0084-context.jsonld new file mode 100644 index 0000000..2de136b --- /dev/null +++ b/ld/testdata/compact-0084-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0084-in.jsonld b/ld/testdata/compact-0084-in.jsonld new file mode 100644 index 0000000..e01c12e --- /dev/null +++ b/ld/testdata/compact-0084-in.jsonld @@ -0,0 +1,7 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0084-out.jsonld b/ld/testdata/compact-0084-out.jsonld new file mode 100644 index 0000000..6594c8d --- /dev/null +++ b/ld/testdata/compact-0084-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "@none": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0085-context.jsonld b/ld/testdata/compact-0085-context.jsonld new file mode 100644 index 0000000..2de136b --- /dev/null +++ b/ld/testdata/compact-0085-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0085-in.jsonld b/ld/testdata/compact-0085-in.jsonld new file mode 100644 index 0000000..67441b8 --- /dev/null +++ b/ld/testdata/compact-0085-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }], + "@id": "http://example.org/id" + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0085-out.jsonld b/ld/testdata/compact-0085-out.jsonld new file mode 100644 index 0000000..274777b --- /dev/null +++ b/ld/testdata/compact-0085-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "http://example.org/id" : {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0086-context.jsonld b/ld/testdata/compact-0086-context.jsonld new file mode 100644 index 0000000..5b7f150 --- /dev/null +++ b/ld/testdata/compact-0086-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id", "@set"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0086-in.jsonld b/ld/testdata/compact-0086-in.jsonld new file mode 100644 index 0000000..e01c12e --- /dev/null +++ b/ld/testdata/compact-0086-in.jsonld @@ -0,0 +1,7 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0086-out.jsonld b/ld/testdata/compact-0086-out.jsonld new file mode 100644 index 0000000..870273b --- /dev/null +++ b/ld/testdata/compact-0086-out.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id", "@set"]} + }, + "input": {"@none": [{"value": "x"}]} +} \ No newline at end of file diff --git a/ld/testdata/compact-0087-context.jsonld b/ld/testdata/compact-0087-context.jsonld new file mode 100644 index 0000000..5b7f150 --- /dev/null +++ b/ld/testdata/compact-0087-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id", "@set"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0087-in.jsonld b/ld/testdata/compact-0087-in.jsonld new file mode 100644 index 0000000..67441b8 --- /dev/null +++ b/ld/testdata/compact-0087-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }], + "@id": "http://example.org/id" + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0087-out.jsonld b/ld/testdata/compact-0087-out.jsonld new file mode 100644 index 0000000..d8420e5 --- /dev/null +++ b/ld/testdata/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"}] + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0088-context.jsonld b/ld/testdata/compact-0088-context.jsonld new file mode 100644 index 0000000..2de136b --- /dev/null +++ b/ld/testdata/compact-0088-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0088-in.jsonld b/ld/testdata/compact-0088-in.jsonld new file mode 100644 index 0000000..e34a943 --- /dev/null +++ b/ld/testdata/compact-0088-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }], + "@index": "ndx" + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0088-out.jsonld b/ld/testdata/compact-0088-out.jsonld new file mode 100644 index 0000000..6594c8d --- /dev/null +++ b/ld/testdata/compact-0088-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "@none": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0089-context.jsonld b/ld/testdata/compact-0089-context.jsonld new file mode 100644 index 0000000..c496190 --- /dev/null +++ b/ld/testdata/compact-0089-context.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.com/vocab/", + "@language": "it", + "s": { "@id": "label", "@language": null }, + "label": { + "@container": "@language" + } + } +} diff --git a/ld/testdata/compact-0089-in.jsonld b/ld/testdata/compact-0089-in.jsonld new file mode 100644 index 0000000..3224cac --- /dev/null +++ b/ld/testdata/compact-0089-in.jsonld @@ -0,0 +1,23 @@ +[{ + "@id": "http://example.com/queen", + "http://example.com/vocab/label": [ + { + "@value": "Il re", + "@language": "it" + }, { + "@value": "The king", + "@language": "en" + }, { + "@value": "The Queen", + "@language": "en" + }, { + "@value": "Die Königin", + "@language": "de" + }, { + "@value": "Ihre Majestät", + "@language": "de" + }, { + "@value": "No Language" + } + ] +}] diff --git a/ld/testdata/compact-0089-out.jsonld b/ld/testdata/compact-0089-out.jsonld new file mode 100644 index 0000000..0e01888 --- /dev/null +++ b/ld/testdata/compact-0089-out.jsonld @@ -0,0 +1,17 @@ +{ + "@context": { + "@vocab": "http://example.com/vocab/", + "@language": "it", + "s": { "@id": "label", "@language": null }, + "label": { + "@container": "@language" + } + }, + "@id": "http://example.com/queen", + "label": { + "it": "Il re", + "en": [ "The king", "The Queen" ], + "de": [ "Die Königin", "Ihre Majestät" ] + }, + "s": "No Language" +} diff --git a/ld/testdata/compact-0090-context.jsonld b/ld/testdata/compact-0090-context.jsonld new file mode 100644 index 0000000..09a8981 --- /dev/null +++ b/ld/testdata/compact-0090-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + } +} diff --git a/ld/testdata/compact-0090-in.jsonld b/ld/testdata/compact-0090-in.jsonld new file mode 100644 index 0000000..8514ced --- /dev/null +++ b/ld/testdata/compact-0090-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + }, + "input": { + "value": "x" + } +} diff --git a/ld/testdata/compact-0090-out.jsonld b/ld/testdata/compact-0090-out.jsonld new file mode 100644 index 0000000..42e3100 --- /dev/null +++ b/ld/testdata/compact-0090-out.jsonld @@ -0,0 +1,12 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + }, + "input": { + "@graph": { + "value": "x" + } + } +} diff --git a/ld/testdata/compact-0091-context.jsonld b/ld/testdata/compact-0091-context.jsonld new file mode 100644 index 0000000..d6538be --- /dev/null +++ b/ld/testdata/compact-0091-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0091-in.jsonld b/ld/testdata/compact-0091-in.jsonld new file mode 100644 index 0000000..4d7ff51 --- /dev/null +++ b/ld/testdata/compact-0091-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + }, + "input": { + "value": "x" + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0091-out.jsonld b/ld/testdata/compact-0091-out.jsonld new file mode 100644 index 0000000..21df3f7 --- /dev/null +++ b/ld/testdata/compact-0091-out.jsonld @@ -0,0 +1,14 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + }, + "@graph": [{ + "input": [{ + "@graph": [{ + "value": ["x"] + }] + }] + }] +} \ No newline at end of file diff --git a/ld/testdata/compact-0092-context.jsonld b/ld/testdata/compact-0092-context.jsonld new file mode 100644 index 0000000..09a8981 --- /dev/null +++ b/ld/testdata/compact-0092-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + } +} diff --git a/ld/testdata/compact-0092-in.jsonld b/ld/testdata/compact-0092-in.jsonld new file mode 100644 index 0000000..f439807 --- /dev/null +++ b/ld/testdata/compact-0092-in.jsonld @@ -0,0 +1,12 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": ["@graph", "@set"]}, + "value": "foo:value" + }, + "input": [{ + "value": "x" + }, { + "value": "y" + }] +} diff --git a/ld/testdata/compact-0092-out.jsonld b/ld/testdata/compact-0092-out.jsonld new file mode 100644 index 0000000..21c06e9 --- /dev/null +++ b/ld/testdata/compact-0092-out.jsonld @@ -0,0 +1,11 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + }, + "input": [ + {"@graph": {"value": "x"}}, + {"@graph": {"value": "y"}} + ] +} diff --git a/ld/testdata/compact-0093-context.jsonld b/ld/testdata/compact-0093-context.jsonld new file mode 100644 index 0000000..09a8981 --- /dev/null +++ b/ld/testdata/compact-0093-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + } +} diff --git a/ld/testdata/compact-0093-in.jsonld b/ld/testdata/compact-0093-in.jsonld new file mode 100644 index 0000000..f439807 --- /dev/null +++ b/ld/testdata/compact-0093-in.jsonld @@ -0,0 +1,12 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": ["@graph", "@set"]}, + "value": "foo:value" + }, + "input": [{ + "value": "x" + }, { + "value": "y" + }] +} diff --git a/ld/testdata/compact-0093-out.jsonld b/ld/testdata/compact-0093-out.jsonld new file mode 100644 index 0000000..8213517 --- /dev/null +++ b/ld/testdata/compact-0093-out.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + }, + "@graph": [{ + "input": [ + {"@graph": [{"value": ["x"]}]}, + {"@graph": [{"value": ["y"]}]} + ] + }] +} diff --git a/ld/testdata/compact-0094-context.jsonld b/ld/testdata/compact-0094-context.jsonld new file mode 100644 index 0000000..09a8981 --- /dev/null +++ b/ld/testdata/compact-0094-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + } +} diff --git a/ld/testdata/compact-0094-in.jsonld b/ld/testdata/compact-0094-in.jsonld new file mode 100644 index 0000000..8514ced --- /dev/null +++ b/ld/testdata/compact-0094-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + }, + "input": { + "value": "x" + } +} diff --git a/ld/testdata/compact-0094-out.jsonld b/ld/testdata/compact-0094-out.jsonld new file mode 100644 index 0000000..42e3100 --- /dev/null +++ b/ld/testdata/compact-0094-out.jsonld @@ -0,0 +1,12 @@ +{ + "@context": { + "@version": 1.1, + "input": "foo:input", + "value": "foo:value" + }, + "input": { + "@graph": { + "value": "x" + } + } +} diff --git a/ld/testdata/compact-0095-context.jsonld b/ld/testdata/compact-0095-context.jsonld new file mode 100644 index 0000000..3eafcca --- /dev/null +++ b/ld/testdata/compact-0095-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@base": "http://example.com/some/", + "@vocab": "" + } +} diff --git a/ld/testdata/compact-0095-in.jsonld b/ld/testdata/compact-0095-in.jsonld new file mode 100644 index 0000000..7ebcdd7 --- /dev/null +++ b/ld/testdata/compact-0095-in.jsonld @@ -0,0 +1,13 @@ +[ + { + "@id": "http://example.com/some/deep/directory/and/relativePropertyIris", + "http://example.com/absolute": [{"@value": "/absolute"}], + "http://example.com/some/deep/directory/": [{"@value": "deep/directory"}], + "http://example.com/some/deep/directory/and/": [{"@value": "deep/directory/and/"}], + "http://example.com/some/#fragment-works": [{"@value": "#fragment-works"}], + "http://example.com/some/?query=works": [{"@value": "?query=works"}], + "http://example.com/some/link": [{"@value": "link"}], + "http://example.com/some/../parent": [{"@value": "../parent"}], + "http://example.com/too-many-dots": [{"@value": "too-many-dots"}] + } +] diff --git a/ld/testdata/compact-0095-out.jsonld b/ld/testdata/compact-0095-out.jsonld new file mode 100644 index 0000000..1e72be2 --- /dev/null +++ b/ld/testdata/compact-0095-out.jsonld @@ -0,0 +1,15 @@ +{ + "@context": { + "@base": "http://example.com/some/", + "@vocab": "" + }, + "#fragment-works": "#fragment-works", + "../parent": "../parent", + "?query=works": "?query=works", + "@id": "deep/directory/and/relativePropertyIris", + "deep/directory/": "deep/directory", + "deep/directory/and/": "deep/directory/and/", + "http://example.com/absolute": "/absolute", + "http://example.com/too-many-dots": "too-many-dots", + "link": "link" +} \ No newline at end of file diff --git a/ld/testdata/compact-0096-context.jsonld b/ld/testdata/compact-0096-context.jsonld new file mode 100644 index 0000000..2af65c4 --- /dev/null +++ b/ld/testdata/compact-0096-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0096-in.jsonld b/ld/testdata/compact-0096-in.jsonld new file mode 100644 index 0000000..5e4e5bd --- /dev/null +++ b/ld/testdata/compact-0096-in.jsonld @@ -0,0 +1,15 @@ +[{ + "foo:input": [{ + "@graph": [{ + "foo:value": [{ + "@value": "x" + }] + }] + }, { + "@graph": [{ + "foo:value": [{ + "@value": "y" + }] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0096-out.jsonld b/ld/testdata/compact-0096-out.jsonld new file mode 100644 index 0000000..5fdb9a7 --- /dev/null +++ b/ld/testdata/compact-0096-out.jsonld @@ -0,0 +1,11 @@ +{ + "@context": { + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + }, + "input": [{ + "value": "x" + }, { + "value": "y" + }] +} \ No newline at end of file diff --git a/ld/testdata/compact-0097-context.jsonld b/ld/testdata/compact-0097-context.jsonld new file mode 100644 index 0000000..c6cb8aa --- /dev/null +++ b/ld/testdata/compact-0097-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "input": {"@id": "foo:input", "@container": ["@graph", "@set"]}, + "value": "foo:value" + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0097-in.jsonld b/ld/testdata/compact-0097-in.jsonld new file mode 100644 index 0000000..5e4e5bd --- /dev/null +++ b/ld/testdata/compact-0097-in.jsonld @@ -0,0 +1,15 @@ +[{ + "foo:input": [{ + "@graph": [{ + "foo:value": [{ + "@value": "x" + }] + }] + }, { + "@graph": [{ + "foo:value": [{ + "@value": "y" + }] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0097-out.jsonld b/ld/testdata/compact-0097-out.jsonld new file mode 100644 index 0000000..148d572 --- /dev/null +++ b/ld/testdata/compact-0097-out.jsonld @@ -0,0 +1,11 @@ +{ + "@context": { + "input": {"@id": "foo:input", "@container": ["@graph", "@set"]}, + "value": "foo:value" + }, + "input": [{ + "value": "x" + }, { + "value": "y" + }] +} \ No newline at end of file diff --git a/ld/testdata/compact-0098-context.jsonld b/ld/testdata/compact-0098-context.jsonld new file mode 100644 index 0000000..5db515f --- /dev/null +++ b/ld/testdata/compact-0098-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0098-in.jsonld b/ld/testdata/compact-0098-in.jsonld new file mode 100644 index 0000000..6788bb4 --- /dev/null +++ b/ld/testdata/compact-0098-in.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0098-out.jsonld b/ld/testdata/compact-0098-out.jsonld new file mode 100644 index 0000000..4c7c6f4 --- /dev/null +++ b/ld/testdata/compact-0098-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + }, + "input": { + "g1": {"value": "x"}, + "g2": {"value": "y"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0099-context.jsonld b/ld/testdata/compact-0099-context.jsonld new file mode 100644 index 0000000..dc5b900 --- /dev/null +++ b/ld/testdata/compact-0099-context.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index", "@set"]} + }, + "input": { + "g1": {"value": "x"}, + "g2": {"value": "y"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0099-in.jsonld b/ld/testdata/compact-0099-in.jsonld new file mode 100644 index 0000000..6788bb4 --- /dev/null +++ b/ld/testdata/compact-0099-in.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0099-out.jsonld b/ld/testdata/compact-0099-out.jsonld new file mode 100644 index 0000000..b7946f0 --- /dev/null +++ b/ld/testdata/compact-0099-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index", "@set"]} + }, + "input": { + "g1": [{"value": "x"}], + "g2": [{"value": "y"}] + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0100-context.jsonld b/ld/testdata/compact-0100-context.jsonld new file mode 100644 index 0000000..2de136b --- /dev/null +++ b/ld/testdata/compact-0100-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0100-in.jsonld b/ld/testdata/compact-0100-in.jsonld new file mode 100644 index 0000000..45ce037 --- /dev/null +++ b/ld/testdata/compact-0100-in.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0100-out.jsonld b/ld/testdata/compact-0100-out.jsonld new file mode 100644 index 0000000..0010e0a --- /dev/null +++ b/ld/testdata/compact-0100-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "http://example.com/g1": {"value": "x"}, + "http://example.com/g2": {"value": "y"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0101-context.jsonld b/ld/testdata/compact-0101-context.jsonld new file mode 100644 index 0000000..5b7f150 --- /dev/null +++ b/ld/testdata/compact-0101-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id", "@set"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0101-in.jsonld b/ld/testdata/compact-0101-in.jsonld new file mode 100644 index 0000000..45ce037 --- /dev/null +++ b/ld/testdata/compact-0101-in.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0101-out.jsonld b/ld/testdata/compact-0101-out.jsonld new file mode 100644 index 0000000..c20697c --- /dev/null +++ b/ld/testdata/compact-0101-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id", "@set"]} + }, + "input": { + "http://example.com/g1": [{"value": "x"}], + "http://example.com/g2": [{"value": "y"}] + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0102-context.jsonld b/ld/testdata/compact-0102-context.jsonld new file mode 100644 index 0000000..5db515f --- /dev/null +++ b/ld/testdata/compact-0102-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0102-in.jsonld b/ld/testdata/compact-0102-in.jsonld new file mode 100644 index 0000000..27d2cd8 --- /dev/null +++ b/ld/testdata/compact-0102-in.jsonld @@ -0,0 +1,23 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "a"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "b"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0102-out.jsonld b/ld/testdata/compact-0102-out.jsonld new file mode 100644 index 0000000..3e1c5af --- /dev/null +++ b/ld/testdata/compact-0102-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + }, + "input": { + "g1": [{"value": "x"}, {"value": "y"}], + "g2": [{"value": "a"}, {"value": "b"}] + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0103-context.jsonld b/ld/testdata/compact-0103-context.jsonld new file mode 100644 index 0000000..2de136b --- /dev/null +++ b/ld/testdata/compact-0103-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-0103-in.jsonld b/ld/testdata/compact-0103-in.jsonld new file mode 100644 index 0000000..a11e1d7 --- /dev/null +++ b/ld/testdata/compact-0103-in.jsonld @@ -0,0 +1,23 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "a"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "b"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-0103-out.jsonld b/ld/testdata/compact-0103-out.jsonld new file mode 100644 index 0000000..182c031 --- /dev/null +++ b/ld/testdata/compact-0103-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "http://example.com/g1": [{"value": "x"}, {"value": "y"}], + "http://example.com/g2": [{"value": "a"}, {"value": "b"}] + } +} \ No newline at end of file diff --git a/ld/testdata/compact-c006-context.jsonld b/ld/testdata/compact-c006-context.jsonld new file mode 100644 index 0000000..6007891 --- /dev/null +++ b/ld/testdata/compact-c006-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-c006-in.jsonld b/ld/testdata/compact-c006-in.jsonld new file mode 100644 index 0000000..16baea7 --- /dev/null +++ b/ld/testdata/compact-c006-in.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example.org/bar": [{"@value": "baz"}] + }] + } +] \ No newline at end of file diff --git a/ld/testdata/compact-c006-out.jsonld b/ld/testdata/compact-c006-out.jsonld new file mode 100644 index 0000000..757aeaa --- /dev/null +++ b/ld/testdata/compact-c006-out.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + }, + "a": {"@type": "Foo", "bar": "baz"} +} \ No newline at end of file diff --git a/ld/testdata/compact-c007-context.jsonld b/ld/testdata/compact-c007-context.jsonld new file mode 100644 index 0000000..dcaf066 --- /dev/null +++ b/ld/testdata/compact-c007-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": {"@type": "@id"}}}, + "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-c007-in.jsonld b/ld/testdata/compact-c007-in.jsonld new file mode 100644 index 0000000..c173b89 --- /dev/null +++ b/ld/testdata/compact-c007-in.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example/bar": [{"@id": "http://example/baz"}] + }] + } +] \ No newline at end of file diff --git a/ld/testdata/compact-c007-out.jsonld b/ld/testdata/compact-c007-out.jsonld new file mode 100644 index 0000000..05c9f1d --- /dev/null +++ b/ld/testdata/compact-c007-out.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": {"@type": "@id"}}}, + "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"} + }, + "a": {"@type": "Foo", "bar": "http://example/baz"} +} \ No newline at end of file diff --git a/ld/testdata/compact-c008-context.jsonld b/ld/testdata/compact-c008-context.jsonld new file mode 100644 index 0000000..99becb5 --- /dev/null +++ b/ld/testdata/compact-c008-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "type": "@type", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-c008-in.jsonld b/ld/testdata/compact-c008-in.jsonld new file mode 100644 index 0000000..16baea7 --- /dev/null +++ b/ld/testdata/compact-c008-in.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example.org/bar": [{"@value": "baz"}] + }] + } +] \ No newline at end of file diff --git a/ld/testdata/compact-c008-out.jsonld b/ld/testdata/compact-c008-out.jsonld new file mode 100644 index 0000000..e0b472b --- /dev/null +++ b/ld/testdata/compact-c008-out.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "type": "@type", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + }, + "a": {"type": "Foo", "bar": "baz"} +} \ No newline at end of file diff --git a/ld/testdata/compact-c009-context.jsonld b/ld/testdata/compact-c009-context.jsonld new file mode 100644 index 0000000..cf932f7 --- /dev/null +++ b/ld/testdata/compact-c009-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"baz": {"@type": "@vocab"}}} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-c009-in.jsonld b/ld/testdata/compact-c009-in.jsonld new file mode 100644 index 0000000..59a1fb5 --- /dev/null +++ b/ld/testdata/compact-c009-in.jsonld @@ -0,0 +1,8 @@ +[ + { + "@type": ["http://example/Foo"], + "http://example/bar": [{ + "http://example/baz": [{"@id": "http://example/buzz"}] + }] + } +] \ No newline at end of file diff --git a/ld/testdata/compact-c009-out.jsonld b/ld/testdata/compact-c009-out.jsonld new file mode 100644 index 0000000..c2b6d11 --- /dev/null +++ b/ld/testdata/compact-c009-out.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"baz": {"@type": "@vocab"}}} + }, + "@type": "Foo", + "bar": {"baz": "buzz"} +} \ No newline at end of file diff --git a/ld/testdata/compact-c010-context.jsonld b/ld/testdata/compact-c010-context.jsonld new file mode 100644 index 0000000..38c9c4e --- /dev/null +++ b/ld/testdata/compact-c010-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example/", + "B": {"@context": {"c": "http://example.org/c"}} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-c010-in.jsonld b/ld/testdata/compact-c010-in.jsonld new file mode 100644 index 0000000..1057b0a --- /dev/null +++ b/ld/testdata/compact-c010-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example/a": [{ + "@type": ["http://example/B"], + "http://example.com/a": [{"@value": "A in example.com"}], + "http://example.org/c": [{"@value": "C in example.org"}] + }], + "http://example/c": [{"@value": "C in example"}] +}] \ No newline at end of file diff --git a/ld/testdata/compact-c010-out.jsonld b/ld/testdata/compact-c010-out.jsonld new file mode 100644 index 0000000..b312d1a --- /dev/null +++ b/ld/testdata/compact-c010-out.jsonld @@ -0,0 +1,12 @@ +{ + "@context": { + "@vocab": "http://example/", + "B": {"@context": {"c": "http://example.org/c"}} + }, + "a": { + "@type": "B", + "c": "C in example.org", + "http://example.com/a": "A in example.com" + }, + "c": "C in example" +} \ No newline at end of file diff --git a/ld/testdata/compact-c011-context.jsonld b/ld/testdata/compact-c011-context.jsonld new file mode 100644 index 0000000..ede2fd4 --- /dev/null +++ b/ld/testdata/compact-c011-context.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "id": "@id", + "type": "@type", + "Foo": {"@context": {"id": null, "type": null}} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-c011-in.jsonld b/ld/testdata/compact-c011-in.jsonld new file mode 100644 index 0000000..3798fae --- /dev/null +++ b/ld/testdata/compact-c011-in.jsonld @@ -0,0 +1,11 @@ +[ + { + "@id": "http://example.org/id", + "@type": ["http://example/type"], + "http://example/a": [{ + "@id": "http://example.org/Foo", + "@type": ["http://example/Foo"], + "http://example/bar": [{"@id": "http://example.org/baz"}] + }] + } +] \ No newline at end of file diff --git a/ld/testdata/compact-c011-out.jsonld b/ld/testdata/compact-c011-out.jsonld new file mode 100644 index 0000000..7b1902a --- /dev/null +++ b/ld/testdata/compact-c011-out.jsonld @@ -0,0 +1,15 @@ +{ + "@context": { + "@vocab": "http://example/", + "id": "@id", + "type": "@type", + "Foo": {"@context": {"id": null, "type": null}} + }, + "id": "http://example.org/id", + "type": "http://example/type", + "a": { + "@id": "http://example.org/Foo", + "@type": "Foo", + "bar": {"@id": "http://example.org/baz"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-c012-context.jsonld b/ld/testdata/compact-c012-context.jsonld new file mode 100644 index 0000000..ba4308c --- /dev/null +++ b/ld/testdata/compact-c012-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "t1": {"@context": {"foo": {"@id": "http://example.com/foo"}}}, + "t2": {"@context": {"foo": {"@id": "http://example.org/foo", "@type": "@id"}}} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-c012-in.jsonld b/ld/testdata/compact-c012-in.jsonld new file mode 100644 index 0000000..a702942 --- /dev/null +++ b/ld/testdata/compact-c012-in.jsonld @@ -0,0 +1,6 @@ +[{ + "@type": ["http://example/t2", "http://example/t1"], + "http://example.org/foo": [ + {"@id": "urn:bar"} + ] +}] \ No newline at end of file diff --git a/ld/testdata/compact-c012-out.jsonld b/ld/testdata/compact-c012-out.jsonld new file mode 100644 index 0000000..c57c55e --- /dev/null +++ b/ld/testdata/compact-c012-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example/", + "t1": {"@context": {"foo": {"@id": "http://example.com/foo"}}}, + "t2": {"@context": {"foo": {"@id": "http://example.org/foo", "@type": "@id"}}} + }, + "@type": ["t2", "t1"], + "foo": "urn:bar" +} \ No newline at end of file diff --git a/ld/testdata/compact-m007-context.jsonld b/ld/testdata/compact-m007-context.jsonld index 6007891..16ee43d 100644 --- a/ld/testdata/compact-m007-context.jsonld +++ b/ld/testdata/compact-m007-context.jsonld @@ -1,6 +1,7 @@ { "@context": { "@vocab": "http://example/", - "Foo": {"@context": {"bar": "http://example.org/bar"}} + "typemap": {"@container": "@type"}, + "Type": {"@context": {"a": "http://example.org/a"}} } } \ No newline at end of file diff --git a/ld/testdata/compact-m007-in.jsonld b/ld/testdata/compact-m007-in.jsonld index 16baea7..e1da44e 100644 --- a/ld/testdata/compact-m007-in.jsonld +++ b/ld/testdata/compact-m007-in.jsonld @@ -1,8 +1,5 @@ -[ - { - "http://example/a": [{ - "@type": ["http://example/Foo"], - "http://example.org/bar": [{"@value": "baz"}] - }] - } -] \ No newline at end of file +[{ + "http://example/typemap": [ + {"http://example.org/a": [{"@value": "Object with @type "}], "@type": ["http://example/Type"]} + ] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m007-out.jsonld b/ld/testdata/compact-m007-out.jsonld index 757aeaa..3e48d6e 100644 --- a/ld/testdata/compact-m007-out.jsonld +++ b/ld/testdata/compact-m007-out.jsonld @@ -1,7 +1,10 @@ { "@context": { "@vocab": "http://example/", - "Foo": {"@context": {"bar": "http://example.org/bar"}} + "typemap": {"@container": "@type"}, + "Type": {"@context": {"a": "http://example.org/a"}} }, - "a": {"@type": "Foo", "bar": "baz"} + "typemap": { + "Type": {"a": "Object with @type "} + } } \ No newline at end of file diff --git a/ld/testdata/compact-m008-context.jsonld b/ld/testdata/compact-m008-context.jsonld index dcaf066..722af08 100644 --- a/ld/testdata/compact-m008-context.jsonld +++ b/ld/testdata/compact-m008-context.jsonld @@ -1,7 +1,8 @@ { "@context": { - "@vocab": "http://example/", - "Foo": {"@context": {"bar": {"@type": "@id"}}}, - "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"} + "author": { + "@id": "http://example.com/vocab/author", + "@container": "@index" + } } } \ No newline at end of file diff --git a/ld/testdata/compact-m008-in.jsonld b/ld/testdata/compact-m008-in.jsonld index c173b89..a2e1e39 100644 --- a/ld/testdata/compact-m008-in.jsonld +++ b/ld/testdata/compact-m008-in.jsonld @@ -1,8 +1,9 @@ -[ - { - "http://example/a": [{ - "@type": ["http://example/Foo"], - "http://example/bar": [{"@id": "http://example/baz"}] - }] - } -] \ No newline at end of file +[{ + "@id": "http://example.com/article", + "http://example.com/vocab/author": [{ + "@id": "http://example.org/person/1", + "@index": "regular" + }, { + "@id": "http://example.org/guest/cd24f329aa" + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m008-out.jsonld b/ld/testdata/compact-m008-out.jsonld index 05c9f1d..9d752ee 100644 --- a/ld/testdata/compact-m008-out.jsonld +++ b/ld/testdata/compact-m008-out.jsonld @@ -1,8 +1,17 @@ { "@context": { - "@vocab": "http://example/", - "Foo": {"@context": {"bar": {"@type": "@id"}}}, - "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"} + "author": { + "@id": "http://example.com/vocab/author", + "@container": "@index" + } }, - "a": {"@type": "Foo", "bar": "http://example/baz"} + "@id": "http://example.com/article", + "author": { + "regular": { + "@id": "http://example.org/person/1" + }, + "@none": { + "@id": "http://example.org/guest/cd24f329aa" + } + } } \ No newline at end of file diff --git a/ld/testdata/compact-m009-context.jsonld b/ld/testdata/compact-m009-context.jsonld index 99becb5..722af08 100644 --- a/ld/testdata/compact-m009-context.jsonld +++ b/ld/testdata/compact-m009-context.jsonld @@ -1,7 +1,8 @@ { "@context": { - "@vocab": "http://example/", - "type": "@type", - "Foo": {"@context": {"bar": "http://example.org/bar"}} + "author": { + "@id": "http://example.com/vocab/author", + "@container": "@index" + } } } \ No newline at end of file diff --git a/ld/testdata/compact-m009-in.jsonld b/ld/testdata/compact-m009-in.jsonld index 16baea7..8ed51ac 100644 --- a/ld/testdata/compact-m009-in.jsonld +++ b/ld/testdata/compact-m009-in.jsonld @@ -1,8 +1,9 @@ -[ - { - "http://example/a": [{ - "@type": ["http://example/Foo"], - "http://example.org/bar": [{"@value": "baz"}] - }] - } -] \ No newline at end of file +[{ + "@id": "http://example.com/article", + "http://example.com/vocab/author": [{ + "@value": "Gregg", + "@index": "regular" + }, { + "@value": "Manu" + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m009-out.jsonld b/ld/testdata/compact-m009-out.jsonld index e0b472b..42b29d4 100644 --- a/ld/testdata/compact-m009-out.jsonld +++ b/ld/testdata/compact-m009-out.jsonld @@ -1,8 +1,13 @@ { "@context": { - "@vocab": "http://example/", - "type": "@type", - "Foo": {"@context": {"bar": "http://example.org/bar"}} + "author": { + "@id": "http://example.com/vocab/author", + "@container": "@index" + } }, - "a": {"type": "Foo", "bar": "baz"} + "@id": "http://example.com/article", + "author": { + "regular": "Gregg", + "@none": "Manu" + } } \ No newline at end of file diff --git a/ld/testdata/compact-m010-context.jsonld b/ld/testdata/compact-m010-context.jsonld index cf932f7..f39d1c7 100644 --- a/ld/testdata/compact-m010-context.jsonld +++ b/ld/testdata/compact-m010-context.jsonld @@ -1,6 +1,9 @@ { "@context": { - "@vocab": "http://example/", - "Foo": {"@context": {"baz": {"@type": "@vocab"}}} + "author": { + "@id": "http://example.com/vocab/author", + "@container": "@index" + }, + "none": "@none" } } \ No newline at end of file diff --git a/ld/testdata/compact-m010-in.jsonld b/ld/testdata/compact-m010-in.jsonld index 59a1fb5..8ed51ac 100644 --- a/ld/testdata/compact-m010-in.jsonld +++ b/ld/testdata/compact-m010-in.jsonld @@ -1,8 +1,9 @@ -[ - { - "@type": ["http://example/Foo"], - "http://example/bar": [{ - "http://example/baz": [{"@id": "http://example/buzz"}] - }] - } -] \ No newline at end of file +[{ + "@id": "http://example.com/article", + "http://example.com/vocab/author": [{ + "@value": "Gregg", + "@index": "regular" + }, { + "@value": "Manu" + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m010-out.jsonld b/ld/testdata/compact-m010-out.jsonld index c2b6d11..ebcf4c7 100644 --- a/ld/testdata/compact-m010-out.jsonld +++ b/ld/testdata/compact-m010-out.jsonld @@ -1,8 +1,14 @@ { "@context": { - "@vocab": "http://example/", - "Foo": {"@context": {"baz": {"@type": "@vocab"}}} + "author": { + "@id": "http://example.com/vocab/author", + "@container": "@index" + }, + "none": "@none" }, - "@type": "Foo", - "bar": {"baz": "buzz"} + "@id": "http://example.com/article", + "author": { + "regular": "Gregg", + "none": "Manu" + } } \ No newline at end of file diff --git a/ld/testdata/compact-m011-context.jsonld b/ld/testdata/compact-m011-context.jsonld index 38c9c4e..374aa5b 100644 --- a/ld/testdata/compact-m011-context.jsonld +++ b/ld/testdata/compact-m011-context.jsonld @@ -1,6 +1,6 @@ { "@context": { - "@vocab": "http://example/", - "B": {"@context": {"c": "http://example.org/c"}} + "vocab": "http://example.com/vocab/", + "label": {"@id": "vocab:label", "@container": "@language"} } } \ No newline at end of file diff --git a/ld/testdata/compact-m011-in.jsonld b/ld/testdata/compact-m011-in.jsonld index 1057b0a..f2f1c9e 100644 --- a/ld/testdata/compact-m011-in.jsonld +++ b/ld/testdata/compact-m011-in.jsonld @@ -1,8 +1,10 @@ -[{ - "http://example/a": [{ - "@type": ["http://example/B"], - "http://example.com/a": [{"@value": "A in example.com"}], - "http://example.org/c": [{"@value": "C in example.org"}] - }], - "http://example/c": [{"@value": "C in example"}] -}] \ No newline at end of file +[ + { + "@id": "http://example.com/queen", + "http://example.com/vocab/label": [ + {"@value": "The Queen", "@language": "en"}, + {"@value": "Die Königin", "@language": "de"}, + {"@value": "Ihre Majestät"} + ] + } +] \ No newline at end of file diff --git a/ld/testdata/compact-m011-out.jsonld b/ld/testdata/compact-m011-out.jsonld index b312d1a..eabfa78 100644 --- a/ld/testdata/compact-m011-out.jsonld +++ b/ld/testdata/compact-m011-out.jsonld @@ -1,12 +1,12 @@ { "@context": { - "@vocab": "http://example/", - "B": {"@context": {"c": "http://example.org/c"}} + "vocab": "http://example.com/vocab/", + "label": {"@id": "vocab:label", "@container": "@language"} }, - "a": { - "@type": "B", - "c": "C in example.org", - "http://example.com/a": "A in example.com" - }, - "c": "C in example" + "@id": "http://example.com/queen", + "label": { + "en": "The Queen", + "de": "Die Königin", + "@none": "Ihre Majestät" + } } \ No newline at end of file diff --git a/ld/testdata/compact-m012-context.jsonld b/ld/testdata/compact-m012-context.jsonld index 16ee43d..93b531e 100644 --- a/ld/testdata/compact-m012-context.jsonld +++ b/ld/testdata/compact-m012-context.jsonld @@ -1,7 +1,7 @@ { "@context": { - "@vocab": "http://example/", - "typemap": {"@container": "@type"}, - "Type": {"@context": {"a": "http://example.org/a"}} + "vocab": "http://example.com/vocab/", + "label": {"@id": "vocab:label", "@container": "@language"}, + "none": "@none" } } \ No newline at end of file diff --git a/ld/testdata/compact-m012-in.jsonld b/ld/testdata/compact-m012-in.jsonld index e1da44e..f2f1c9e 100644 --- a/ld/testdata/compact-m012-in.jsonld +++ b/ld/testdata/compact-m012-in.jsonld @@ -1,5 +1,10 @@ -[{ - "http://example/typemap": [ - {"http://example.org/a": [{"@value": "Object with @type "}], "@type": ["http://example/Type"]} - ] -}] \ No newline at end of file +[ + { + "@id": "http://example.com/queen", + "http://example.com/vocab/label": [ + {"@value": "The Queen", "@language": "en"}, + {"@value": "Die Königin", "@language": "de"}, + {"@value": "Ihre Majestät"} + ] + } +] \ No newline at end of file diff --git a/ld/testdata/compact-m012-out.jsonld b/ld/testdata/compact-m012-out.jsonld index 3e48d6e..14fc6ac 100644 --- a/ld/testdata/compact-m012-out.jsonld +++ b/ld/testdata/compact-m012-out.jsonld @@ -1,10 +1,13 @@ { "@context": { - "@vocab": "http://example/", - "typemap": {"@container": "@type"}, - "Type": {"@context": {"a": "http://example.org/a"}} + "vocab": "http://example.com/vocab/", + "label": {"@id": "vocab:label", "@container": "@language"}, + "none": "@none" }, - "typemap": { - "Type": {"a": "Object with @type "} + "@id": "http://example.com/queen", + "label": { + "en": "The Queen", + "de": "Die Königin", + "none": "Ihre Majestät" } } \ No newline at end of file diff --git a/ld/testdata/compact-m013-context.jsonld b/ld/testdata/compact-m013-context.jsonld new file mode 100644 index 0000000..5ebfbc6 --- /dev/null +++ b/ld/testdata/compact-m013-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "idmap": {"@container": "@id"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m013-in.jsonld b/ld/testdata/compact-m013-in.jsonld new file mode 100644 index 0000000..0beca7e --- /dev/null +++ b/ld/testdata/compact-m013-in.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/idmap": [ + {"http://example/label": [{"@value": "Object with no @id"}]} + ] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m013-out.jsonld b/ld/testdata/compact-m013-out.jsonld new file mode 100644 index 0000000..baf3a65 --- /dev/null +++ b/ld/testdata/compact-m013-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "idmap": {"@container": "@id"} + }, + "idmap": { + "@none": {"label": "Object with no @id"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m014-context.jsonld b/ld/testdata/compact-m014-context.jsonld new file mode 100644 index 0000000..9213564 --- /dev/null +++ b/ld/testdata/compact-m014-context.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "idmap": {"@container": "@id"}, + "none": "@none" + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m014-in.jsonld b/ld/testdata/compact-m014-in.jsonld new file mode 100644 index 0000000..0beca7e --- /dev/null +++ b/ld/testdata/compact-m014-in.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/idmap": [ + {"http://example/label": [{"@value": "Object with no @id"}]} + ] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m014-out.jsonld b/ld/testdata/compact-m014-out.jsonld new file mode 100644 index 0000000..55bab56 --- /dev/null +++ b/ld/testdata/compact-m014-out.jsonld @@ -0,0 +1,11 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "idmap": {"@container": "@id"}, + "none": "@none" + }, + "idmap": { + "none": {"label": "Object with no @id"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m015-context.jsonld b/ld/testdata/compact-m015-context.jsonld new file mode 100644 index 0000000..5978667 --- /dev/null +++ b/ld/testdata/compact-m015-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "typemap": {"@container": "@type"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m015-in.jsonld b/ld/testdata/compact-m015-in.jsonld new file mode 100644 index 0000000..e14b54c --- /dev/null +++ b/ld/testdata/compact-m015-in.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/typemap": [ + {"http://example/label": [{"@value": "Object with no @type"}]} + ] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m015-out.jsonld b/ld/testdata/compact-m015-out.jsonld new file mode 100644 index 0000000..270b931 --- /dev/null +++ b/ld/testdata/compact-m015-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "typemap": {"@container": "@type"} + }, + "typemap": { + "@none": {"label": "Object with no @type"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m016-context.jsonld b/ld/testdata/compact-m016-context.jsonld new file mode 100644 index 0000000..b517bc3 --- /dev/null +++ b/ld/testdata/compact-m016-context.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "typemap": {"@container": "@type"}, + "none": "@none" + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m016-in.jsonld b/ld/testdata/compact-m016-in.jsonld new file mode 100644 index 0000000..2a7defe --- /dev/null +++ b/ld/testdata/compact-m016-in.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/typemap": [ + {"http://example/label": [{"@value": "Object with no @id"}]} + ] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m016-out.jsonld b/ld/testdata/compact-m016-out.jsonld new file mode 100644 index 0000000..5d115f1 --- /dev/null +++ b/ld/testdata/compact-m016-out.jsonld @@ -0,0 +1,11 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "typemap": {"@container": "@type"}, + "none": "@none" + }, + "typemap": { + "none": {"label": "Object with no @id"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m017-context.jsonld b/ld/testdata/compact-m017-context.jsonld new file mode 100644 index 0000000..f12919c --- /dev/null +++ b/ld/testdata/compact-m017-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index", "@set"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m017-in.jsonld b/ld/testdata/compact-m017-in.jsonld new file mode 100644 index 0000000..e01c12e --- /dev/null +++ b/ld/testdata/compact-m017-in.jsonld @@ -0,0 +1,7 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m017-out.jsonld b/ld/testdata/compact-m017-out.jsonld new file mode 100644 index 0000000..ce09bd9 --- /dev/null +++ b/ld/testdata/compact-m017-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index", "@set"]} + }, + "input": { + "@none": [{"value": "x"}] + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m018-context.jsonld b/ld/testdata/compact-m018-context.jsonld new file mode 100644 index 0000000..2de136b --- /dev/null +++ b/ld/testdata/compact-m018-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m018-in.jsonld b/ld/testdata/compact-m018-in.jsonld new file mode 100644 index 0000000..e01c12e --- /dev/null +++ b/ld/testdata/compact-m018-in.jsonld @@ -0,0 +1,7 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m018-out.jsonld b/ld/testdata/compact-m018-out.jsonld new file mode 100644 index 0000000..67ff924 --- /dev/null +++ b/ld/testdata/compact-m018-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "@none" : {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m019-context.jsonld b/ld/testdata/compact-m019-context.jsonld new file mode 100644 index 0000000..5160a12 --- /dev/null +++ b/ld/testdata/compact-m019-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]}, + "none": "@none" + } +} \ No newline at end of file diff --git a/ld/testdata/compact-m019-in.jsonld b/ld/testdata/compact-m019-in.jsonld new file mode 100644 index 0000000..e01c12e --- /dev/null +++ b/ld/testdata/compact-m019-in.jsonld @@ -0,0 +1,7 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/compact-m019-out.jsonld b/ld/testdata/compact-m019-out.jsonld new file mode 100644 index 0000000..bba709a --- /dev/null +++ b/ld/testdata/compact-m019-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]}, + "none": "@none" + }, + "input": { + "none" : {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/compact-manifest.jsonld b/ld/testdata/compact-manifest.jsonld index e6e9689..aaeca79 100644 --- a/ld/testdata/compact-manifest.jsonld +++ b/ld/testdata/compact-manifest.jsonld @@ -628,6 +628,247 @@ "input": "compact-0076-in.jsonld", "context": "compact-0076-context.jsonld", "expect": "compact-0076-out.jsonld" + }, { + "@id": "#t0077", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a @graph container", + "purpose": "Compact a @graph container", + "input": "compact-0077-in.jsonld", + "context": "compact-0077-context.jsonld", + "expect": "compact-0077-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0078", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a [@graph, @set] container", + "purpose": "Compact with [@graph, @set]", + "input": "compact-0078-in.jsonld", + "context": "compact-0078-context.jsonld", + "expect": "compact-0078-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0079", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a @graph container having @index", + "purpose": "Verify that having both @graph and @index allows @graph container compaction", + "input": "compact-0079-in.jsonld", + "context": "compact-0079-context.jsonld", + "expect": "compact-0079-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0080", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Do not compact a graph having @id with a term having an @graph container", + "purpose": "Graph compaction works only on simple graphs", + "input": "compact-0080-in.jsonld", + "context": "compact-0080-context.jsonld", + "expect": "compact-0080-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0081", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a [@graph, @index] container", + "purpose": "Compact a @graph container with @index", + "input": "compact-0081-in.jsonld", + "context": "compact-0081-context.jsonld", + "expect": "compact-0081-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0082", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a [@graph, @index, @set] container", + "purpose": "Compact a @graph container with @index and @set", + "input": "compact-0082-in.jsonld", + "context": "compact-0082-context.jsonld", + "expect": "compact-0082-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0083", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "[@graph, @index] does not compact graph with @id", + "purpose": "Graph compaction with @graph and @index works only on simple graphs", + "input": "compact-0083-in.jsonld", + "context": "compact-0083-context.jsonld", + "expect": "compact-0083-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0084", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a simple graph with a [@graph, @id] container", + "purpose": "Compact a simple graph using a @graph container with @id", + "input": "compact-0084-in.jsonld", + "context": "compact-0084-context.jsonld", + "expect": "compact-0084-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0085", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a named graph with a [@graph, @id] container", + "purpose": "Compact a named graph using a @graph container with @id", + "input": "compact-0085-in.jsonld", + "context": "compact-0085-context.jsonld", + "expect": "compact-0085-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0086", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a simple graph with a [@graph, @id, @set] container", + "purpose": "Compact a simple graph using a @graph container with @id and @set", + "input": "compact-0086-in.jsonld", + "context": "compact-0086-context.jsonld", + "expect": "compact-0086-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0087", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a named graph with a [@graph, @id, @set] container", + "purpose": "Compact a named graph using a @graph container with @id and @set", + "input": "compact-0087-in.jsonld", + "context": "compact-0087-context.jsonld", + "expect": "compact-0087-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0088", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact a graph with @index using a [@graph, @id] container", + "purpose": "Compact a @graph container with @id and @set, discarding an @index value", + "input": "compact-0088-in.jsonld", + "context": "compact-0088-context.jsonld", + "expect": "compact-0088-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0089", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Language map term selection with complications", + "purpose": "Test appropriate property use given language maps with @vocab, a default language, no language, and competing terms", + "input": "compact-0089-in.jsonld", + "context": "compact-0089-context.jsonld", + "expect": "compact-0089-out.jsonld" + }, { + "@id": "#t0090", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact input with @graph container to output without @graph container", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0090-in.jsonld", + "context": "compact-0090-context.jsonld", + "expect": "compact-0090-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0091", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact input with @graph container to output without @graph container with compactArrays unset", + "purpose": "Ensure @graph appears properly in output with compactArrays unset", + "input": "compact-0091-in.jsonld", + "context": "compact-0091-context.jsonld", + "expect": "compact-0091-out.jsonld", + "option": {"compactArrays": false, "processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0092", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact input with [@graph, @set] container to output without [@graph, @set] container", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0092-in.jsonld", + "context": "compact-0092-context.jsonld", + "expect": "compact-0092-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0093", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact input with [@graph, @set] container to output without [@graph, @set] container with compactArrays unset", + "purpose": "Ensure @graph appears properly in output with compactArrays unset", + "input": "compact-0093-in.jsonld", + "context": "compact-0093-context.jsonld", + "expect": "compact-0093-out.jsonld", + "option": {"compactArrays": false, "processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0094", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact input with [@graph, @set] container to output without [@graph, @set] container", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0094-in.jsonld", + "context": "compact-0094-context.jsonld", + "expect": "compact-0094-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0095", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Relative propererty IRIs with @vocab: ''", + "purpose": "Complex use cases for relative IRI compaction or properties", + "input": "compact-0095-in.jsonld", + "context": "compact-0095-context.jsonld", + "expect": "compact-0095-out.jsonld" + }, { + "@id": "#t0096", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact @graph container (multiple objects)", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0096-in.jsonld", + "context": "compact-0096-context.jsonld", + "expect": "compact-0096-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0097", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact [@graph, @set] container (multiple objects)", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0097-in.jsonld", + "context": "compact-0097-context.jsonld", + "expect": "compact-0097-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0098", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact [@graph, @index] container (multiple indexed objects)", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0098-in.jsonld", + "context": "compact-0098-context.jsonld", + "expect": "compact-0098-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0099", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact [@graph, @index, @set] container (multiple indexed objects)", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0099-in.jsonld", + "context": "compact-0099-context.jsonld", + "expect": "compact-0099-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0100", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact [@graph, @id] container (multiple indexed objects)", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0100-in.jsonld", + "context": "compact-0100-context.jsonld", + "expect": "compact-0100-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0101", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact [@graph, @id, @set] container (multiple indexed objects)", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0101-in.jsonld", + "context": "compact-0101-context.jsonld", + "expect": "compact-0101-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0102", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact [@graph, @index] container (multiple indexes and objects)", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0102-in.jsonld", + "context": "compact-0102-context.jsonld", + "expect": "compact-0102-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0103", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact [@graph, @id] container (multiple ids and objects)", + "purpose": "Ensure @graph appears properly in output", + "input": "compact-0103-in.jsonld", + "context": "compact-0103-context.jsonld", + "expect": "compact-0103-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tc001", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], @@ -673,6 +914,69 @@ "context": "compact-c005-context.jsonld", "expect": "compact-c005-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc006", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "adding new term", + "purpose": "scoped context on @type", + "input": "compact-c006-in.jsonld", + "context": "compact-c006-context.jsonld", + "expect": "compact-c006-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc007", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "overriding a term", + "purpose": "scoped context on @type", + "input": "compact-c007-in.jsonld", + "context": "compact-c007-context.jsonld", + "expect": "compact-c007-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc008", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "alias of @type", + "purpose": "scoped context on @type", + "input": "compact-c008-in.jsonld", + "context": "compact-c008-context.jsonld", + "expect": "compact-c008-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc009", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "deep @context affects nested nodes", + "purpose": "scoped context on @type", + "input": "compact-c009-in.jsonld", + "context": "compact-c009-context.jsonld", + "expect": "compact-c009-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc010", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "scoped context layers on intemediate contexts", + "purpose": "scoped context on @type", + "input": "compact-c010-in.jsonld", + "context": "compact-c010-context.jsonld", + "expect": "compact-c010-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc011", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "applies context for all values", + "purpose": "scoped context on @type", + "input": "compact-c011-in.jsonld", + "context": "compact-c011-context.jsonld", + "expect": "compact-c011-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc012", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "orders @type terms when applying scoped contexts", + "purpose": "scoped context on @type", + "input": "compact-c012-in.jsonld", + "context": "compact-c012-context.jsonld", + "expect": "compact-c012-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tm001", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], @@ -730,7 +1034,7 @@ }, { "@id": "#tm007", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "adding new term", + "name": "When type is in a type map", "purpose": "scoped context on @type", "input": "compact-m007-in.jsonld", "context": "compact-m007-context.jsonld", @@ -739,8 +1043,8 @@ }, { "@id": "#tm008", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "overriding a term", - "purpose": "scoped context on @type", + "name": "@index map with @none node definition", + "purpose": "index on @index", "input": "compact-m008-in.jsonld", "context": "compact-m008-context.jsonld", "expect": "compact-m008-out.jsonld", @@ -748,8 +1052,8 @@ }, { "@id": "#tm009", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "alias of @type", - "purpose": "scoped context on @type", + "name": "@index map with @none value", + "purpose": "index on @index", "input": "compact-m009-in.jsonld", "context": "compact-m009-context.jsonld", "expect": "compact-m009-out.jsonld", @@ -757,8 +1061,8 @@ }, { "@id": "#tm010", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "deep @context affects nested nodes", - "purpose": "scoped context on @type", + "name": "@index map with @none value using alias of @none", + "purpose": "index on @index", "input": "compact-m010-in.jsonld", "context": "compact-m010-context.jsonld", "expect": "compact-m010-out.jsonld", @@ -766,8 +1070,8 @@ }, { "@id": "#tm011", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "scoped context layers on intemediate contexts", - "purpose": "scoped context on @type", + "name": "@language map with no @language", + "purpose": "index on @language", "input": "compact-m011-in.jsonld", "context": "compact-m011-context.jsonld", "expect": "compact-m011-out.jsonld", @@ -775,12 +1079,75 @@ }, { "@id": "#tm012", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "When type is in a type map", - "purpose": "scoped context on @type", + "name": "language map with no @language using alias of @none", + "purpose": "index on @language", "input": "compact-m012-in.jsonld", "context": "compact-m012-context.jsonld", "expect": "compact-m012-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm013", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "id map using @none", + "purpose": "index on @id", + "input": "compact-m013-in.jsonld", + "context": "compact-m013-context.jsonld", + "expect": "compact-m013-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm014", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "id map using @none with alias", + "purpose": "index on @id", + "input": "compact-m014-in.jsonld", + "context": "compact-m014-context.jsonld", + "expect": "compact-m014-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm015", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "type map using @none with alias", + "purpose": "index on @type", + "input": "compact-m015-in.jsonld", + "context": "compact-m015-context.jsonld", + "expect": "compact-m015-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm016", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "type map using @none with alias", + "purpose": "index on @type", + "input": "compact-m016-in.jsonld", + "context": "compact-m016-context.jsonld", + "expect": "compact-m016-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm017", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "graph index map using @none", + "purpose": "index on @graph and @index", + "input": "compact-m017-in.jsonld", + "context": "compact-m017-context.jsonld", + "expect": "compact-m017-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm018", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "graph id map using @none", + "purpose": "index on @graph and @id", + "input": "compact-m018-in.jsonld", + "context": "compact-m018-context.jsonld", + "expect": "compact-m018-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm019", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "graph id map using alias of @none", + "purpose": "index on @graph and @id", + "input": "compact-m019-in.jsonld", + "context": "compact-m019-context.jsonld", + "expect": "compact-m019-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tn001", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], @@ -874,8 +1241,8 @@ }, { "@id": "#tp001", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "Compact IRI may use an expanded term definition in 1.0", - "purpose": "Terms with an expanded term definition may be used for creating compact IRIs", + "name": "Compact IRI will not use an expanded term definition in 1.0", + "purpose": "Terms with an expanded term definition are not used for creating compact IRIs", "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, "input": "compact-p001-in.jsonld", "context": "compact-p001-context.jsonld", @@ -934,6 +1301,15 @@ "input": "compact-p007-in.jsonld", "context": "compact-p007-context.jsonld", "expect": "compact-p007-out.jsonld" + }, { + "@id": "#tp008", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Compact IRI does not use term with definition including @prefix: false", + "purpose": "Expanded term definition may set prefix explicitly in 1.1", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}, + "input": "compact-p008-in.jsonld", + "context": "compact-p008-context.jsonld", + "expect": "compact-p008-out.jsonld" }, { "@id": "#tr001", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], diff --git a/ld/testdata/compact-p001-out.jsonld b/ld/testdata/compact-p001-out.jsonld index e9d7952..5dfd781 100644 --- a/ld/testdata/compact-p001-out.jsonld +++ b/ld/testdata/compact-p001-out.jsonld @@ -2,7 +2,7 @@ "@context": { "ex": {"@id": "http://example.org/"} }, - "@id": "ex:id1", - "@type": ["ex:Type1", "ex:Type2"], - "ex:term": {"@id": "ex:id2"} + "@id": "http://example.org/id1", + "@type": ["http://example.org/Type1", "http://example.org/Type2"], + "http://example.org/term": {"@id": "http://example.org/id2"} } \ No newline at end of file diff --git a/ld/testdata/compact-p008-context.jsonld b/ld/testdata/compact-p008-context.jsonld new file mode 100644 index 0000000..9c7f236 --- /dev/null +++ b/ld/testdata/compact-p008-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "compact-iris": {"@id": "http://example.com/compact-iris#", "@prefix": false}, + "property": "http://example.com/property" + } +} diff --git a/ld/testdata/compact-p008-in.jsonld b/ld/testdata/compact-p008-in.jsonld new file mode 100644 index 0000000..55a5002 --- /dev/null +++ b/ld/testdata/compact-p008-in.jsonld @@ -0,0 +1,6 @@ +{ + "http://example.com/property": { + "@id": "http://example.com/compact-iris#are-considered", + "http://example.com/property": "@prefix false not really necessary, but doubly prevents term from being used as a prefix" + } +} diff --git a/ld/testdata/compact-p008-out.jsonld b/ld/testdata/compact-p008-out.jsonld new file mode 100644 index 0000000..3ad6069 --- /dev/null +++ b/ld/testdata/compact-p008-out.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "compact-iris": { + "@id": "http://example.com/compact-iris#", + "@prefix": false + }, + "property": "http://example.com/property" + }, + "property": { + "@id": "http://example.com/compact-iris#are-considered", + "property": "@prefix false not really necessary, but doubly prevents term from being used as a prefix" + } +} \ No newline at end of file diff --git a/ld/testdata/error-manifest.jsonld b/ld/testdata/error-manifest.jsonld index 7545fa5..5009190 100644 --- a/ld/testdata/error-manifest.jsonld +++ b/ld/testdata/error-manifest.jsonld @@ -438,7 +438,7 @@ "@id": "#tp007", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], "name": "@prefix is not allowed in 1.0", - "purpose": "@prefix is not allowed in a term definitionin 1.0", + "purpose": "@prefix is not allowed in a term definition 1.0", "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, "input": "error-p007-in.jsonld", "context": "error-p007-context.jsonld", @@ -461,6 +461,60 @@ "input": "error-p009-in.jsonld", "context": "error-p009-context.jsonld", "expect": "invalid term definition" + }, { + "@id": "#tp010", + "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], + "name": "@nest is not allowed in 1.0", + "purpose": "@nest is not allowed in a term definitionin 1.0", + "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, + "input": "error-p010-in.jsonld", + "context": "error-p010-context.jsonld", + "expect": "invalid term definition" + }, { + "@id": "#tp011", + "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], + "name": "@context is not allowed in 1.0", + "purpose": "@context is not allowed in a term definitionin 1.0", + "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, + "input": "error-p011-in.jsonld", + "context": "error-p011-context.jsonld", + "expect": "invalid term definition" + }, { + "@id": "#tp012", + "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], + "name": "@container may not be an array in 1.0", + "purpose": "validate appropriate values of @container", + "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, + "input": "error-p012-in.jsonld", + "context": "error-p012-context.jsonld", + "expect": "invalid container mapping" + }, { + "@id": "#tp013", + "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], + "name": "@container may not be @id in 1.0", + "purpose": "validate appropriate values of @container", + "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, + "input": "error-p013-in.jsonld", + "context": "error-p013-context.jsonld", + "expect": "invalid container mapping" + }, { + "@id": "#tp014", + "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], + "name": "@container may not be @type in 1.0", + "purpose": "validate appropriate values of @container", + "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, + "input": "error-p014-in.jsonld", + "context": "error-p014-context.jsonld", + "expect": "invalid container mapping" + }, { + "@id": "#tp015", + "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], + "name": "@container may not be @graph in 1.0", + "purpose": "validate appropriate values of @container", + "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, + "input": "error-p015-in.jsonld", + "context": "error-p015-context.jsonld", + "expect": "invalid container mapping" }, { "@id": "#ts001", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], diff --git a/ld/testdata/error-p010-context.jsonld b/ld/testdata/error-p010-context.jsonld new file mode 100644 index 0000000..c379d53 --- /dev/null +++ b/ld/testdata/error-p010-context.jsonld @@ -0,0 +1,5 @@ +{ + "@context": { + "foo": {"@id": "http://example/foo", "@nest": "@nest"} + } +} \ No newline at end of file diff --git a/ld/testdata/error-p010-in.jsonld b/ld/testdata/error-p010-in.jsonld new file mode 100644 index 0000000..ffc25a6 --- /dev/null +++ b/ld/testdata/error-p010-in.jsonld @@ -0,0 +1,3 @@ +{ + "http://example/foo": "bar" +} \ No newline at end of file diff --git a/ld/testdata/error-p011-context.jsonld b/ld/testdata/error-p011-context.jsonld new file mode 100644 index 0000000..c749805 --- /dev/null +++ b/ld/testdata/error-p011-context.jsonld @@ -0,0 +1,5 @@ +{ + "@context": { + "foo": {"@id": "http://example/foo", "@context": {}} + } +} \ No newline at end of file diff --git a/ld/testdata/error-p011-in.jsonld b/ld/testdata/error-p011-in.jsonld new file mode 100644 index 0000000..ffc25a6 --- /dev/null +++ b/ld/testdata/error-p011-in.jsonld @@ -0,0 +1,3 @@ +{ + "http://example/foo": "bar" +} \ No newline at end of file diff --git a/ld/testdata/error-p012-context.jsonld b/ld/testdata/error-p012-context.jsonld new file mode 100644 index 0000000..0acc2d8 --- /dev/null +++ b/ld/testdata/error-p012-context.jsonld @@ -0,0 +1,5 @@ +{ + "@context": { + "foo": {"@id": "http://example/foo", "@container": ["@set"]} + } +} \ No newline at end of file diff --git a/ld/testdata/error-p012-in.jsonld b/ld/testdata/error-p012-in.jsonld new file mode 100644 index 0000000..ffc25a6 --- /dev/null +++ b/ld/testdata/error-p012-in.jsonld @@ -0,0 +1,3 @@ +{ + "http://example/foo": "bar" +} \ No newline at end of file diff --git a/ld/testdata/error-p013-context.jsonld b/ld/testdata/error-p013-context.jsonld new file mode 100644 index 0000000..20cd3cd --- /dev/null +++ b/ld/testdata/error-p013-context.jsonld @@ -0,0 +1,5 @@ +{ + "@context": { + "foo": {"@id": "http://example/foo", "@container": "@id"} + } +} \ No newline at end of file diff --git a/ld/testdata/error-p013-in.jsonld b/ld/testdata/error-p013-in.jsonld new file mode 100644 index 0000000..d79e470 --- /dev/null +++ b/ld/testdata/error-p013-in.jsonld @@ -0,0 +1,3 @@ +{ + "http://example/foo": {"@id": "http://example/foo", "http://example/bar": "bar"} +} \ No newline at end of file diff --git a/ld/testdata/error-p014-context.jsonld b/ld/testdata/error-p014-context.jsonld new file mode 100644 index 0000000..8b1f72c --- /dev/null +++ b/ld/testdata/error-p014-context.jsonld @@ -0,0 +1,5 @@ +{ + "@context": { + "foo": {"@id": "http://example/foo", "@container": "@type"} + } +} \ No newline at end of file diff --git a/ld/testdata/error-p014-in.jsonld b/ld/testdata/error-p014-in.jsonld new file mode 100644 index 0000000..286bc55 --- /dev/null +++ b/ld/testdata/error-p014-in.jsonld @@ -0,0 +1,3 @@ +{ + "http://example/foo": {"@type": "http://example/foo", "http://example/bar": "bar"} +} \ No newline at end of file diff --git a/ld/testdata/error-p015-context.jsonld b/ld/testdata/error-p015-context.jsonld new file mode 100644 index 0000000..d3f8c2a --- /dev/null +++ b/ld/testdata/error-p015-context.jsonld @@ -0,0 +1,5 @@ +{ + "@context": { + "foo": {"@id": "http://example/foo", "@container": "@graph"} + } +} \ No newline at end of file diff --git a/ld/testdata/error-p015-in.jsonld b/ld/testdata/error-p015-in.jsonld new file mode 100644 index 0000000..69e8492 --- /dev/null +++ b/ld/testdata/error-p015-in.jsonld @@ -0,0 +1,3 @@ +{ + "http://example/foo": {"@graph": {"http://example/bar": "bar"}} +} \ No newline at end of file diff --git a/ld/testdata/expand-0079-in.jsonld b/ld/testdata/expand-0079-in.jsonld new file mode 100644 index 0000000..8514ced --- /dev/null +++ b/ld/testdata/expand-0079-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + }, + "input": { + "value": "x" + } +} diff --git a/ld/testdata/expand-0079-out.jsonld b/ld/testdata/expand-0079-out.jsonld new file mode 100644 index 0000000..3716624 --- /dev/null +++ b/ld/testdata/expand-0079-out.jsonld @@ -0,0 +1,9 @@ +[{ + "foo:input": [{ + "@graph": [{ + "foo:value": [{ + "@value": "x" + }] + }] + }] +}] diff --git a/ld/testdata/expand-0080-in.jsonld b/ld/testdata/expand-0080-in.jsonld new file mode 100644 index 0000000..098f868 --- /dev/null +++ b/ld/testdata/expand-0080-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": ["@graph", "@set"]}, + "value": "foo:value" + }, + "input": [{ + "value": "x" + }] +} diff --git a/ld/testdata/expand-0080-out.jsonld b/ld/testdata/expand-0080-out.jsonld new file mode 100644 index 0000000..3716624 --- /dev/null +++ b/ld/testdata/expand-0080-out.jsonld @@ -0,0 +1,9 @@ +[{ + "foo:input": [{ + "@graph": [{ + "foo:value": [{ + "@value": "x" + }] + }] + }] +}] diff --git a/ld/testdata/expand-0081-in.jsonld b/ld/testdata/expand-0081-in.jsonld new file mode 100644 index 0000000..d174297 --- /dev/null +++ b/ld/testdata/expand-0081-in.jsonld @@ -0,0 +1,11 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": "@graph"} + }, + "input": { + "@graph": { + "value": "x" + } + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0081-out.jsonld b/ld/testdata/expand-0081-out.jsonld new file mode 100644 index 0000000..e01c12e --- /dev/null +++ b/ld/testdata/expand-0081-out.jsonld @@ -0,0 +1,7 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0082-in.jsonld b/ld/testdata/expand-0082-in.jsonld new file mode 100644 index 0000000..83d3182 --- /dev/null +++ b/ld/testdata/expand-0082-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + }, + "input": { + "g1": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0082-out.jsonld b/ld/testdata/expand-0082-out.jsonld new file mode 100644 index 0000000..dfc5b0a --- /dev/null +++ b/ld/testdata/expand-0082-out.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0083-in.jsonld b/ld/testdata/expand-0083-in.jsonld new file mode 100644 index 0000000..71f8a50 --- /dev/null +++ b/ld/testdata/expand-0083-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index", "@set"]} + }, + "input": { + "g1": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0083-out.jsonld b/ld/testdata/expand-0083-out.jsonld new file mode 100644 index 0000000..dfc5b0a --- /dev/null +++ b/ld/testdata/expand-0083-out.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0084-in.jsonld b/ld/testdata/expand-0084-in.jsonld new file mode 100644 index 0000000..0026a77 --- /dev/null +++ b/ld/testdata/expand-0084-in.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + }, + "input": { + "g1": { + "@graph": { + "value": "x" + } + } + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0084-out.jsonld b/ld/testdata/expand-0084-out.jsonld new file mode 100644 index 0000000..dfc5b0a --- /dev/null +++ b/ld/testdata/expand-0084-out.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0085-in.jsonld b/ld/testdata/expand-0085-in.jsonld new file mode 100644 index 0000000..3cd17bc --- /dev/null +++ b/ld/testdata/expand-0085-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "http://example.com/g1": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0085-out.jsonld b/ld/testdata/expand-0085-out.jsonld new file mode 100644 index 0000000..7cb99fc --- /dev/null +++ b/ld/testdata/expand-0085-out.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0086-in.jsonld b/ld/testdata/expand-0086-in.jsonld new file mode 100644 index 0000000..27ea6de --- /dev/null +++ b/ld/testdata/expand-0086-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id", "@set"]} + }, + "input": { + "http://example.com/g1": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0086-out.jsonld b/ld/testdata/expand-0086-out.jsonld new file mode 100644 index 0000000..7cb99fc --- /dev/null +++ b/ld/testdata/expand-0086-out.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0087-in.jsonld b/ld/testdata/expand-0087-in.jsonld new file mode 100644 index 0000000..aa994f3 --- /dev/null +++ b/ld/testdata/expand-0087-in.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "http://example.com/g1": { + "@graph": { + "value": "x" + } + } + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0087-out.jsonld b/ld/testdata/expand-0087-out.jsonld new file mode 100644 index 0000000..7cb99fc --- /dev/null +++ b/ld/testdata/expand-0087-out.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0088-in.jsonld b/ld/testdata/expand-0088-in.jsonld new file mode 100644 index 0000000..c0c20a1 --- /dev/null +++ b/ld/testdata/expand-0088-in.jsonld @@ -0,0 +1,11 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "@base": "http://example.com/", + "coerceId": {"@type": "@id"}, + "coerceVocab": {"@type": "@vocab"} + }, + "coerceDefault": ["string", true, false, 0, 1], + "coerceId": ["string", true, false, 0, 1], + "coerceVocab": ["string", true, false, 0, 1] +} diff --git a/ld/testdata/expand-0088-out.jsonld b/ld/testdata/expand-0088-out.jsonld new file mode 100644 index 0000000..650d292 --- /dev/null +++ b/ld/testdata/expand-0088-out.jsonld @@ -0,0 +1,25 @@ +[ + { + "http://example.org/coerceDefault": [ + {"@value": "string"}, + {"@value": true}, + {"@value": false}, + {"@value": 0}, + {"@value": 1} + ], + "http://example.org/coerceId": [ + {"@id": "http://example.com/string"}, + {"@value": true}, + {"@value": false}, + {"@value": 0}, + {"@value": 1} + ], + "http://example.org/coerceVocab": [ + {"@id": "http://example.org/string"}, + {"@value": true}, + {"@value": false}, + {"@value": 0}, + {"@value": 1} + ] + } +] diff --git a/ld/testdata/expand-0089-in.jsonld b/ld/testdata/expand-0089-in.jsonld new file mode 100644 index 0000000..7a6dcd8 --- /dev/null +++ b/ld/testdata/expand-0089-in.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@base": "" + }, + "@id": "relative-iri", + "http://prop": "value" +} diff --git a/ld/testdata/expand-0089-out.jsonld b/ld/testdata/expand-0089-out.jsonld new file mode 100644 index 0000000..9e0896b --- /dev/null +++ b/ld/testdata/expand-0089-out.jsonld @@ -0,0 +1,4 @@ +[{ + "@id": "http://example/base/relative-iri", + "http://prop": [{"@value": "value"}] +}] diff --git a/ld/testdata/expand-0090-in.jsonld b/ld/testdata/expand-0090-in.jsonld new file mode 100644 index 0000000..0853f89 --- /dev/null +++ b/ld/testdata/expand-0090-in.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@base": ".." + }, + "@id": "relative-iri", + "http://prop": "value" +} diff --git a/ld/testdata/expand-0090-out.jsonld b/ld/testdata/expand-0090-out.jsonld new file mode 100644 index 0000000..2993859 --- /dev/null +++ b/ld/testdata/expand-0090-out.jsonld @@ -0,0 +1,4 @@ +[{ + "@id": "http://example/relative-iri", + "http://prop": [{"@value": "value"}] +}] diff --git a/ld/testdata/expand-0091-in.jsonld b/ld/testdata/expand-0091-in.jsonld new file mode 100644 index 0000000..bad0f06 --- /dev/null +++ b/ld/testdata/expand-0091-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": [{ + "@base": "http://foo.bar/./baz/" + }, { + "@base": "example/" + }], + "@id": "relative-iri", + "http://prop": "value" +} diff --git a/ld/testdata/expand-0091-out.jsonld b/ld/testdata/expand-0091-out.jsonld new file mode 100644 index 0000000..638d6ee --- /dev/null +++ b/ld/testdata/expand-0091-out.jsonld @@ -0,0 +1,4 @@ +[{ + "@id": "http://foo.bar/baz/example/relative-iri", + "http://prop": [{"@value": "value"}] +}] diff --git a/ld/testdata/expand-0092-in.jsonld b/ld/testdata/expand-0092-in.jsonld new file mode 100644 index 0000000..d7ed55e --- /dev/null +++ b/ld/testdata/expand-0092-in.jsonld @@ -0,0 +1,18 @@ +{ + "@context": { + "@base": "http://example.com/some/deep/directory/and/file/", + "@vocab": "" + }, + "@id": "relativePropertyIris", + "link": "link", + "#fragment-works": "#fragment-works", + "?query=works": "?query=works", + "./": "./", + "../": "../", + "../parent": "../parent", + "../../parent-parent-eq-root": "../../parent-parent-eq-root", + "../../../../../still-root": "../../../../../still-root", + "../.././.././../../too-many-dots": "../.././.././../../too-many-dots", + "/absolute": "/absolute", + "//example.org/scheme-relative": "//example.org/scheme-relative" +} diff --git a/ld/testdata/expand-0092-out.jsonld b/ld/testdata/expand-0092-out.jsonld new file mode 100644 index 0000000..a854012 --- /dev/null +++ b/ld/testdata/expand-0092-out.jsonld @@ -0,0 +1,16 @@ +[ + { + "@id": "http://example.com/some/deep/directory/and/file/relativePropertyIris", + "http://example.com/some/deep/directory/and/file/#fragment-works": [{"@value": "#fragment-works"}], + "http://example.com/some/deep/directory/and/file/../": [{"@value": "../"}], + "http://example.com/some/deep/directory/and/file/../../../../../still-root": [{"@value": "../../../../../still-root"}], + "http://example.com/some/deep/directory/and/file/../.././.././../../too-many-dots": [{"@value": "../.././.././../../too-many-dots"}], + "http://example.com/some/deep/directory/and/file/../../parent-parent-eq-root": [{"@value": "../../parent-parent-eq-root"}], + "http://example.com/some/deep/directory/and/file/../parent": [{"@value": "../parent"}], + "http://example.com/some/deep/directory/and/file/./": [{"@value": "./"}], + "http://example.com/some/deep/directory/and/file///example.org/scheme-relative": [{"@value": "//example.org/scheme-relative"}], + "http://example.com/some/deep/directory/and/file//absolute": [{"@value": "/absolute"}], + "http://example.com/some/deep/directory/and/file/?query=works": [{"@value": "?query=works"}], + "http://example.com/some/deep/directory/and/file/link": [{"@value": "link"}] + } +] \ No newline at end of file diff --git a/ld/testdata/expand-0093-in.jsonld b/ld/testdata/expand-0093-in.jsonld new file mode 100644 index 0000000..b32c094 --- /dev/null +++ b/ld/testdata/expand-0093-in.jsonld @@ -0,0 +1,12 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": "@graph"}, + "value": "foo:value" + }, + "input": [{ + "value": "x" + }, { + "value": "y" + }] +} \ No newline at end of file diff --git a/ld/testdata/expand-0093-out.jsonld b/ld/testdata/expand-0093-out.jsonld new file mode 100644 index 0000000..5e4e5bd --- /dev/null +++ b/ld/testdata/expand-0093-out.jsonld @@ -0,0 +1,15 @@ +[{ + "foo:input": [{ + "@graph": [{ + "foo:value": [{ + "@value": "x" + }] + }] + }, { + "@graph": [{ + "foo:value": [{ + "@value": "y" + }] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0094-in.jsonld b/ld/testdata/expand-0094-in.jsonld new file mode 100644 index 0000000..2e0dc62 --- /dev/null +++ b/ld/testdata/expand-0094-in.jsonld @@ -0,0 +1,12 @@ +{ + "@context": { + "@version": 1.1, + "input": {"@id": "foo:input", "@container": ["@graph", "@set"]}, + "value": "foo:value" + }, + "input": [{ + "value": "x" + }, { + "value": "y" + }] +} \ No newline at end of file diff --git a/ld/testdata/expand-0094-out.jsonld b/ld/testdata/expand-0094-out.jsonld new file mode 100644 index 0000000..5e4e5bd --- /dev/null +++ b/ld/testdata/expand-0094-out.jsonld @@ -0,0 +1,15 @@ +[{ + "foo:input": [{ + "@graph": [{ + "foo:value": [{ + "@value": "x" + }] + }] + }, { + "@graph": [{ + "foo:value": [{ + "@value": "y" + }] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0095-in.jsonld b/ld/testdata/expand-0095-in.jsonld new file mode 100644 index 0000000..bf1c082 --- /dev/null +++ b/ld/testdata/expand-0095-in.jsonld @@ -0,0 +1,15 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": "@graph"} + }, + "input": [{ + "@graph": { + "value": "x" + } + }, { + "@graph": { + "value": "y" + } + }] +} \ No newline at end of file diff --git a/ld/testdata/expand-0095-out.jsonld b/ld/testdata/expand-0095-out.jsonld new file mode 100644 index 0000000..96f3484 --- /dev/null +++ b/ld/testdata/expand-0095-out.jsonld @@ -0,0 +1,11 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0096-in.jsonld b/ld/testdata/expand-0096-in.jsonld new file mode 100644 index 0000000..4c7c6f4 --- /dev/null +++ b/ld/testdata/expand-0096-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + }, + "input": { + "g1": {"value": "x"}, + "g2": {"value": "y"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0096-out.jsonld b/ld/testdata/expand-0096-out.jsonld new file mode 100644 index 0000000..6788bb4 --- /dev/null +++ b/ld/testdata/expand-0096-out.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0097-in.jsonld b/ld/testdata/expand-0097-in.jsonld new file mode 100644 index 0000000..dc5b900 --- /dev/null +++ b/ld/testdata/expand-0097-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index", "@set"]} + }, + "input": { + "g1": {"value": "x"}, + "g2": {"value": "y"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0097-out.jsonld b/ld/testdata/expand-0097-out.jsonld new file mode 100644 index 0000000..6788bb4 --- /dev/null +++ b/ld/testdata/expand-0097-out.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0098-in.jsonld b/ld/testdata/expand-0098-in.jsonld new file mode 100644 index 0000000..27ae04b --- /dev/null +++ b/ld/testdata/expand-0098-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + }, + "input": { + "g1": {"@graph": {"value": "x"}}, + "g2": {"@graph": {"value": "y"}} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0098-out.jsonld b/ld/testdata/expand-0098-out.jsonld new file mode 100644 index 0000000..6788bb4 --- /dev/null +++ b/ld/testdata/expand-0098-out.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0099-in.jsonld b/ld/testdata/expand-0099-in.jsonld new file mode 100644 index 0000000..0010e0a --- /dev/null +++ b/ld/testdata/expand-0099-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "http://example.com/g1": {"value": "x"}, + "http://example.com/g2": {"value": "y"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0099-out.jsonld b/ld/testdata/expand-0099-out.jsonld new file mode 100644 index 0000000..45ce037 --- /dev/null +++ b/ld/testdata/expand-0099-out.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0100-in.jsonld b/ld/testdata/expand-0100-in.jsonld new file mode 100644 index 0000000..43d3528 --- /dev/null +++ b/ld/testdata/expand-0100-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id", "@set"]} + }, + "input": { + "http://example.com/g1": {"value": "x"}, + "http://example.com/g2": {"value": "y"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0100-out.jsonld b/ld/testdata/expand-0100-out.jsonld new file mode 100644 index 0000000..45ce037 --- /dev/null +++ b/ld/testdata/expand-0100-out.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0101-in.jsonld b/ld/testdata/expand-0101-in.jsonld new file mode 100644 index 0000000..cf60556 --- /dev/null +++ b/ld/testdata/expand-0101-in.jsonld @@ -0,0 +1,18 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "http://example.com/g1": { + "@graph": { + "value": "x" + } + }, + "http://example.com/g2": { + "@graph": { + "value": "y" + } + } + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0101-out.jsonld b/ld/testdata/expand-0101-out.jsonld new file mode 100644 index 0000000..45ce037 --- /dev/null +++ b/ld/testdata/expand-0101-out.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0102-in.jsonld b/ld/testdata/expand-0102-in.jsonld new file mode 100644 index 0000000..cac7b7f --- /dev/null +++ b/ld/testdata/expand-0102-in.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": "@graph"} + }, + "input": { + "@graph": [{ + "value": "x" + }, { + "value": "y" + }] + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0102-out.jsonld b/ld/testdata/expand-0102-out.jsonld new file mode 100644 index 0000000..ebd8083 --- /dev/null +++ b/ld/testdata/expand-0102-out.jsonld @@ -0,0 +1,9 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }, { + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0103-in.jsonld b/ld/testdata/expand-0103-in.jsonld new file mode 100644 index 0000000..bf1c082 --- /dev/null +++ b/ld/testdata/expand-0103-in.jsonld @@ -0,0 +1,15 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": "@graph"} + }, + "input": [{ + "@graph": { + "value": "x" + } + }, { + "@graph": { + "value": "y" + } + }] +} \ No newline at end of file diff --git a/ld/testdata/expand-0103-out.jsonld b/ld/testdata/expand-0103-out.jsonld new file mode 100644 index 0000000..96f3484 --- /dev/null +++ b/ld/testdata/expand-0103-out.jsonld @@ -0,0 +1,11 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0104-in.jsonld b/ld/testdata/expand-0104-in.jsonld new file mode 100644 index 0000000..7e8d19c --- /dev/null +++ b/ld/testdata/expand-0104-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": "@graph"} + }, + "input": [ + {"@graph": {"value": "x"}}, + {"value": "y"} + ] +} \ No newline at end of file diff --git a/ld/testdata/expand-0104-out.jsonld b/ld/testdata/expand-0104-out.jsonld new file mode 100644 index 0000000..96f3484 --- /dev/null +++ b/ld/testdata/expand-0104-out.jsonld @@ -0,0 +1,11 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0105-in.jsonld b/ld/testdata/expand-0105-in.jsonld new file mode 100644 index 0000000..bcad0c6 --- /dev/null +++ b/ld/testdata/expand-0105-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + }, + "input": { + "g1": [{"@graph": {"value": "x"}}, {"value": "y"}], + "g2": [{"@graph": {"value": "a"}}, {"value": "b"}] + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0105-out.jsonld b/ld/testdata/expand-0105-out.jsonld new file mode 100644 index 0000000..27d2cd8 --- /dev/null +++ b/ld/testdata/expand-0105-out.jsonld @@ -0,0 +1,23 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "a"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "b"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0106-in.jsonld b/ld/testdata/expand-0106-in.jsonld new file mode 100644 index 0000000..cf60556 --- /dev/null +++ b/ld/testdata/expand-0106-in.jsonld @@ -0,0 +1,18 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "http://example.com/g1": { + "@graph": { + "value": "x" + } + }, + "http://example.com/g2": { + "@graph": { + "value": "y" + } + } + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0106-out.jsonld b/ld/testdata/expand-0106-out.jsonld new file mode 100644 index 0000000..45ce037 --- /dev/null +++ b/ld/testdata/expand-0106-out.jsonld @@ -0,0 +1,13 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0107-in.jsonld b/ld/testdata/expand-0107-in.jsonld new file mode 100644 index 0000000..3e1c5af --- /dev/null +++ b/ld/testdata/expand-0107-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} + }, + "input": { + "g1": [{"value": "x"}, {"value": "y"}], + "g2": [{"value": "a"}, {"value": "b"}] + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0107-out.jsonld b/ld/testdata/expand-0107-out.jsonld new file mode 100644 index 0000000..27d2cd8 --- /dev/null +++ b/ld/testdata/expand-0107-out.jsonld @@ -0,0 +1,23 @@ +[{ + "http://example.org/input": [{ + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@index": "g1", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "a"}] + }] + }, { + "@index": "g2", + "@graph": [{ + "http://example.org/value": [{"@value": "b"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-0108-in.jsonld b/ld/testdata/expand-0108-in.jsonld new file mode 100644 index 0000000..182c031 --- /dev/null +++ b/ld/testdata/expand-0108-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "http://example.com/g1": [{"value": "x"}, {"value": "y"}], + "http://example.com/g2": [{"value": "a"}, {"value": "b"}] + } +} \ No newline at end of file diff --git a/ld/testdata/expand-0108-out.jsonld b/ld/testdata/expand-0108-out.jsonld new file mode 100644 index 0000000..a11e1d7 --- /dev/null +++ b/ld/testdata/expand-0108-out.jsonld @@ -0,0 +1,23 @@ +[{ + "http://example.org/input": [{ + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }, { + "@id": "http://example.com/g1", + "@graph": [{ + "http://example.org/value": [{"@value": "y"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "a"}] + }] + }, { + "@id": "http://example.com/g2", + "@graph": [{ + "http://example.org/value": [{"@value": "b"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-c006-in.jsonld b/ld/testdata/expand-c006-in.jsonld new file mode 100644 index 0000000..757aeaa --- /dev/null +++ b/ld/testdata/expand-c006-in.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + }, + "a": {"@type": "Foo", "bar": "baz"} +} \ No newline at end of file diff --git a/ld/testdata/expand-c006-out.jsonld b/ld/testdata/expand-c006-out.jsonld new file mode 100644 index 0000000..16baea7 --- /dev/null +++ b/ld/testdata/expand-c006-out.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example.org/bar": [{"@value": "baz"}] + }] + } +] \ No newline at end of file diff --git a/ld/testdata/expand-c007-in.jsonld b/ld/testdata/expand-c007-in.jsonld new file mode 100644 index 0000000..05c9f1d --- /dev/null +++ b/ld/testdata/expand-c007-in.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": {"@type": "@id"}}}, + "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"} + }, + "a": {"@type": "Foo", "bar": "http://example/baz"} +} \ No newline at end of file diff --git a/ld/testdata/expand-c007-out.jsonld b/ld/testdata/expand-c007-out.jsonld new file mode 100644 index 0000000..c173b89 --- /dev/null +++ b/ld/testdata/expand-c007-out.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example/bar": [{"@id": "http://example/baz"}] + }] + } +] \ No newline at end of file diff --git a/ld/testdata/expand-c008-in.jsonld b/ld/testdata/expand-c008-in.jsonld new file mode 100644 index 0000000..e0b472b --- /dev/null +++ b/ld/testdata/expand-c008-in.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "type": "@type", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + }, + "a": {"type": "Foo", "bar": "baz"} +} \ No newline at end of file diff --git a/ld/testdata/expand-c008-out.jsonld b/ld/testdata/expand-c008-out.jsonld new file mode 100644 index 0000000..16baea7 --- /dev/null +++ b/ld/testdata/expand-c008-out.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example.org/bar": [{"@value": "baz"}] + }] + } +] \ No newline at end of file diff --git a/ld/testdata/expand-c009-in.jsonld b/ld/testdata/expand-c009-in.jsonld new file mode 100644 index 0000000..c2b6d11 --- /dev/null +++ b/ld/testdata/expand-c009-in.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"baz": {"@type": "@vocab"}}} + }, + "@type": "Foo", + "bar": {"baz": "buzz"} +} \ No newline at end of file diff --git a/ld/testdata/expand-c009-out.jsonld b/ld/testdata/expand-c009-out.jsonld new file mode 100644 index 0000000..59a1fb5 --- /dev/null +++ b/ld/testdata/expand-c009-out.jsonld @@ -0,0 +1,8 @@ +[ + { + "@type": ["http://example/Foo"], + "http://example/bar": [{ + "http://example/baz": [{"@id": "http://example/buzz"}] + }] + } +] \ No newline at end of file diff --git a/ld/testdata/expand-c010-in.jsonld b/ld/testdata/expand-c010-in.jsonld new file mode 100644 index 0000000..809997b --- /dev/null +++ b/ld/testdata/expand-c010-in.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "@vocab": "http://example/", + "B": {"@context": {"c": "http://example.org/c"}} + }, + "a": { + "@context": {"@vocab": "http://example.com/"}, + "@type": "B", + "a": "A in example.com", + "c": "C in example.org" + }, + "c": "C in example" +} \ No newline at end of file diff --git a/ld/testdata/expand-c010-out.jsonld b/ld/testdata/expand-c010-out.jsonld new file mode 100644 index 0000000..1057b0a --- /dev/null +++ b/ld/testdata/expand-c010-out.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example/a": [{ + "@type": ["http://example/B"], + "http://example.com/a": [{"@value": "A in example.com"}], + "http://example.org/c": [{"@value": "C in example.org"}] + }], + "http://example/c": [{"@value": "C in example"}] +}] \ No newline at end of file diff --git a/ld/testdata/expand-c011-in.jsonld b/ld/testdata/expand-c011-in.jsonld new file mode 100644 index 0000000..c57c55e --- /dev/null +++ b/ld/testdata/expand-c011-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example/", + "t1": {"@context": {"foo": {"@id": "http://example.com/foo"}}}, + "t2": {"@context": {"foo": {"@id": "http://example.org/foo", "@type": "@id"}}} + }, + "@type": ["t2", "t1"], + "foo": "urn:bar" +} \ No newline at end of file diff --git a/ld/testdata/expand-c011-out.jsonld b/ld/testdata/expand-c011-out.jsonld new file mode 100644 index 0000000..a702942 --- /dev/null +++ b/ld/testdata/expand-c011-out.jsonld @@ -0,0 +1,6 @@ +[{ + "@type": ["http://example/t2", "http://example/t1"], + "http://example.org/foo": [ + {"@id": "urn:bar"} + ] +}] \ No newline at end of file diff --git a/ld/testdata/expand-m007-in.jsonld b/ld/testdata/expand-m007-in.jsonld index 2526572..a660b72 100644 --- a/ld/testdata/expand-m007-in.jsonld +++ b/ld/testdata/expand-m007-in.jsonld @@ -1,6 +1,7 @@ { "@context": { - "typemap": {"@id": "http://example/typemap", "@container": "@type"}, + "@vocab": "http://example/", + "typemap": {"@container": "@type"}, "label": "http://example/label" }, "typemap": { diff --git a/ld/testdata/expand-m007-out.jsonld b/ld/testdata/expand-m007-out.jsonld index 24b1b1c..a6cfccf 100644 --- a/ld/testdata/expand-m007-out.jsonld +++ b/ld/testdata/expand-m007-out.jsonld @@ -1,5 +1,5 @@ [{ "http://example/typemap": [ - {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example.org/Foo"]} + {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example/Foo"]} ] }] \ No newline at end of file diff --git a/ld/testdata/expand-m008-in.jsonld b/ld/testdata/expand-m008-in.jsonld index 757aeaa..3e48d6e 100644 --- a/ld/testdata/expand-m008-in.jsonld +++ b/ld/testdata/expand-m008-in.jsonld @@ -1,7 +1,10 @@ { "@context": { "@vocab": "http://example/", - "Foo": {"@context": {"bar": "http://example.org/bar"}} + "typemap": {"@container": "@type"}, + "Type": {"@context": {"a": "http://example.org/a"}} }, - "a": {"@type": "Foo", "bar": "baz"} + "typemap": { + "Type": {"a": "Object with @type "} + } } \ No newline at end of file diff --git a/ld/testdata/expand-m008-out.jsonld b/ld/testdata/expand-m008-out.jsonld index 16baea7..e1da44e 100644 --- a/ld/testdata/expand-m008-out.jsonld +++ b/ld/testdata/expand-m008-out.jsonld @@ -1,8 +1,5 @@ -[ - { - "http://example/a": [{ - "@type": ["http://example/Foo"], - "http://example.org/bar": [{"@value": "baz"}] - }] - } -] \ No newline at end of file +[{ + "http://example/typemap": [ + {"http://example.org/a": [{"@value": "Object with @type "}], "@type": ["http://example/Type"]} + ] +}] \ No newline at end of file diff --git a/ld/testdata/expand-m009-in.jsonld b/ld/testdata/expand-m009-in.jsonld index 05c9f1d..510a570 100644 --- a/ld/testdata/expand-m009-in.jsonld +++ b/ld/testdata/expand-m009-in.jsonld @@ -1,8 +1,15 @@ { "@context": { - "@vocab": "http://example/", - "Foo": {"@context": {"bar": {"@type": "@id"}}}, - "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"} + "vocab": "http://example.com/vocab/", + "label": { + "@id": "vocab:label", + "@container": "@language" + } }, - "a": {"@type": "Foo", "bar": "http://example/baz"} + "@id": "http://example.com/queen", + "label": { + "en": "The Queen", + "de": [ "Die Königin", "Ihre Majestät" ], + "@none": "The Queen" + } } \ No newline at end of file diff --git a/ld/testdata/expand-m009-out.jsonld b/ld/testdata/expand-m009-out.jsonld index c173b89..94293f5 100644 --- a/ld/testdata/expand-m009-out.jsonld +++ b/ld/testdata/expand-m009-out.jsonld @@ -1,8 +1,11 @@ [ { - "http://example/a": [{ - "@type": ["http://example/Foo"], - "http://example/bar": [{"@id": "http://example/baz"}] - }] + "@id": "http://example.com/queen", + "http://example.com/vocab/label": [ + {"@value": "The Queen"}, + {"@value": "Die Königin", "@language": "de"}, + {"@value": "Ihre Majestät", "@language": "de"}, + {"@value": "The Queen", "@language": "en"} + ] } ] \ No newline at end of file diff --git a/ld/testdata/expand-m010-in.jsonld b/ld/testdata/expand-m010-in.jsonld index e0b472b..adc8cac 100644 --- a/ld/testdata/expand-m010-in.jsonld +++ b/ld/testdata/expand-m010-in.jsonld @@ -1,8 +1,16 @@ { "@context": { - "@vocab": "http://example/", - "type": "@type", - "Foo": {"@context": {"bar": "http://example.org/bar"}} + "vocab": "http://example.com/vocab/", + "label": { + "@id": "vocab:label", + "@container": "@language" + }, + "none": "@none" }, - "a": {"type": "Foo", "bar": "baz"} + "@id": "http://example.com/queen", + "label": { + "en": "The Queen", + "de": [ "Die Königin", "Ihre Majestät" ], + "none": "The Queen" + } } \ No newline at end of file diff --git a/ld/testdata/expand-m010-out.jsonld b/ld/testdata/expand-m010-out.jsonld index 16baea7..9295bdb 100644 --- a/ld/testdata/expand-m010-out.jsonld +++ b/ld/testdata/expand-m010-out.jsonld @@ -1,8 +1,11 @@ [ { - "http://example/a": [{ - "@type": ["http://example/Foo"], - "http://example.org/bar": [{"@value": "baz"}] - }] + "@id": "http://example.com/queen", + "http://example.com/vocab/label": [ + {"@value": "Die Königin", "@language": "de"}, + {"@value": "Ihre Majestät", "@language": "de"}, + {"@value": "The Queen", "@language": "en"}, + {"@value": "The Queen"} + ] } ] \ No newline at end of file diff --git a/ld/testdata/expand-m011-in.jsonld b/ld/testdata/expand-m011-in.jsonld index c2b6d11..a8ba372 100644 --- a/ld/testdata/expand-m011-in.jsonld +++ b/ld/testdata/expand-m011-in.jsonld @@ -1,8 +1,11 @@ { "@context": { "@vocab": "http://example/", - "Foo": {"@context": {"baz": {"@type": "@vocab"}}} + "idmap": {"@container": "@id"}, + "none": "@none" }, - "@type": "Foo", - "bar": {"baz": "buzz"} + "idmap": { + "@none": {"label": "Object with no @id"}, + "none": {"label": "Another object with no @id"} + } } \ No newline at end of file diff --git a/ld/testdata/expand-m011-out.jsonld b/ld/testdata/expand-m011-out.jsonld index 59a1fb5..1e0160e 100644 --- a/ld/testdata/expand-m011-out.jsonld +++ b/ld/testdata/expand-m011-out.jsonld @@ -1,8 +1,6 @@ -[ - { - "@type": ["http://example/Foo"], - "http://example/bar": [{ - "http://example/baz": [{"@id": "http://example/buzz"}] - }] - } -] \ No newline at end of file +[{ + "http://example/idmap": [ + {"http://example/label": [{"@value": "Object with no @id"}]}, + {"http://example/label": [{"@value": "Another object with no @id"}]} + ] +}] \ No newline at end of file diff --git a/ld/testdata/expand-m012-in.jsonld b/ld/testdata/expand-m012-in.jsonld index 809997b..c8bbe0f 100644 --- a/ld/testdata/expand-m012-in.jsonld +++ b/ld/testdata/expand-m012-in.jsonld @@ -1,13 +1,11 @@ { "@context": { "@vocab": "http://example/", - "B": {"@context": {"c": "http://example.org/c"}} + "typemap": {"@container": "@type"}, + "none": "@none" }, - "a": { - "@context": {"@vocab": "http://example.com/"}, - "@type": "B", - "a": "A in example.com", - "c": "C in example.org" - }, - "c": "C in example" + "typemap": { + "@none": {"label": "Object with no @type"}, + "none": {"label": "Another object with no @type"} + } } \ No newline at end of file diff --git a/ld/testdata/expand-m012-out.jsonld b/ld/testdata/expand-m012-out.jsonld index 1057b0a..2c62979 100644 --- a/ld/testdata/expand-m012-out.jsonld +++ b/ld/testdata/expand-m012-out.jsonld @@ -1,8 +1,6 @@ [{ - "http://example/a": [{ - "@type": ["http://example/B"], - "http://example.com/a": [{"@value": "A in example.com"}], - "http://example.org/c": [{"@value": "C in example.org"}] - }], - "http://example/c": [{"@value": "C in example"}] + "http://example/typemap": [ + {"http://example/label": [{"@value": "Object with no @type"}]}, + {"http://example/label": [{"@value": "Another object with no @type"}]} + ] }] \ No newline at end of file diff --git a/ld/testdata/expand-m013-in.jsonld b/ld/testdata/expand-m013-in.jsonld index 3e48d6e..545c8c3 100644 --- a/ld/testdata/expand-m013-in.jsonld +++ b/ld/testdata/expand-m013-in.jsonld @@ -1,10 +1,9 @@ { "@context": { - "@vocab": "http://example/", - "typemap": {"@container": "@type"}, - "Type": {"@context": {"a": "http://example.org/a"}} + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]} }, - "typemap": { - "Type": {"a": "Object with @type "} + "input": { + "@none": {"value": "x"} } } \ No newline at end of file diff --git a/ld/testdata/expand-m013-out.jsonld b/ld/testdata/expand-m013-out.jsonld index e1da44e..e01c12e 100644 --- a/ld/testdata/expand-m013-out.jsonld +++ b/ld/testdata/expand-m013-out.jsonld @@ -1,5 +1,7 @@ [{ - "http://example/typemap": [ - {"http://example.org/a": [{"@value": "Object with @type "}], "@type": ["http://example/Type"]} - ] + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] }] \ No newline at end of file diff --git a/ld/testdata/expand-m014-in.jsonld b/ld/testdata/expand-m014-in.jsonld new file mode 100644 index 0000000..a1e454b --- /dev/null +++ b/ld/testdata/expand-m014-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@index"]}, + "none": "@none" + }, + "input": { + "none": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-m014-out.jsonld b/ld/testdata/expand-m014-out.jsonld new file mode 100644 index 0000000..e01c12e --- /dev/null +++ b/ld/testdata/expand-m014-out.jsonld @@ -0,0 +1,7 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-m015-in.jsonld b/ld/testdata/expand-m015-in.jsonld new file mode 100644 index 0000000..6594c8d --- /dev/null +++ b/ld/testdata/expand-m015-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]} + }, + "input": { + "@none": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-m015-out.jsonld b/ld/testdata/expand-m015-out.jsonld new file mode 100644 index 0000000..e01c12e --- /dev/null +++ b/ld/testdata/expand-m015-out.jsonld @@ -0,0 +1,7 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-m016-in.jsonld b/ld/testdata/expand-m016-in.jsonld new file mode 100644 index 0000000..13234db --- /dev/null +++ b/ld/testdata/expand-m016-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example.org/", + "input": {"@container": ["@graph", "@id"]}, + "none": "@none" + }, + "input": { + "none": {"value": "x"} + } +} \ No newline at end of file diff --git a/ld/testdata/expand-m016-out.jsonld b/ld/testdata/expand-m016-out.jsonld new file mode 100644 index 0000000..e01c12e --- /dev/null +++ b/ld/testdata/expand-m016-out.jsonld @@ -0,0 +1,7 @@ +[{ + "http://example.org/input": [{ + "@graph": [{ + "http://example.org/value": [{"@value": "x"}] + }] + }] +}] \ No newline at end of file diff --git a/ld/testdata/expand-manifest.jsonld b/ld/testdata/expand-manifest.jsonld index 153cbe9..c89bc1b 100644 --- a/ld/testdata/expand-manifest.jsonld +++ b/ld/testdata/expand-manifest.jsonld @@ -558,6 +558,250 @@ "purpose": "Use of multiple reverse properties", "input": "expand-0078-in.jsonld", "expect": "expand-0078-out.jsonld" + }, { + "@id": "#t0079", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand @graph container", + "purpose": "Use of @graph containers", + "input": "expand-0079-in.jsonld", + "expect": "expand-0079-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0080", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @set] container", + "purpose": "Use of [@graph, @set] containers", + "input": "expand-0080-in.jsonld", + "expect": "expand-0080-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0081", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Does not create an @graph container if value is a graph", + "purpose": "Don't double-expand an already expanded graph", + "input": "expand-0081-in.jsonld", + "expect": "expand-0081-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0082", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @index] container", + "purpose": "Use of @graph containers with @index", + "input": "expand-0082-in.jsonld", + "expect": "expand-0082-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0083", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @index, @set] container", + "purpose": "Use of @graph containers with @index and @set", + "input": "expand-0083-in.jsonld", + "expect": "expand-0083-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0084", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Do not expand [@graph, @index] container if value is a graph", + "purpose": "Does not create a new graph object if indexed value is already a graph object", + "input": "expand-0084-in.jsonld", + "expect": "expand-0084-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0085", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @id] container", + "purpose": "Use of @graph containers with @id", + "input": "expand-0085-in.jsonld", + "expect": "expand-0085-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0086", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @id, @set] container", + "purpose": "Use of @graph containers with @id and @set", + "input": "expand-0086-in.jsonld", + "expect": "expand-0086-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0087", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Do not expand [@graph, @id] container if value is a graph", + "purpose": "Does not create a new graph object if indexed value is already a graph object", + "input": "expand-0087-in.jsonld", + "expect": "expand-0087-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0088", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Do not expand native values to IRIs", + "purpose": "Value Expansion does not expand native values, such as booleans, to a node object", + "input": "expand-0088-in.jsonld", + "expect": "expand-0088-out.jsonld" + }, { + "@id": "#t0089", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "empty @base applied to the base option", + "purpose": "Use of an empty @base is applied to the base option", + "option": { + "base": "http://example/base/" + }, + "input": "expand-0089-in.jsonld", + "expect": "expand-0089-out.jsonld" + }, { + "@id": "#t0090", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "relative @base overrides base option and document location", + "purpose": "Use of a relative @base overrides base option and document location", + "option": { + "base": "http://example/base/" + }, + "input": "expand-0090-in.jsonld", + "expect": "expand-0090-out.jsonld" + }, { + "@id": "#t0091", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "relative and absolute @base overrides base option and document location", + "purpose": "Use of a relative and absolute @base overrides base option and document location", + "option": { + "base": "http://example/base/" + }, + "input": "expand-0091-in.jsonld", + "expect": "expand-0091-out.jsonld" + }, { + "@id": "#t0092", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Various relative IRIs as properties with with @vocab: ''", + "purpose": "Pathological relative property IRIs", + "input": "expand-0092-in.jsonld", + "expect": "expand-0092-out.jsonld" + }, { + "@id": "#t0093", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand @graph container (multiple objects)", + "purpose": "Use of @graph containers", + "input": "expand-0093-in.jsonld", + "expect": "expand-0093-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0094", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @set] container (multiple objects)", + "purpose": "Use of [@graph, @set] containers", + "input": "expand-0094-in.jsonld", + "expect": "expand-0094-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0095", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Does not create an @graph container if value is a graph (multiple objects)", + "purpose": "Don't double-expand an already expanded graph", + "input": "expand-0095-in.jsonld", + "expect": "expand-0095-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0096", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @index] container (multiple indexed objects)", + "purpose": "Use of @graph containers with @index", + "input": "expand-0096-in.jsonld", + "expect": "expand-0096-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0097", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @index, @set] container (multiple objects)", + "purpose": "Use of @graph containers with @index and @set", + "input": "expand-0097-in.jsonld", + "expect": "expand-0097-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0098", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Do not expand [@graph, @index] container if value is a graph (multiple objects)", + "purpose": "Does not create a new graph object if indexed value is already a graph object", + "input": "expand-0098-in.jsonld", + "expect": "expand-0098-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0099", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @id] container (multiple objects)", + "purpose": "Use of @graph containers with @id", + "input": "expand-0099-in.jsonld", + "expect": "expand-0099-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0100", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @id, @set] container (multiple objects)", + "purpose": "Use of @graph containers with @id and @set", + "input": "expand-0100-in.jsonld", + "expect": "expand-0100-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0101", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Do not expand [@graph, @id] container if value is a graph (multiple objects)", + "purpose": "Does not create a new graph object if indexed value is already a graph object", + "input": "expand-0101-in.jsonld", + "expect": "expand-0101-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0102", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Do not expand @graph container if value is a graph (multiple objects)", + "purpose": "Does not create a new graph object if indexed value is already a graph object", + "input": "expand-0102-in.jsonld", + "expect": "expand-0102-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0103", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Do not expand @graph container if value is a graph (multiple graphs)", + "purpose": "Does not create a new graph object if indexed value is already a graph object", + "input": "expand-0103-in.jsonld", + "expect": "expand-0103-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0104", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Does not create an @graph container if value is a graph (mixed graph and object)", + "purpose": "Don't double-expand an already expanded graph", + "input": "expand-0104-in.jsonld", + "expect": "expand-0104-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0105", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Do not expand [@graph, @index] container if value is a graph (mixed graph and object)", + "purpose": "Does not create a new graph object if indexed value is already a graph object", + "input": "expand-0105-in.jsonld", + "expect": "expand-0105-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0106", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Do not expand [@graph, @id] container if value is a graph (mixed graph and object)", + "purpose": "Does not create a new graph object if indexed value is already a graph object", + "input": "expand-0106-in.jsonld", + "expect": "expand-0106-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0107", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @index] container (indexes with multiple objects)", + "purpose": "Use of @graph containers with @index", + "input": "expand-0107-in.jsonld", + "expect": "expand-0107-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#t0108", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "expand [@graph, @id] container (multiple ids and objects)", + "purpose": "Use of @graph containers with @id", + "input": "expand-0108-in.jsonld", + "expect": "expand-0108-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tc001", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -598,6 +842,54 @@ "input": "expand-c005-in.jsonld", "expect": "expand-c005-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc006", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "adding new term", + "purpose": "scoped context on @type", + "input": "expand-c006-in.jsonld", + "expect": "expand-c006-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc007", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "overriding a term", + "purpose": "scoped context on @type", + "input": "expand-c007-in.jsonld", + "expect": "expand-c007-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc008", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "alias of @type", + "purpose": "scoped context on @type", + "input": "expand-c008-in.jsonld", + "expect": "expand-c008-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc009", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "deep @context affects nested nodes", + "purpose": "scoped context on @type", + "input": "expand-c009-in.jsonld", + "expect": "expand-c009-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc010", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "scoped context layers on intemediate contexts", + "purpose": "scoped context on @type", + "input": "expand-c010-in.jsonld", + "expect": "expand-c010-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tc011", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "orders @type terms when applying scoped contexts", + "purpose": "scoped context on @type", + "input": "expand-c011-in.jsonld", + "expect": "expand-c011-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tm001", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -653,11 +945,11 @@ "purpose": "Expansion using @container: @type", "input": "expand-m007-in.jsonld", "expect": "expand-m007-out.jsonld", - "option": {"base": "http://example.org/", "processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tm008", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "adding new term", + "name": "When type is in a type map", "purpose": "scoped context on @type", "input": "expand-m008-in.jsonld", "expect": "expand-m008-out.jsonld", @@ -665,43 +957,67 @@ }, { "@id": "#tm009", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "overriding a term", - "purpose": "scoped context on @type", + "name": "language map with @none", + "purpose": "index on @language", "input": "expand-m009-in.jsonld", "expect": "expand-m009-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tm010", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "alias of @type", - "purpose": "scoped context on @type", + "name": "language map with alias of @none", + "purpose": "index on @language", "input": "expand-m010-in.jsonld", "expect": "expand-m010-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tm011", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "deep @context affects nested nodes", - "purpose": "scoped context on @type", + "name": "id map with @none", + "purpose": "index on @id", "input": "expand-m011-in.jsonld", "expect": "expand-m011-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tm012", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "scoped context layers on intemediate contexts", - "purpose": "scoped context on @type", + "name": "type map with alias of @none", + "purpose": "index on @type", "input": "expand-m012-in.jsonld", "expect": "expand-m012-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tm013", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "When type is in a type map", - "purpose": "scoped context on @type", + "name": "index map with @none", + "purpose": "index on @graph and @index", "input": "expand-m013-in.jsonld", "expect": "expand-m013-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm014", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "index map with alias @none", + "purpose": "index on @graph and @index", + "input": "expand-m014-in.jsonld", + "expect": "expand-m014-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm015", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "index map with alias @none", + "purpose": "index on @graph and @index", + "input": "expand-m015-in.jsonld", + "expect": "expand-m015-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tm016", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "index map with alias @none", + "purpose": "index on @graph and @index", + "input": "expand-m016-in.jsonld", + "expect": "expand-m016-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tn001", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -758,6 +1074,38 @@ "input": "expand-n007-in.jsonld", "expect": "expand-n007-out.jsonld", "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tp001", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "@version may be specified after first context", + "purpose": "If processing mode is not set through API, it is set by the first context containing @version.", + "option": {"specVersion": "json-ld-1.1"}, + "input": "expand-p001-in.jsonld", + "expect": "expand-p001-out.jsonld" + }, { + "@id": "#tp002", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "@version setting [1.0, 1.1, 1.0]", + "purpose": "If processing mode is not set through API, it is set by the first context containing @version.", + "option": {"specVersion": "json-ld-1.1"}, + "input": "expand-p002-in.jsonld", + "expect": "expand-p002-out.jsonld" + }, { + "@id": "#tp003", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "@version setting [1.1, 1.0]", + "purpose": "If processing mode is not set through API, it is set by the first context containing @version.", + "option": {"specVersion": "json-ld-1.1"}, + "input": "expand-p003-in.jsonld", + "expect": "expand-p003-out.jsonld" + }, { + "@id": "#tp004", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "@version setting [1.1, 1.0, 1.1]", + "purpose": "If processing mode is not set through API, it is set by the first context containing @version.", + "option": {"specVersion": "json-ld-1.1"}, + "input": "expand-p004-in.jsonld", + "expect": "expand-p004-out.jsonld" }, { "@id": "#tl001", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], diff --git a/ld/testdata/expand-p001-in.jsonld b/ld/testdata/expand-p001-in.jsonld new file mode 100644 index 0000000..5820b1c --- /dev/null +++ b/ld/testdata/expand-p001-in.jsonld @@ -0,0 +1,7 @@ +{ + "@context": [ + {"@vocab": "http://example/"}, + {"@version": 1.1, "a": {"@type": "@id"}} + ], + "a": "http://example.org/foo" +} \ No newline at end of file diff --git a/ld/testdata/expand-p001-out.jsonld b/ld/testdata/expand-p001-out.jsonld new file mode 100644 index 0000000..d6a85b7 --- /dev/null +++ b/ld/testdata/expand-p001-out.jsonld @@ -0,0 +1,3 @@ +[{ + "http://example/a": [{"@id": "http://example.org/foo"}] +}] \ No newline at end of file diff --git a/ld/testdata/expand-p002-in.jsonld b/ld/testdata/expand-p002-in.jsonld new file mode 100644 index 0000000..c221cf9 --- /dev/null +++ b/ld/testdata/expand-p002-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": [ + {"@vocab": "http://example/"}, + {"@version": 1.1, "a": {"@type": "@id"}}, + {"b": {"@type": "@id"}} + ], + "a": "http://example.org/foo", + "b": "http://example.org/bar" +} \ No newline at end of file diff --git a/ld/testdata/expand-p002-out.jsonld b/ld/testdata/expand-p002-out.jsonld new file mode 100644 index 0000000..e38a93b --- /dev/null +++ b/ld/testdata/expand-p002-out.jsonld @@ -0,0 +1,4 @@ +[{ + "http://example/a": [{"@id": "http://example.org/foo"}], + "http://example/b": [{"@id": "http://example.org/bar"}] +}] \ No newline at end of file diff --git a/ld/testdata/expand-p003-in.jsonld b/ld/testdata/expand-p003-in.jsonld new file mode 100644 index 0000000..e50ad3c --- /dev/null +++ b/ld/testdata/expand-p003-in.jsonld @@ -0,0 +1,8 @@ +{ + "@context": [ + {"@version": 1.1, "a": {"@id": "http://example/a", "@type": "@id"}}, + {"@vocab": "http://example/", "b": {"@type": "@id"}} + ], + "a": "http://example.org/foo", + "b": "http://example.org/bar" +} \ No newline at end of file diff --git a/ld/testdata/expand-p003-out.jsonld b/ld/testdata/expand-p003-out.jsonld new file mode 100644 index 0000000..e38a93b --- /dev/null +++ b/ld/testdata/expand-p003-out.jsonld @@ -0,0 +1,4 @@ +[{ + "http://example/a": [{"@id": "http://example.org/foo"}], + "http://example/b": [{"@id": "http://example.org/bar"}] +}] \ No newline at end of file diff --git a/ld/testdata/expand-p004-in.jsonld b/ld/testdata/expand-p004-in.jsonld new file mode 100644 index 0000000..f458dec --- /dev/null +++ b/ld/testdata/expand-p004-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": [ + {"@version": 1.1, "a": {"@id": "http://example/a", "@type": "@id"}}, + {"@vocab": "http://example/"}, + {"@version": 1.1, "b": {"@type": "@id"}} + ], + "a": "http://example.org/foo", + "b": "http://example.org/bar" +} \ No newline at end of file diff --git a/ld/testdata/expand-p004-out.jsonld b/ld/testdata/expand-p004-out.jsonld new file mode 100644 index 0000000..e38a93b --- /dev/null +++ b/ld/testdata/expand-p004-out.jsonld @@ -0,0 +1,4 @@ +[{ + "http://example/a": [{"@id": "http://example.org/foo"}], + "http://example/b": [{"@id": "http://example.org/bar"}] +}] \ No newline at end of file diff --git a/ld/testdata/frame-0047-out.jsonld b/ld/testdata/frame-0047-out.jsonld index 99a02ec..f89ccd9 100644 --- a/ld/testdata/frame-0047-out.jsonld +++ b/ld/testdata/frame-0047-out.jsonld @@ -5,10 +5,10 @@ "@type": "Class", "preserve": { "@id": "urn:gr-1", - "@graph": [{ + "@graph": { "@id": "urn:id-2", "term": "data" - }] + } } }] } \ No newline at end of file diff --git a/ld/testdata/frame-0048-out.jsonld b/ld/testdata/frame-0048-out.jsonld index a195d50..40280d9 100644 --- a/ld/testdata/frame-0048-out.jsonld +++ b/ld/testdata/frame-0048-out.jsonld @@ -9,10 +9,10 @@ }, "preserve": { "@id": "urn:graph-1", - "@graph": [{ + "@graph": { "@id": "urn:id-3", "term": "bar" - }] + } } }] } \ No newline at end of file diff --git a/ld/testdata/frame-0049-out.jsonld b/ld/testdata/frame-0049-out.jsonld index d73b524..cf2541e 100644 --- a/ld/testdata/frame-0049-out.jsonld +++ b/ld/testdata/frame-0049-out.jsonld @@ -11,10 +11,10 @@ "@id": "_:b0", "deep": { "@id": "_:b1", - "@graph": [{ + "@graph": { "@id": "urn:id-3", "term": "bar" - }] + } } } }] diff --git a/ld/testdata/frame-0050-out.jsonld b/ld/testdata/frame-0050-out.jsonld index da5aba7..206dbdb 100644 --- a/ld/testdata/frame-0050-out.jsonld +++ b/ld/testdata/frame-0050-out.jsonld @@ -7,20 +7,18 @@ "name": "Library", "contains": { "@id": "http://example.org/graphs/books", - "@graph": [ - { - "@id": "http://example.org/library/the-republic", - "@type": "Book", - "creator": "Plato", - "title": "The Republic", - "contains": { - "@id": "http://example.org/library/the-republic#introduction", - "@type": "Chapter", - "description": "An introductory chapter on The Republic.", - "title": "The Introduction" - } + "@graph": { + "@id": "http://example.org/library/the-republic", + "@type": "Book", + "creator": "Plato", + "title": "The Republic", + "contains": { + "@id": "http://example.org/library/the-republic#introduction", + "@type": "Chapter", + "description": "An introductory chapter on The Republic.", + "title": "The Introduction" } - ] + } } } ] diff --git a/ld/testdata/frame-g001-frame.jsonld b/ld/testdata/frame-g001-frame.jsonld new file mode 100644 index 0000000..16faf5b --- /dev/null +++ b/ld/testdata/frame-g001-frame.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@type": "ex:Library", + "ex:contains": { + "@type": "ex:Book", + "ex:contains": { + "@type": "ex:Chapter" + } + } +} \ No newline at end of file diff --git a/ld/testdata/frame-g001-in.jsonld b/ld/testdata/frame-g001-in.jsonld new file mode 100644 index 0000000..dcc2dfa --- /dev/null +++ b/ld/testdata/frame-g001-in.jsonld @@ -0,0 +1,27 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "ex:contains": {"@type": "@id"} + }, + "@graph": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": "http://example.org/test#book" + }, + { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book", + "ex:contains": "http://example.org/test#chapter" + }, + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One" + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g001-out.jsonld b/ld/testdata/frame-g001-out.jsonld new file mode 100644 index 0000000..5435695 --- /dev/null +++ b/ld/testdata/frame-g001-out.jsonld @@ -0,0 +1,20 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book", + "ex:contains": { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One" + } + } +} \ No newline at end of file diff --git a/ld/testdata/frame-g002-frame.jsonld b/ld/testdata/frame-g002-frame.jsonld new file mode 100644 index 0000000..5864ae8 --- /dev/null +++ b/ld/testdata/frame-g002-frame.jsonld @@ -0,0 +1,20 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@type": "ex:Library", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Book", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Chapter", + "@embed": "@always" + }, + "ex:bookmark": { + "@type": "ex:Chapter", + "@embed": "@always" + } + } +} \ No newline at end of file diff --git a/ld/testdata/frame-g002-in.jsonld b/ld/testdata/frame-g002-in.jsonld new file mode 100644 index 0000000..342c560 --- /dev/null +++ b/ld/testdata/frame-g002-in.jsonld @@ -0,0 +1,29 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "ex:contains": {"@type": "@id"}, + "ex:bookmark": {"@type": "@id"} + }, + "@graph": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": "http://example.org/test#book" + }, + { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book", + "ex:contains": "http://example.org/test#chapter", + "ex:bookmark": "http://example.org/test#chapter" + }, + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One" + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g002-out.jsonld b/ld/testdata/frame-g002-out.jsonld new file mode 100644 index 0000000..071b66e --- /dev/null +++ b/ld/testdata/frame-g002-out.jsonld @@ -0,0 +1,28 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@graph": [{ + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book", + "ex:contains": { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One" + }, + "ex:bookmark": { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One" + } + } + }] +} \ No newline at end of file diff --git a/ld/testdata/frame-g003-frame.jsonld b/ld/testdata/frame-g003-frame.jsonld new file mode 100644 index 0000000..8043b5b --- /dev/null +++ b/ld/testdata/frame-g003-frame.jsonld @@ -0,0 +1,20 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@type": "ex:Library", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Book", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Chapter", + "@embed": "@always" + }, + "ex:topic": { + "@type": "ex:Library", + "@embed": "@always" + } + } +} \ No newline at end of file diff --git a/ld/testdata/frame-g003-in.jsonld b/ld/testdata/frame-g003-in.jsonld new file mode 100644 index 0000000..f217964 --- /dev/null +++ b/ld/testdata/frame-g003-in.jsonld @@ -0,0 +1,29 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "ex:contains": {"@type": "@id"}, + "ex:topic": {"@type": "@id"} + }, + "@graph": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": "http://example.org/test#book" + }, + { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book about a library", + "ex:contains": "http://example.org/test#chapter", + "ex:topic": "http://example.org/test/#library" + }, + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One" + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g003-out.jsonld b/ld/testdata/frame-g003-out.jsonld new file mode 100644 index 0000000..635eeb4 --- /dev/null +++ b/ld/testdata/frame-g003-out.jsonld @@ -0,0 +1,25 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@graph": [{ + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book about a library", + "ex:contains": { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One" + }, + "ex:topic": { + "@id": "http://example.org/test/#library" + } + } + }] +} \ No newline at end of file diff --git a/ld/testdata/frame-g004-frame.jsonld b/ld/testdata/frame-g004-frame.jsonld new file mode 100644 index 0000000..44c813e --- /dev/null +++ b/ld/testdata/frame-g004-frame.jsonld @@ -0,0 +1,20 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@type": "ex:Library", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Book", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Chapter", + "@embed": "@always", + "ex:topic": { + "@type": "ex:Library", + "@embed": "@always" + } + } + } +} \ No newline at end of file diff --git a/ld/testdata/frame-g004-in.jsonld b/ld/testdata/frame-g004-in.jsonld new file mode 100644 index 0000000..3ca2b8b --- /dev/null +++ b/ld/testdata/frame-g004-in.jsonld @@ -0,0 +1,29 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "ex:contains": {"@type": "@id"}, + "ex:topic": {"@type": "@id"} + }, + "@graph": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": "http://example.org/test#book" + }, + { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book about a library", + "ex:contains": "http://example.org/test#chapter" + }, + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "ex:topic": "http://example.org/test/#library" + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g004-out.jsonld b/ld/testdata/frame-g004-out.jsonld new file mode 100644 index 0000000..34c91f8 --- /dev/null +++ b/ld/testdata/frame-g004-out.jsonld @@ -0,0 +1,25 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@graph": [{ + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book about a library", + "ex:contains": { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "ex:topic": { + "@id": "http://example.org/test/#library" + } + } + } + }] +} \ No newline at end of file diff --git a/ld/testdata/frame-g005-frame.jsonld b/ld/testdata/frame-g005-frame.jsonld new file mode 100644 index 0000000..7e58837 --- /dev/null +++ b/ld/testdata/frame-g005-frame.jsonld @@ -0,0 +1,21 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@type": "ex:Library", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Book", + "@omitDefault": "true", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Chapter", + "@embed": "@always", + "ex:topic": { + "@type": "ex:Library", + "@embed": "@always" + } + } + } +} \ No newline at end of file diff --git a/ld/testdata/frame-g005-in.jsonld b/ld/testdata/frame-g005-in.jsonld new file mode 100644 index 0000000..4627474 --- /dev/null +++ b/ld/testdata/frame-g005-in.jsonld @@ -0,0 +1,40 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "ex:contains": {"@type": "@id"}, + "ex:topic": {"@type": "@id"} + }, + "@graph": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:name": "My local library", + "ex:contains": "http://example.org/test#book" + }, + { + "@id": "http://example.org/test/#library2", + "@type": "ex:Library", + "ex:name": "Another library" + }, + { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book about a library", + "ex:contains": "http://example.org/test#chapter" + }, + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "ex:topic": { + "@set": [ + "http://example.org/test/#library", + "http://example.org/test/#library2" + ] + } + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g005-out.jsonld b/ld/testdata/frame-g005-out.jsonld new file mode 100644 index 0000000..e37cb1f --- /dev/null +++ b/ld/testdata/frame-g005-out.jsonld @@ -0,0 +1,38 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@graph": [{ + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:name": "My local library", + "ex:contains": { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book about a library", + "ex:contains": { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "ex:topic": [ + { + "@id": "http://example.org/test/#library" + }, + { + "@id": "http://example.org/test/#library2", + "@type": "ex:Library", + "ex:name": "Another library" + } + ] + } + } + }, + { + "@id": "http://example.org/test/#library2", + "@type": "ex:Library", + "ex:name": "Another library" + }] +} \ No newline at end of file diff --git a/ld/testdata/frame-g006-frame.jsonld b/ld/testdata/frame-g006-frame.jsonld new file mode 100644 index 0000000..91c19b4 --- /dev/null +++ b/ld/testdata/frame-g006-frame.jsonld @@ -0,0 +1,24 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@type": "ex:Town", + "@embed": "@always", + "ex:hasLibrary": { + "@type": "ex:Library", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Book", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Chapter", + "@embed": "@always", + "ex:topic": { + "@type": "ex:Library", + "@embed": "@always" + } + } + } + } +} \ No newline at end of file diff --git a/ld/testdata/frame-g006-in.jsonld b/ld/testdata/frame-g006-in.jsonld new file mode 100644 index 0000000..6e8f986 --- /dev/null +++ b/ld/testdata/frame-g006-in.jsonld @@ -0,0 +1,50 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "ex:contains": {"@type": "@id"}, + "ex:topic": {"@type": "@id"}, + "ex:hasLibrary": {"@type": "@id"} + }, + "@graph": [ + { + "@id": "http://example.org/town/#123", + "@type": "ex:Town", + "ex:name": "My town", + "ex:hasLibrary": [ + "http://example.org/test/#library", + "http://example.org/test/#library2" + ] + }, + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:name": "My local library", + "ex:contains": "http://example.org/test#book" + }, + { + "@id": "http://example.org/test/#library2", + "@type": "ex:Library", + "ex:name": "Another library" + }, + { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book about a library", + "ex:contains": "http://example.org/test#chapter" + }, + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "ex:topic": { + "@set": [ + "http://example.org/test/#library", + "http://example.org/test/#library2" + ] + } + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g006-out.jsonld b/ld/testdata/frame-g006-out.jsonld new file mode 100644 index 0000000..a3a45cc --- /dev/null +++ b/ld/testdata/frame-g006-out.jsonld @@ -0,0 +1,48 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@graph": [ + { + "@id": "http://example.org/town/#123", + "@type": "ex:Town", + "ex:name": "My town", + "ex:hasLibrary": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:name": "My local library", + "ex:contains": { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book about a library", + "ex:contains": { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "ex:topic": [ + { + "@id": "http://example.org/test/#library" + }, + { + "@id": "http://example.org/test/#library2", + "@type": "ex:Library", + "ex:name": "Another library" + } + ] + } + } + }, + { + "@id": "http://example.org/test/#library2", + "@type": "ex:Library", + "ex:contains": null, + "ex:name": "Another library" + } + ] + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g007-frame.jsonld b/ld/testdata/frame-g007-frame.jsonld new file mode 100644 index 0000000..56ece9b --- /dev/null +++ b/ld/testdata/frame-g007-frame.jsonld @@ -0,0 +1,24 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@type": "ex:Library", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Book", + "@embed": "@always", + "ex:bookmark": { + "@type": "ex:Chapter", + "@embed": "@always" + }, + "ex:contains": { + "@type": "ex:Chapter", + "@embed": "@always", + "ex:topic" : { + "@type": "ex:Topic", + "@embed": "@always" + } + } + } +} \ No newline at end of file diff --git a/ld/testdata/frame-g007-in.jsonld b/ld/testdata/frame-g007-in.jsonld new file mode 100644 index 0000000..fc7a766 --- /dev/null +++ b/ld/testdata/frame-g007-in.jsonld @@ -0,0 +1,73 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "ex:contains": {"@type": "@id"}, + "ex:bookmark": {"@type": "@id"}, + "ex:topic": {"@type": "@id"} + }, + "@graph": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": "http://example.org/test#book" + }, + { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book", + "ex:contains": [ + "http://example.org/test#chapter", + "http://example.org/test#chapter2" + ], + "ex:bookmark": "http://example.org/test#chapter" + }, + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "ex:topic": [ + "http://example.org/test#subject1", + "http://example.org/test#subject2", + "http://example.org/test#subject3" + ] + }, + { + "@id": "http://example.org/test#chapter2", + "@type": "ex:Chapter", + "dc:description": "More Fun", + "dc:title": "Chapter Two", + "ex:topic": [ + "http://example.org/test#subject1", + "http://example.org/test#subject4", + "http://example.org/test#subject5" + ] + }, + { + "@id": "http://example.org/test#subject1", + "@type": "ex:Topic", + "dc:description": "Topic 1" + }, + { + "@id": "http://example.org/test#subject2", + "@type": "ex:Topic", + "dc:description": "Topic 2" + }, + { + "@id": "http://example.org/test#subject3", + "@type": "ex:Topic", + "dc:description": "Topic 3" + }, + { + "@id": "http://example.org/test#subject4", + "@type": "ex:Topic", + "dc:description": "Topic 4" + }, + { + "@id": "http://example.org/test#subject5", + "@type": "ex:Topic", + "dc:description": "Topic 5" + }] +} \ No newline at end of file diff --git a/ld/testdata/frame-g007-out.jsonld b/ld/testdata/frame-g007-out.jsonld new file mode 100644 index 0000000..52d0cac --- /dev/null +++ b/ld/testdata/frame-g007-out.jsonld @@ -0,0 +1,89 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#" + }, + "@graph": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book", + "ex:contains": [ + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "ex:topic": [ + { + "@id": "http://example.org/test#subject1", + "@type": "ex:Topic", + "dc:description": "Topic 1" + }, + { + "@id": "http://example.org/test#subject2", + "@type": "ex:Topic", + "dc:description": "Topic 2" + }, + { + "@id": "http://example.org/test#subject3", + "@type": "ex:Topic", + "dc:description": "Topic 3" + } + ] + }, + { + "@id": "http://example.org/test#chapter2", + "@type": "ex:Chapter", + "dc:description": "More Fun", + "dc:title": "Chapter Two", + "ex:topic": [ + { + "@id": "http://example.org/test#subject1", + "@type": "ex:Topic", + "dc:description": "Topic 1" + }, + { + "@id": "http://example.org/test#subject4", + "@type": "ex:Topic", + "dc:description": "Topic 4" + }, + { + "@id": "http://example.org/test#subject5", + "@type": "ex:Topic", + "dc:description": "Topic 5" + } + ] + } + ], + "ex:bookmark": { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "ex:topic": [ + { + "@id": "http://example.org/test#subject1", + "@type": "ex:Topic", + "dc:description": "Topic 1" + }, + { + "@id": "http://example.org/test#subject2", + "@type": "ex:Topic", + "dc:description": "Topic 2" + }, + { + "@id": "http://example.org/test#subject3", + "@type": "ex:Topic", + "dc:description": "Topic 3" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g008-frame.jsonld b/ld/testdata/frame-g008-frame.jsonld new file mode 100644 index 0000000..d1fa665 --- /dev/null +++ b/ld/testdata/frame-g008-frame.jsonld @@ -0,0 +1,35 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "ex:relatesTo": {"@type": "@id"} + }, + "@type": "ex:Library", + "@embed": "@always", + "ex:contains": { + "@type": "ex:Book", + "@embed": "@always", + "ex:bookmark": { + "@type": "ex:Chapter", + "@embed": "@always" + }, + "ex:contains": { + "@type": "ex:Chapter", + "@embed": "@always", + "dc:subject": { + "@omitDefault": "true", + "@embed": "@always", + "@type": "ex:Library" + }, + "ex:topic" : { + "@type": "ex:Topic", + "@embed": "@always", + "ex:relatesTo" : { + "@omitDefault": "true", + "@embed": "@always", + "@type": "ex:Library" + } + } + } + } +} \ No newline at end of file diff --git a/ld/testdata/frame-g008-in.jsonld b/ld/testdata/frame-g008-in.jsonld new file mode 100644 index 0000000..9d4cca9 --- /dev/null +++ b/ld/testdata/frame-g008-in.jsonld @@ -0,0 +1,77 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "dc:subject": {"@type": "@id"}, + "ex:contains": {"@type": "@id"}, + "ex:bookmark": {"@type": "@id"}, + "ex:topic": {"@type": "@id"}, + "ex:relatesTo": {"@type": "@id"} + }, + "@graph": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": "http://example.org/test#book" + }, + { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book", + "ex:contains": [ + "http://example.org/test#chapter", + "http://example.org/test#chapter2" + ], + "ex:bookmark": "http://example.org/test#chapter" + }, + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "dc:subject": "http://example.org/test/#library", + "ex:topic": [ + "http://example.org/test#subject1", + "http://example.org/test#subject2", + "http://example.org/test#subject3" + ] + }, + { + "@id": "http://example.org/test#chapter2", + "@type": "ex:Chapter", + "dc:description": "More Fun", + "dc:title": "Chapter Two", + "ex:topic": [ + "http://example.org/test#subject1", + "http://example.org/test#subject4", + "http://example.org/test#subject5" + ] + }, + { + "@id": "http://example.org/test#subject1", + "@type": "ex:Topic", + "dc:description": "Topic 1", + "ex:relatesTo": "http://example.org/test/#library" + }, + { + "@id": "http://example.org/test#subject2", + "@type": "ex:Topic", + "dc:description": "Topic 2" + }, + { + "@id": "http://example.org/test#subject3", + "@type": "ex:Topic", + "dc:description": "Topic 3" + }, + { + "@id": "http://example.org/test#subject4", + "@type": "ex:Topic", + "dc:description": "Topic 4" + }, + { + "@id": "http://example.org/test#subject5", + "@type": "ex:Topic", + "dc:description": "Topic 5" + }] +} \ No newline at end of file diff --git a/ld/testdata/frame-g008-out.jsonld b/ld/testdata/frame-g008-out.jsonld new file mode 100644 index 0000000..9cb477f --- /dev/null +++ b/ld/testdata/frame-g008-out.jsonld @@ -0,0 +1,95 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "ex": "http://example.org/vocab#", + "ex:relatesTo": {"@type": "@id"} + }, + "@graph": [ + { + "@id": "http://example.org/test/#library", + "@type": "ex:Library", + "ex:contains": { + "@id": "http://example.org/test#book", + "@type": "ex:Book", + "dc:contributor": "Writer", + "dc:title": "My Book", + "ex:contains": [ + { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "dc:subject": {"@id": "http://example.org/test/#library"}, + "ex:topic": [ + { + "@id": "http://example.org/test#subject1", + "@type": "ex:Topic", + "dc:description": "Topic 1", + "ex:relatesTo": "http://example.org/test/#library" + }, + { + "@id": "http://example.org/test#subject2", + "@type": "ex:Topic", + "dc:description": "Topic 2" + }, + { + "@id": "http://example.org/test#subject3", + "@type": "ex:Topic", + "dc:description": "Topic 3" + } + ] + }, + { + "@id": "http://example.org/test#chapter2", + "@type": "ex:Chapter", + "dc:description": "More Fun", + "dc:title": "Chapter Two", + "ex:topic": [ + { + "@id": "http://example.org/test#subject1", + "@type": "ex:Topic", + "dc:description": "Topic 1", + "ex:relatesTo": "http://example.org/test/#library" + }, + { + "@id": "http://example.org/test#subject4", + "@type": "ex:Topic", + "dc:description": "Topic 4" + }, + { + "@id": "http://example.org/test#subject5", + "@type": "ex:Topic", + "dc:description": "Topic 5" + } + ] + } + ], + "ex:bookmark": { + "@id": "http://example.org/test#chapter", + "@type": "ex:Chapter", + "dc:description": "Fun", + "dc:title": "Chapter One", + "dc:subject": {"@id": "http://example.org/test/#library"}, + "ex:topic": [ + { + "@id": "http://example.org/test#subject1", + "@type": "ex:Topic", + "dc:description": "Topic 1", + "ex:relatesTo": "http://example.org/test/#library" + }, + { + "@id": "http://example.org/test#subject2", + "@type": "ex:Topic", + "dc:description": "Topic 2" + }, + { + "@id": "http://example.org/test#subject3", + "@type": "ex:Topic", + "dc:description": "Topic 3" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g009-frame.jsonld b/ld/testdata/frame-g009-frame.jsonld new file mode 100644 index 0000000..dfc4fd6 --- /dev/null +++ b/ld/testdata/frame-g009-frame.jsonld @@ -0,0 +1,15 @@ +{ + "@context": { + "ex": "http://example.com/", + "embed": { + "@id": "ex:embed", + "@container": "@set" + }, + "shouldExist": "ex:shouldExist" + }, + "@type": "http://example.com/TreeRoot", + "@embed": "@always", + "embed": { + "@embed": "@always" + } +} diff --git a/ld/testdata/frame-g009-in.jsonld b/ld/testdata/frame-g009-in.jsonld new file mode 100644 index 0000000..08d32ae --- /dev/null +++ b/ld/testdata/frame-g009-in.jsonld @@ -0,0 +1,52 @@ +{ + "@context": { + "ex": "http://example.com/", + "embed": { + "@id": "ex:embed", + "@container": "@set" + }, + "shouldExist": "ex:shouldExist" + }, + "@graph": [ + { + "@id": "ex:root", + "@type": "ex:TreeRoot", + "embed": [ + { + "@id": "ex:node-d1-with-leaf" + }, + { + "@id": "ex:node-d1-with-node" + } + ] + }, + { + "@id": "ex:node-d1-with-leaf", + "embed": [ + { + "@id": "ex:leaf" + } + ] + }, + { + "@id": "ex:node-d1-with-node", + "embed": [ + { + "@id": "ex:node-d2-with-leaf" + } + ] + }, + { + "@id": "ex:node-d2-with-leaf", + "embed": [ + { + "@id": "ex:leaf" + } + ] + }, + { + "@id": "ex:leaf", + "shouldExist": "shows when embedded" + } + ] +} diff --git a/ld/testdata/frame-g009-out.jsonld b/ld/testdata/frame-g009-out.jsonld new file mode 100644 index 0000000..86b10d5 --- /dev/null +++ b/ld/testdata/frame-g009-out.jsonld @@ -0,0 +1,41 @@ +{ + "@context": { + "ex": "http://example.com/", + "embed": { + "@id": "ex:embed", + "@container": "@set" + }, + "shouldExist": "ex:shouldExist" + }, + "@graph": [ + { + "@id": "ex:root", + "@type": "ex:TreeRoot", + "embed": [ + { + "@id": "ex:node-d1-with-leaf", + "embed": [ + { + "@id": "ex:leaf", + "shouldExist": "shows when embedded" + } + ] + }, + { + "@id": "ex:node-d1-with-node", + "embed": [ + { + "@id": "ex:node-d2-with-leaf", + "embed": [ + { + "@id": "ex:leaf", + "shouldExist": "shows when embedded" + } + ] + } + ] + } + ] + } + ] +} diff --git a/ld/testdata/frame-g010-frame.jsonld b/ld/testdata/frame-g010-frame.jsonld new file mode 100644 index 0000000..5d4545c --- /dev/null +++ b/ld/testdata/frame-g010-frame.jsonld @@ -0,0 +1,31 @@ +{ + "@context": { + "@vocab": "http://example.com/", + "loves": { + "@type": "@id" + }, + "unionOf": { + "@type": "@id", + "@id": "owl:unionOf", + "@container": "@list" + }, + "Class": "owl:Class" + }, + "@graph": [ + { + "@explicit": false, + "@embed": "@last", + "@type": [ + "Act", + "Class" + ], + "@graph": [{ + "@explicit": true, + "@embed": "@always", + "@type": "Person", + "@id": {}, + "loves": {"@embed": "@never"} + }] + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g010-in.jsonld b/ld/testdata/frame-g010-in.jsonld new file mode 100644 index 0000000..9947af3 --- /dev/null +++ b/ld/testdata/frame-g010-in.jsonld @@ -0,0 +1,61 @@ +{ + "@context": { + "@vocab": "http://example.com/", + "loves": { + "@type": "@id" + }, + "unionOf": { + "@type": "@id", + "@id": "owl:unionOf", + "@container": "@list" + }, + "Class": "owl:Class" + }, + "@graph": [ + { + "@type": "Act", + "@graph": [ + { + "@id": "Romeo", + "@type": "Person" + }, + { + "@id": "Juliet", + "@type": "Person" + } + ] + }, + { + "@id": "ActTwo", + "@type": "Act", + "@graph": [ + { + "@id": "Romeo", + "@type": "Person", + "loves": "Juliet" + }, + { + "@id": "Juliet", + "@type": "Person", + "loves": "Romeo" + } + ] + }, + { + "@id": "Person", + "@type": "Class", + "unionOf": { + "@list": [ + { + "@id": "Montague", + "@type": "Class" + }, + { + "@id": "Capulet", + "@type": "Class" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/ld/testdata/frame-g010-out.jsonld b/ld/testdata/frame-g010-out.jsonld new file mode 100644 index 0000000..fcffb9a --- /dev/null +++ b/ld/testdata/frame-g010-out.jsonld @@ -0,0 +1,69 @@ +{ + "@context": { + "@vocab": "http://example.com/", + "loves": { + "@type": "@id" + }, + "unionOf": { + "@type": "@id", + "@id": "owl:unionOf", + "@container": "@list" + }, + "Class": "owl:Class" + }, + "@graph": [ + { + "@graph": [ + { + "@id": "Juliet", + "@type": "Person", + "loves": "Romeo" + }, + { + "@id": "Romeo", + "@type": "Person", + "loves": "Juliet" + } + ], + "@id": "ActTwo", + "@type": "Act" + }, + { + "@id": "Capulet", + "@type": "Class" + }, + { + "@id": "Montague", + "@type": "Class" + }, + { + "@id": "Person", + "@type": "Class", + "unionOf": [ + { + "@id": "Montague", + "@type": "Class" + }, + { + "@id": "Capulet", + "@type": "Class" + } + ] + }, + { + "@graph": [ + { + "@id": "Juliet", + "@type": "Person", + "loves": null + }, + { + "@id": "Romeo", + "@type": "Person", + "loves": null + } + ], + "@type": "Act" + } + ] +} diff --git a/ld/testdata/frame-manifest.jsonld b/ld/testdata/frame-manifest.jsonld index 404bf5e..47677df 100644 --- a/ld/testdata/frame-manifest.jsonld +++ b/ld/testdata/frame-manifest.jsonld @@ -86,7 +86,7 @@ "input": "frame-0010-in.jsonld", "frame": "frame-0010-frame.jsonld", "expect": "frame-0010-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": false} + "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"} }, { "@id": "#t0011", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], @@ -167,7 +167,7 @@ "input": "frame-0020-in.jsonld", "frame": "frame-0020-frame.jsonld", "expect": "frame-0020-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": false} + "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"} }, { "@id": "#t0021", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], @@ -176,7 +176,7 @@ "input": "frame-0021-in.jsonld", "frame": "frame-0021-frame.jsonld", "expect": "frame-0021-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": false} + "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"} }, { "@id": "#t0022", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], @@ -400,7 +400,7 @@ "input": "frame-0046-in.jsonld", "frame": "frame-0046-frame.jsonld", "expect": "frame-0046-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": false, "specVersion": "json-ld-1.1"} + "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"} }, { "@id": "#t0047", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], @@ -424,11 +424,10 @@ "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], "name": "Merge one graph and deep preserve another", "purpose": "@graph used within a property value frames embedded values from a named graph.", - "option": {"specVersion": "json-ld-1.1"}, "input": "frame-0049-in.jsonld", "frame": "frame-0049-frame.jsonld", "expect": "frame-0049-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": false, "specVersion": "json-ld-1.1"} + "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"} }, { "@id": "#t0050", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], @@ -442,11 +441,102 @@ "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], "name": "Compacting values of @preserve", "purpose": "When compacting the value of a property using @preserve, use the term definition for term to properly compact the value of @preserve.", - "option": {"specVersion": "json-ld-1.1"}, + "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.1"}, "input": "frame-0051-in.jsonld", "frame": "frame-0051-frame.jsonld", "expect": "frame-0051-out.jsonld" }, { + "@id": "#tg001", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Library framing example with @graph and omitGraph is true.", + "purpose": "Basic example used in playground and spec examples.", + "input": "frame-g001-in.jsonld", + "frame": "frame-g001-frame.jsonld", + "expect": "frame-g001-out.jsonld", + "option": {"specVersion": "json-ld-1.1", "omitGraph": true} + }, { + "@id": "#tg002", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Simple embed", + "purpose": "Test embedded graphs", + "input": "frame-g002-in.jsonld", + "frame": "frame-g002-frame.jsonld", + "expect": "frame-g002-out.jsonld", + "option": {"specVersion": "json-ld-1.1"} + }, { + "@id": "#tg003", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Embed with direct circular reference", + "purpose": "Test embedded graphs", + "input": "frame-g003-in.jsonld", + "frame": "frame-g003-frame.jsonld", + "expect": "frame-g003-out.jsonld", + "option": {"specVersion": "json-ld-1.1"} + }, { + "@id": "#tg004", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Embed with indirect circular reference", + "purpose": "Test embedded graphs", + "input": "frame-g004-in.jsonld", + "frame": "frame-g004-frame.jsonld", + "expect": "frame-g004-out.jsonld", + "option": {"specVersion": "json-ld-1.1"} + }, { + "@id": "#tg005", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Embed with indirect circular reference via set", + "purpose": "Test embedded graphs", + "input": "frame-g005-in.jsonld", + "frame": "frame-g005-frame.jsonld", + "expect": "frame-g005-out.jsonld", + "option": {"specVersion": "json-ld-1.1"} + }, { + "@id": "#tg006", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Embed with nested indirect circular reference via set", + "purpose": "Test embedded graphs", + "input": "frame-g006-in.jsonld", + "frame": "frame-g006-frame.jsonld", + "expect": "frame-g006-out.jsonld", + "option": {"specVersion": "json-ld-1.1"} + }, { + "@id": "#tg007", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Multi-level simple embeds", + "purpose": "Test embedded graphs", + "input": "frame-g007-in.jsonld", + "frame": "frame-g007-frame.jsonld", + "expect": "frame-g007-out.jsonld", + "option": {"specVersion": "json-ld-1.1"} + }, { + "@id": "#tg008", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "A tangle of nastiness", + "purpose": "Test embedded graphs", + "input": "frame-g008-in.jsonld", + "frame": "frame-g008-frame.jsonld", + "expect": "frame-g008-out.jsonld", + "option": {"specVersion": "json-ld-1.1"} + },{ + "@id": "#tg009", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Recursive property embed w/o circular reference", + "purpose": "Test embedded graphs", + "input": "frame-g009-in.jsonld", + "frame": "frame-g009-frame.jsonld", + "expect": "frame-g009-out.jsonld", + "option": {"specVersion": "json-ld-1.1"} + },{ + "@id": "#tg010", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Multiple named graphs", + "purpose": "Test embedded graphs", + "input": "frame-g010-in.jsonld", + "frame": "frame-g010-frame.jsonld", + "expect": "frame-g010-out.jsonld", + "option": {"specVersion": "json-ld-1.1"} + }, + { "@id": "#tp010", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], "name": "property CURIE conflict (prune bnodes)", @@ -454,7 +544,7 @@ "input": "frame-0010-in.jsonld", "frame": "frame-0010-frame.jsonld", "expect": "frame-p010-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": true, "specVersion": "json-ld-1.1"} + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tp020", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], @@ -463,7 +553,7 @@ "input": "frame-0020-in.jsonld", "frame": "frame-0020-frame.jsonld", "expect": "frame-p020-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": true, "specVersion": "json-ld-1.1"} + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tp021", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], @@ -472,7 +562,7 @@ "input": "frame-0021-in.jsonld", "frame": "frame-0021-frame.jsonld", "expect": "frame-p021-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": true, "specVersion": "json-ld-1.1"} + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tp046", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], @@ -481,7 +571,7 @@ "input": "frame-0046-in.jsonld", "frame": "frame-0046-frame.jsonld", "expect": "frame-p046-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": true, "specVersion": "json-ld-1.1"} + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} }, { "@id": "#tp049", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], @@ -490,7 +580,16 @@ "input": "frame-0049-in.jsonld", "frame": "frame-0049-frame.jsonld", "expect": "frame-p049-out.jsonld", - "option": {"pruneBlankNodeIdentifiers": true, "specVersion": "json-ld-1.1"} + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} + }, { + "@id": "#tp050", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Prune blank nodes with alias of @id", + "purpose": "If @id is aliased in a frame, an unreferenced blank node is still pruned.", + "input": "frame-p050-in.jsonld", + "frame": "frame-p050-frame.jsonld", + "expect": "frame-p050-out.jsonld", + "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"} } ] } diff --git a/ld/testdata/frame-p049-out.jsonld b/ld/testdata/frame-p049-out.jsonld index e33d34c..e77fff2 100644 --- a/ld/testdata/frame-p049-out.jsonld +++ b/ld/testdata/frame-p049-out.jsonld @@ -9,10 +9,10 @@ }, "preserve": { "deep": { - "@graph": [{ + "@graph": { "@id": "urn:id-3", "term": "bar" - }] + } } } }] diff --git a/ld/testdata/frame-p050-frame.jsonld b/ld/testdata/frame-p050-frame.jsonld new file mode 100644 index 0000000..b0e6c19 --- /dev/null +++ b/ld/testdata/frame-p050-frame.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "id": "@id" + }, + "id": {}, + "name": {} +} diff --git a/ld/testdata/frame-p050-in.jsonld b/ld/testdata/frame-p050-in.jsonld new file mode 100644 index 0000000..91961fa --- /dev/null +++ b/ld/testdata/frame-p050-in.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "id": "@id" + }, + "id": "_:bnode0", + "name": "foo" +} diff --git a/ld/testdata/frame-p050-out.jsonld b/ld/testdata/frame-p050-out.jsonld new file mode 100644 index 0000000..ebbf901 --- /dev/null +++ b/ld/testdata/frame-p050-out.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "id": "@id" + }, + "@graph": [{"name": "foo"}] +} \ No newline at end of file diff --git a/ld/testdata/fromRdf-0023-in.nq b/ld/testdata/fromRdf-0023-in.nq new file mode 100644 index 0000000..aa54881 --- /dev/null +++ b/ld/testdata/fromRdf-0023-in.nq @@ -0,0 +1 @@ + . diff --git a/ld/testdata/fromRdf-0023-out.jsonld b/ld/testdata/fromRdf-0023-out.jsonld new file mode 100644 index 0000000..3ecb939 --- /dev/null +++ b/ld/testdata/fromRdf-0023-out.jsonld @@ -0,0 +1,10 @@ +[ + { + "@id": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil", + "http://example.com/foo": [ + { + "@id": "http://example.com/bar" + } + ] + } +] diff --git a/ld/testdata/fromRdf-manifest.jsonld b/ld/testdata/fromRdf-manifest.jsonld index 7a603f8..ced63a3 100644 --- a/ld/testdata/fromRdf-manifest.jsonld +++ b/ld/testdata/fromRdf-manifest.jsonld @@ -166,6 +166,13 @@ "purpose": "Duplicate triples for a list node will not prevent @list from being properly generated", "input": "fromRdf-0022-in.nq", "expect": "fromRdf-0022-out.jsonld" + }, { + "@id": "#t0023", + "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], + "name": "triple with RDF nil subject", + "purpose": "Test triple with RDF nil subject", + "input": "fromRdf-0023-in.nq", + "expect": "fromRdf-0023-out.jsonld" } ] } diff --git a/ld/testdata/test059-in.nq b/ld/testdata/test059-in.nq new file mode 100644 index 0000000..bbcce7e --- /dev/null +++ b/ld/testdata/test059-in.nq @@ -0,0 +1,8 @@ + . +_:s _:o _:g . +_:s_ _:o_ _:g_ . +_:s_s _:o_o _:g_g . +_:s0 _:o0 _:g0 . +_:0s _:0o _:0g . +_:s-0 _:o-0 _:g-0 . +_:_ . diff --git a/ld/testdata/test059-urdna2015.nq b/ld/testdata/test059-urdna2015.nq new file mode 100644 index 0000000..81ae867 --- /dev/null +++ b/ld/testdata/test059-urdna2015.nq @@ -0,0 +1,8 @@ + . +_:c14n0 . +_:c14n1 _:c14n3 _:c14n2 . +_:c14n10 _:c14n12 _:c14n11 . +_:c14n13 _:c14n15 _:c14n14 . +_:c14n16 _:c14n18 _:c14n17 . +_:c14n4 _:c14n6 _:c14n5 . +_:c14n7 _:c14n9 _:c14n8 . diff --git a/ld/testdata/urdna2015-manifest.jsonld b/ld/testdata/urdna2015-manifest.jsonld index 1966a98..1e2dcc6 100644 --- a/ld/testdata/urdna2015-manifest.jsonld +++ b/ld/testdata/urdna2015-manifest.jsonld @@ -555,6 +555,15 @@ "approval": "rdft:Proposed", "action": "test058-in.nq", "result": "test058-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test059", + "type": "rdfn:Urdna2015EvalTest", + "name": "n-quads parsing", + "comment": null, + "approval": "rdft:Proposed", + "action": "test059-in.nq", + "result": "test059-urdna2015.nq" } ] }