diff --git a/graph/formats/rdf/LICENSE.md b/graph/formats/rdf/LICENSE.md index 18aee556..9ddabcbe 100644 --- a/graph/formats/rdf/LICENSE.md +++ b/graph/formats/rdf/LICENSE.md @@ -1,9 +1,10 @@ Test suite license -This document refers to nquad_tests.tar.gz and ntriple_tests.tar.gz. The original files can be obtained here: +This document refers to nquad_tests.tar.gz, ntriple_tests.tar.gz and normalization tests in testdata. The original files can be obtained here: - [nquad_tests.tar.gz](https://w3c.github.io/rdf-tests/nquads/TESTS.tar.gz) - [ntriple_tests.tar.gz](https://w3c.github.io/rdf-tests/ntriples/TESTS.tar.gz) +- [normalization tests](https://json-ld.github.io/rdf-dataset-canonicalization/). Distributed under both the [W3C Test Suite License](https://www.w3.org/Consortium/Legal/2008/04-testsuite-license) and the [W3C 3-clause BSD License](https://www.w3.org/Consortium/Legal/2008/03-bsd-license). To contribute to a W3C Test Suite, see the [policies and contribution forms](href="https://www.w3.org/2004/10/27-testcases"). diff --git a/graph/formats/rdf/testdata/index.html b/graph/formats/rdf/testdata/index.html new file mode 100644 index 00000000..f24a2ce7 --- /dev/null +++ b/graph/formats/rdf/testdata/index.html @@ -0,0 +1,3124 @@ + + + + + + + + + RDF Dataset Normalization Test Cases + + + + +

+ + W3C + +

+

RDF Dataset Normalization Test Cases

+

Includes manifests for different application profiles.

+

This page describes RDF Dataset Normalization tests for URGNA2012 and URDNA2015 profiles. These tests are also described in JSON-LD and Turtle formats for convenience. The manifest vocabulary is described in the RDF Dataset Normalization Test Vocabulary (JSON-LD, Turtle) and is based on the RDF Test Vocabulary.

+

General instructions for running the RDF Dataset Normalization Test suites

+

FIXME

+

Contributing Tests

+

The test manifests and entries are built automatically from manifest.csv using mk_manifest.rb, where each row defines a combination of RDF, JSON and Validation tests for the same action and implicit files. Tests may be contributed via pull request to https://github.com/json-ld/normalization with suitable changes to the manifest.csv and necessary action and result files. Tests will also be considered if a contribution is sent to public-credentials@w3.org.

+

Distribution

+

Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License. To contribute to a W3C Test Suite, see the policies and contribution forms.

+

Disclaimer

+

UNDER BOTH MUTUALLY EXCLUSIVE LICENSES, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED “AS IS,” AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

+
+

Contents

+
    +
  1. + RDF Graph Normalization (URGNA2012) + – 59 entries +
  2. +
  3. + RDF Dataset Normalization (URDNA2015) + – 62 entries +
  4. +
+
+
+

RDF Graph Normalization (URGNA2012) (59 entries)

+

Tests the 2012 version of RDF Graph Normalization.

+

+ Instructions specific to running URGNA2012 tests. +

+
+
+ + manifest-urgna2012#test001: + + simple id +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test001-in.nq +
+
result
+
+ test001-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test002: + + duplicate property iri values +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test002-in.nq +
+
result
+
+ test002-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test003: + + bnode +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test003-in.nq +
+
result
+
+ test003-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test004: + + bnode plus embed w/subject +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test004-in.nq +
+
result
+
+ test004-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test005: + + bnode embed +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test005-in.nq +
+
result
+
+ test005-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test006: + + multiple rdf types +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test006-in.nq +
+
result
+
+ test006-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test007: + + coerce CURIE value +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test007-in.nq +
+
result
+
+ test007-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test008: + + single subject complex +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test008-in.nq +
+
result
+
+ test008-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test009: + + multiple subjects - complex +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test009-in.nq +
+
result
+
+ test009-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test010: + + type +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test010-in.nq +
+
result
+
+ test010-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test011: + + type-coerced type +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test011-in.nq +
+
result
+
+ test011-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test012: + + type-coerced type, remove duplicate reference +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test012-in.nq +
+
result
+
+ test012-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test013: + + type-coerced type, cycle +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test013-in.nq +
+
result
+
+ test013-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test014: + + check types +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test014-in.nq +
+
result
+
+ test014-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test015: + + top level context +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test015-in.nq +
+
result
+
+ test015-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test016: + + blank node - dual link - embed +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test016-in.nq +
+
result
+
+ test016-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test017: + + blank node - dual link - non-embed +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test017-in.nq +
+
result
+
+ test017-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test018: + + blank node - self link +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test018-in.nq +
+
result
+
+ test018-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test019: + + blank node - disjoint self links +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test019-in.nq +
+
result
+
+ test019-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test020: + + blank node - diamond +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test020-in.nq +
+
result
+
+ test020-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test021: + + blank node - circle of 2 +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test021-in.nq +
+
result
+
+ test021-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test022: + + blank node - double circle of 2 +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test022-in.nq +
+
result
+
+ test022-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test023: + + blank node - circle of 3 +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test023-in.nq +
+
result
+
+ test023-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test024: + + blank node - double circle of 3 (1-2-3) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test024-in.nq +
+
result
+
+ test024-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test025: + + blank node - double circle of 3 (1-3-2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test025-in.nq +
+
result
+
+ test025-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test026: + + blank node - double circle of 3 (2-1-3) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test026-in.nq +
+
result
+
+ test026-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test027: + + blank node - double circle of 3 (2-3-1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test027-in.nq +
+
result
+
+ test027-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test028: + + blank node - double circle of 3 (3-2-1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test028-in.nq +
+
result
+
+ test028-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test029: + + blank node - double circle of 3 (3-1-2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test029-in.nq +
+
result
+
+ test029-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test030: + + blank node - point at circle of 3 +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test030-in.nq +
+
result
+
+ test030-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test031: + + bnode (1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test031-in.nq +
+
result
+
+ test031-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test032: + + bnode (2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test032-in.nq +
+
result
+
+ test032-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test033: + + disjoint identical subgraphs (1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test033-in.nq +
+
result
+
+ test033-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test034: + + disjoint identical subgraphs (2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test034-in.nq +
+
result
+
+ test034-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test035: + + reordered w/strings (1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test035-in.nq +
+
result
+
+ test035-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test036: + + reordered w/strings (2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test036-in.nq +
+
result
+
+ test036-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test037: + + reordered w/strings (3) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test037-in.nq +
+
result
+
+ test037-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test038: + + reordered 4 bnodes, reordered 2 properties (1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test038-in.nq +
+
result
+
+ test038-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test039: + + reordered 4 bnodes, reordered 2 properties (2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test039-in.nq +
+
result
+
+ test039-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test040: + + reordered 6 bnodes (1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test040-in.nq +
+
result
+
+ test040-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test041: + + reordered 6 bnodes (2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test041-in.nq +
+
result
+
+ test041-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test042: + + reordered 6 bnodes (3) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test042-in.nq +
+
result
+
+ test042-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test043: + + literal with language +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test043-in.nq +
+
result
+
+ test043-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test044: + + evil (1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test044-in.nq +
+
result
+
+ test044-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test045: + + evil (2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test045-in.nq +
+
result
+
+ test045-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test046: + + evil (3) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test046-in.nq +
+
result
+
+ test046-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test047: + + deep diff (1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test047-in.nq +
+
result
+
+ test047-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test048: + + deep diff (2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test048-in.nq +
+
result
+
+ test048-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test049: + + remove null +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test049-in.nq +
+
result
+
+ test049-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test050: + + nulls +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test050-in.nq +
+
result
+
+ test050-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test051: + + merging subjects +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test051-in.nq +
+
result
+
+ test051-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test052: + + alias keywords +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test052-in.nq +
+
result
+
+ test052-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test053: + + @list +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test053-in.nq +
+
result
+
+ test053-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test054: + + t-graph +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test054-in.nq +
+
result
+
+ test054-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test055: + + simple reorder (1) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test055-in.nq +
+
result
+
+ test055-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test056: + + simple reorder (2) +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test056-in.nq +
+
result
+
+ test056-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test060: + + n-quads escaping +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test060-in.nq +
+
result
+
+ test060-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test061: + + same literal value with multiple languages +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test061-in.nq +
+
result
+
+ test061-urgna2012.nq +
+
+
+
+ + manifest-urgna2012#test062: + + same literal value with multiple datatypes +
+
+
+ +
+
+
type
+
rdfn:Urgna2012EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test062-in.nq +
+
result
+
+ test062-urgna2012.nq +
+
+
+
+
+
+

RDF Dataset Normalization (URDNA2015) (62 entries)

+

Tests the 2015 version of RDF Dataset Normalization.

+

+

+
+
+ + manifest-urdna2015#test001: + + simple id +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test001-in.nq +
+
result
+
+ test001-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test002: + + duplicate property iri values +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test002-in.nq +
+
result
+
+ test002-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test003: + + bnode +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test003-in.nq +
+
result
+
+ test003-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test004: + + bnode plus embed w/subject +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test004-in.nq +
+
result
+
+ test004-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test005: + + bnode embed +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test005-in.nq +
+
result
+
+ test005-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test006: + + multiple rdf types +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test006-in.nq +
+
result
+
+ test006-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test007: + + coerce CURIE value +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test007-in.nq +
+
result
+
+ test007-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test008: + + single subject complex +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test008-in.nq +
+
result
+
+ test008-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test009: + + multiple subjects - complex +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test009-in.nq +
+
result
+
+ test009-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test010: + + type +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test010-in.nq +
+
result
+
+ test010-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test011: + + type-coerced type +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test011-in.nq +
+
result
+
+ test011-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test012: + + type-coerced type, remove duplicate reference +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test012-in.nq +
+
result
+
+ test012-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test013: + + type-coerced type, cycle +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test013-in.nq +
+
result
+
+ test013-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test014: + + check types +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test014-in.nq +
+
result
+
+ test014-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test015: + + top level context +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test015-in.nq +
+
result
+
+ test015-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test016: + + blank node - dual link - embed +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test016-in.nq +
+
result
+
+ test016-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test017: + + blank node - dual link - non-embed +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test017-in.nq +
+
result
+
+ test017-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test018: + + blank node - self link +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test018-in.nq +
+
result
+
+ test018-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test019: + + blank node - disjoint self links +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test019-in.nq +
+
result
+
+ test019-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test020: + + blank node - diamond +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test020-in.nq +
+
result
+
+ test020-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test021: + + blank node - circle of 2 +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test021-in.nq +
+
result
+
+ test021-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test022: + + blank node - double circle of 2 +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test022-in.nq +
+
result
+
+ test022-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test023: + + blank node - circle of 3 +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test023-in.nq +
+
result
+
+ test023-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test024: + + blank node - double circle of 3 (1-2-3) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test024-in.nq +
+
result
+
+ test024-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test025: + + blank node - double circle of 3 (1-3-2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test025-in.nq +
+
result
+
+ test025-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test026: + + blank node - double circle of 3 (2-1-3) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test026-in.nq +
+
result
+
+ test026-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test027: + + blank node - double circle of 3 (2-3-1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test027-in.nq +
+
result
+
+ test027-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test028: + + blank node - double circle of 3 (3-2-1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test028-in.nq +
+
result
+
+ test028-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test029: + + blank node - double circle of 3 (3-1-2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test029-in.nq +
+
result
+
+ test029-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test030: + + blank node - point at circle of 3 +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test030-in.nq +
+
result
+
+ test030-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test031: + + bnode (1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test031-in.nq +
+
result
+
+ test031-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test032: + + bnode (2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test032-in.nq +
+
result
+
+ test032-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test033: + + disjoint identical subgraphs (1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test033-in.nq +
+
result
+
+ test033-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test034: + + disjoint identical subgraphs (2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test034-in.nq +
+
result
+
+ test034-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test035: + + reordered w/strings (1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test035-in.nq +
+
result
+
+ test035-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test036: + + reordered w/strings (2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test036-in.nq +
+
result
+
+ test036-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test037: + + reordered w/strings (3) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test037-in.nq +
+
result
+
+ test037-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test038: + + reordered 4 bnodes, reordered 2 properties (1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test038-in.nq +
+
result
+
+ test038-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test039: + + reordered 4 bnodes, reordered 2 properties (2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test039-in.nq +
+
result
+
+ test039-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test040: + + reordered 6 bnodes (1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test040-in.nq +
+
result
+
+ test040-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test041: + + reordered 6 bnodes (2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test041-in.nq +
+
result
+
+ test041-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test042: + + reordered 6 bnodes (3) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test042-in.nq +
+
result
+
+ test042-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test043: + + literal with language +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test043-in.nq +
+
result
+
+ test043-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test044: + + evil (1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test044-in.nq +
+
result
+
+ test044-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test045: + + evil (2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test045-in.nq +
+
result
+
+ test045-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test046: + + evil (3) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test046-in.nq +
+
result
+
+ test046-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test047: + + deep diff (1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test047-in.nq +
+
result
+
+ test047-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test048: + + deep diff (2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test048-in.nq +
+
result
+
+ test048-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test049: + + remove null +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test049-in.nq +
+
result
+
+ test049-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test050: + + nulls +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test050-in.nq +
+
result
+
+ test050-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test051: + + merging subjects +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test051-in.nq +
+
result
+
+ test051-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test052: + + alias keywords +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test052-in.nq +
+
result
+
+ test052-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test053: + + @list +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test053-in.nq +
+
result
+
+ test053-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test054: + + t-graph +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test054-in.nq +
+
result
+
+ test054-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test055: + + simple reorder (1) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test055-in.nq +
+
result
+
+ test055-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test056: + + simple reorder (2) +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test056-in.nq +
+
result
+
+ test056-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test057: + + unnamed graph +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test057-in.nq +
+
result
+
+ test057-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test058: + + unnamed graph with blank node objects +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test058-in.nq +
+
result
+
+ test058-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test059: + + n-quads parsing +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test059-in.nq +
+
result
+
+ test059-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test060: + + n-quads escaping +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test060-in.nq +
+
result
+
+ test060-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test061: + + same literal value with multiple languages +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test061-in.nq +
+
result
+
+ test061-urdna2015.nq +
+
+
+
+ + manifest-urdna2015#test062: + + same literal value with multiple datatypes +
+
+
+ +
+
+
type
+
rdfn:Urdna2015EvalTest
+
approval
+
rdft:Proposed
+
action
+
+ test062-in.nq +
+
result
+
+ test062-urdna2015.nq +
+
+
+
+
+ + + diff --git a/graph/formats/rdf/testdata/manifest-urdna2015.jsonld b/graph/formats/rdf/testdata/manifest-urdna2015.jsonld new file mode 100644 index 00000000..7de18e12 --- /dev/null +++ b/graph/formats/rdf/testdata/manifest-urdna2015.jsonld @@ -0,0 +1,596 @@ +{ + "@context": { + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#", + "mq": "http://www.w3.org/2001/sw/DataAccess/tests/test-query#", + "rdfn": "http://json-ld.github.io/normalization/test-vocab#", + "rdft": "http://www.w3.org/ns/rdftest#", + "id": "@id", + "type": "@type", + "action": { + "@id": "mf:action", + "@type": "@id" + }, + "approval": { + "@id": "rdft:approval", + "@type": "@id" + }, + "comment": "rdfs:comment", + "entries": { + "@id": "mf:entries", + "@type": "@id", + "@container": "@list" + }, + "label": "rdfs:label", + "name": "mf:name", + "result": { + "@id": "mf:result", + "@type": "@id" + } + }, + "id": "manifest-urdna2015", + "type": "mf:Manifest", + "label": "RDF Dataset Normalization (URDNA2015)", + "comment": "Tests the 2015 version of RDF Dataset Normalization.", + "entries": [ + { + "id": "manifest-urdna2015#test001", + "type": "rdfn:Urdna2015EvalTest", + "name": "simple id", + "comment": null, + "approval": "rdft:Proposed", + "action": "test001-in.nq", + "result": "test001-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test002", + "type": "rdfn:Urdna2015EvalTest", + "name": "duplicate property iri values", + "comment": null, + "approval": "rdft:Proposed", + "action": "test002-in.nq", + "result": "test002-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test003", + "type": "rdfn:Urdna2015EvalTest", + "name": "bnode", + "comment": null, + "approval": "rdft:Proposed", + "action": "test003-in.nq", + "result": "test003-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test004", + "type": "rdfn:Urdna2015EvalTest", + "name": "bnode plus embed w/subject", + "comment": null, + "approval": "rdft:Proposed", + "action": "test004-in.nq", + "result": "test004-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test005", + "type": "rdfn:Urdna2015EvalTest", + "name": "bnode embed", + "comment": null, + "approval": "rdft:Proposed", + "action": "test005-in.nq", + "result": "test005-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test006", + "type": "rdfn:Urdna2015EvalTest", + "name": "multiple rdf types", + "comment": null, + "approval": "rdft:Proposed", + "action": "test006-in.nq", + "result": "test006-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test007", + "type": "rdfn:Urdna2015EvalTest", + "name": "coerce CURIE value", + "comment": null, + "approval": "rdft:Proposed", + "action": "test007-in.nq", + "result": "test007-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test008", + "type": "rdfn:Urdna2015EvalTest", + "name": "single subject complex", + "comment": null, + "approval": "rdft:Proposed", + "action": "test008-in.nq", + "result": "test008-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test009", + "type": "rdfn:Urdna2015EvalTest", + "name": "multiple subjects - complex", + "comment": null, + "approval": "rdft:Proposed", + "action": "test009-in.nq", + "result": "test009-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test010", + "type": "rdfn:Urdna2015EvalTest", + "name": "type", + "comment": null, + "approval": "rdft:Proposed", + "action": "test010-in.nq", + "result": "test010-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test011", + "type": "rdfn:Urdna2015EvalTest", + "name": "type-coerced type", + "comment": null, + "approval": "rdft:Proposed", + "action": "test011-in.nq", + "result": "test011-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test012", + "type": "rdfn:Urdna2015EvalTest", + "name": "type-coerced type, remove duplicate reference", + "comment": null, + "approval": "rdft:Proposed", + "action": "test012-in.nq", + "result": "test012-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test013", + "type": "rdfn:Urdna2015EvalTest", + "name": "type-coerced type, cycle", + "comment": null, + "approval": "rdft:Proposed", + "action": "test013-in.nq", + "result": "test013-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test014", + "type": "rdfn:Urdna2015EvalTest", + "name": "check types", + "comment": null, + "approval": "rdft:Proposed", + "action": "test014-in.nq", + "result": "test014-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test015", + "type": "rdfn:Urdna2015EvalTest", + "name": "top level context", + "comment": null, + "approval": "rdft:Proposed", + "action": "test015-in.nq", + "result": "test015-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test016", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - dual link - embed", + "comment": null, + "approval": "rdft:Proposed", + "action": "test016-in.nq", + "result": "test016-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test017", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - dual link - non-embed", + "comment": null, + "approval": "rdft:Proposed", + "action": "test017-in.nq", + "result": "test017-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test018", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - self link", + "comment": null, + "approval": "rdft:Proposed", + "action": "test018-in.nq", + "result": "test018-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test019", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - disjoint self links", + "comment": null, + "approval": "rdft:Proposed", + "action": "test019-in.nq", + "result": "test019-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test020", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - diamond", + "comment": null, + "approval": "rdft:Proposed", + "action": "test020-in.nq", + "result": "test020-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test021", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - circle of 2", + "comment": null, + "approval": "rdft:Proposed", + "action": "test021-in.nq", + "result": "test021-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test022", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - double circle of 2", + "comment": null, + "approval": "rdft:Proposed", + "action": "test022-in.nq", + "result": "test022-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test023", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - circle of 3", + "comment": null, + "approval": "rdft:Proposed", + "action": "test023-in.nq", + "result": "test023-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test024", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - double circle of 3 (1-2-3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test024-in.nq", + "result": "test024-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test025", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - double circle of 3 (1-3-2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test025-in.nq", + "result": "test025-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test026", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - double circle of 3 (2-1-3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test026-in.nq", + "result": "test026-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test027", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - double circle of 3 (2-3-1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test027-in.nq", + "result": "test027-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test028", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - double circle of 3 (3-2-1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test028-in.nq", + "result": "test028-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test029", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - double circle of 3 (3-1-2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test029-in.nq", + "result": "test029-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test030", + "type": "rdfn:Urdna2015EvalTest", + "name": "blank node - point at circle of 3", + "comment": null, + "approval": "rdft:Proposed", + "action": "test030-in.nq", + "result": "test030-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test031", + "type": "rdfn:Urdna2015EvalTest", + "name": "bnode (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test031-in.nq", + "result": "test031-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test032", + "type": "rdfn:Urdna2015EvalTest", + "name": "bnode (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test032-in.nq", + "result": "test032-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test033", + "type": "rdfn:Urdna2015EvalTest", + "name": "disjoint identical subgraphs (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test033-in.nq", + "result": "test033-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test034", + "type": "rdfn:Urdna2015EvalTest", + "name": "disjoint identical subgraphs (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test034-in.nq", + "result": "test034-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test035", + "type": "rdfn:Urdna2015EvalTest", + "name": "reordered w/strings (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test035-in.nq", + "result": "test035-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test036", + "type": "rdfn:Urdna2015EvalTest", + "name": "reordered w/strings (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test036-in.nq", + "result": "test036-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test037", + "type": "rdfn:Urdna2015EvalTest", + "name": "reordered w/strings (3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test037-in.nq", + "result": "test037-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test038", + "type": "rdfn:Urdna2015EvalTest", + "name": "reordered 4 bnodes, reordered 2 properties (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test038-in.nq", + "result": "test038-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test039", + "type": "rdfn:Urdna2015EvalTest", + "name": "reordered 4 bnodes, reordered 2 properties (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test039-in.nq", + "result": "test039-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test040", + "type": "rdfn:Urdna2015EvalTest", + "name": "reordered 6 bnodes (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test040-in.nq", + "result": "test040-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test041", + "type": "rdfn:Urdna2015EvalTest", + "name": "reordered 6 bnodes (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test041-in.nq", + "result": "test041-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test042", + "type": "rdfn:Urdna2015EvalTest", + "name": "reordered 6 bnodes (3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test042-in.nq", + "result": "test042-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test043", + "type": "rdfn:Urdna2015EvalTest", + "name": "literal with language", + "comment": null, + "approval": "rdft:Proposed", + "action": "test043-in.nq", + "result": "test043-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test044", + "type": "rdfn:Urdna2015EvalTest", + "name": "evil (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test044-in.nq", + "result": "test044-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test045", + "type": "rdfn:Urdna2015EvalTest", + "name": "evil (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test045-in.nq", + "result": "test045-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test046", + "type": "rdfn:Urdna2015EvalTest", + "name": "evil (3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test046-in.nq", + "result": "test046-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test047", + "type": "rdfn:Urdna2015EvalTest", + "name": "deep diff (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test047-in.nq", + "result": "test047-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test048", + "type": "rdfn:Urdna2015EvalTest", + "name": "deep diff (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test048-in.nq", + "result": "test048-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test049", + "type": "rdfn:Urdna2015EvalTest", + "name": "remove null", + "comment": null, + "approval": "rdft:Proposed", + "action": "test049-in.nq", + "result": "test049-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test050", + "type": "rdfn:Urdna2015EvalTest", + "name": "nulls", + "comment": null, + "approval": "rdft:Proposed", + "action": "test050-in.nq", + "result": "test050-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test051", + "type": "rdfn:Urdna2015EvalTest", + "name": "merging subjects", + "comment": null, + "approval": "rdft:Proposed", + "action": "test051-in.nq", + "result": "test051-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test052", + "type": "rdfn:Urdna2015EvalTest", + "name": "alias keywords", + "comment": null, + "approval": "rdft:Proposed", + "action": "test052-in.nq", + "result": "test052-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test053", + "type": "rdfn:Urdna2015EvalTest", + "name": "@list", + "comment": null, + "approval": "rdft:Proposed", + "action": "test053-in.nq", + "result": "test053-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test054", + "type": "rdfn:Urdna2015EvalTest", + "name": "t-graph", + "comment": null, + "approval": "rdft:Proposed", + "action": "test054-in.nq", + "result": "test054-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test055", + "type": "rdfn:Urdna2015EvalTest", + "name": "simple reorder (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test055-in.nq", + "result": "test055-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test056", + "type": "rdfn:Urdna2015EvalTest", + "name": "simple reorder (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test056-in.nq", + "result": "test056-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test057", + "type": "rdfn:Urdna2015EvalTest", + "name": "unnamed graph", + "comment": null, + "approval": "rdft:Proposed", + "action": "test057-in.nq", + "result": "test057-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test058", + "type": "rdfn:Urdna2015EvalTest", + "name": "unnamed graph with blank node objects", + "comment": null, + "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" + }, + { + "id": "manifest-urdna2015#test060", + "type": "rdfn:Urdna2015EvalTest", + "name": "n-quads escaping", + "comment": null, + "approval": "rdft:Proposed", + "action": "test060-in.nq", + "result": "test060-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test061", + "type": "rdfn:Urdna2015EvalTest", + "name": "same literal value with multiple languages", + "comment": null, + "approval": "rdft:Proposed", + "action": "test061-in.nq", + "result": "test061-urdna2015.nq" + }, + { + "id": "manifest-urdna2015#test062", + "type": "rdfn:Urdna2015EvalTest", + "name": "same literal value with multiple datatypes", + "comment": null, + "approval": "rdft:Proposed", + "action": "test062-in.nq", + "result": "test062-urdna2015.nq" + } + ] +} diff --git a/graph/formats/rdf/testdata/manifest-urdna2015.ttl b/graph/formats/rdf/testdata/manifest-urdna2015.ttl new file mode 100644 index 00000000..af6fd1e2 --- /dev/null +++ b/graph/formats/rdf/testdata/manifest-urdna2015.ttl @@ -0,0 +1,467 @@ +## RDF Dataset Normalization tests +## Distributed under both the W3C Test Suite License[1] and the W3C 3- +## clause BSD License[2]. To contribute to a W3C Test Suite, see the +## policies and contribution forms [3] +## +## 1. http://www.w3.org/Consortium/Legal/2008/04-testsuite-license +## 2. http://www.w3.org/Consortium/Legal/2008/03-bsd-license +## 3. http://www.w3.org/2004/10/27-testcases +## +## Test types +## * rdfn:Urgna2012EvalTest - Normalization using URGNA2012 +## * rdfn:Urdna2015EvalTest - Normalization using URDNA2015 + +@prefix : . +@prefix rdf: . +@prefix rdfs: . +@prefix mf: . +@prefix rdft: . +@prefix rdfn: . + + a mf:Manifest ; + + rdfs:label "RDF Dataset Normalization (URDNA2015)"; + rdfs:comment "Tests the 2015 version of RDF Dataset Normalization."; + mf:entries ( + :test001 :test002 :test003 :test004 :test005 :test006 :test007 :test008 :test009 :test010 + :test011 :test012 :test013 :test014 :test015 :test016 :test017 :test018 :test019 :test020 + :test021 :test022 :test023 :test024 :test025 :test026 :test027 :test028 :test029 :test030 + :test031 :test032 :test033 :test034 :test035 :test036 :test037 :test038 :test039 :test040 + :test041 :test042 :test043 :test044 :test045 :test046 :test047 :test048 :test049 :test050 + :test051 :test052 :test053 :test054 :test055 :test056 :test057 :test058 :test059 :test060 + :test061 :test062 + ) . + +:test001 a rdfn:Urdna2015EvalTest; + mf:name "simple id"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test002 a rdfn:Urdna2015EvalTest; + mf:name "duplicate property iri values"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test003 a rdfn:Urdna2015EvalTest; + mf:name "bnode"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test004 a rdfn:Urdna2015EvalTest; + mf:name "bnode plus embed w/subject"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test005 a rdfn:Urdna2015EvalTest; + mf:name "bnode embed"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test006 a rdfn:Urdna2015EvalTest; + mf:name "multiple rdf types"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test007 a rdfn:Urdna2015EvalTest; + mf:name "coerce CURIE value"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test008 a rdfn:Urdna2015EvalTest; + mf:name "single subject complex"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test009 a rdfn:Urdna2015EvalTest; + mf:name "multiple subjects - complex"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test010 a rdfn:Urdna2015EvalTest; + mf:name "type"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test011 a rdfn:Urdna2015EvalTest; + mf:name "type-coerced type"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test012 a rdfn:Urdna2015EvalTest; + mf:name "type-coerced type, remove duplicate reference"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test013 a rdfn:Urdna2015EvalTest; + mf:name "type-coerced type, cycle"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test014 a rdfn:Urdna2015EvalTest; + mf:name "check types"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test015 a rdfn:Urdna2015EvalTest; + mf:name "top level context"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test016 a rdfn:Urdna2015EvalTest; + mf:name "blank node - dual link - embed"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test017 a rdfn:Urdna2015EvalTest; + mf:name "blank node - dual link - non-embed"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test018 a rdfn:Urdna2015EvalTest; + mf:name "blank node - self link"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test019 a rdfn:Urdna2015EvalTest; + mf:name "blank node - disjoint self links"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test020 a rdfn:Urdna2015EvalTest; + mf:name "blank node - diamond"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test021 a rdfn:Urdna2015EvalTest; + mf:name "blank node - circle of 2"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test022 a rdfn:Urdna2015EvalTest; + mf:name "blank node - double circle of 2"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test023 a rdfn:Urdna2015EvalTest; + mf:name "blank node - circle of 3"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test024 a rdfn:Urdna2015EvalTest; + mf:name "blank node - double circle of 3 (1-2-3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test025 a rdfn:Urdna2015EvalTest; + mf:name "blank node - double circle of 3 (1-3-2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test026 a rdfn:Urdna2015EvalTest; + mf:name "blank node - double circle of 3 (2-1-3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test027 a rdfn:Urdna2015EvalTest; + mf:name "blank node - double circle of 3 (2-3-1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test028 a rdfn:Urdna2015EvalTest; + mf:name "blank node - double circle of 3 (3-2-1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test029 a rdfn:Urdna2015EvalTest; + mf:name "blank node - double circle of 3 (3-1-2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test030 a rdfn:Urdna2015EvalTest; + mf:name "blank node - point at circle of 3"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test031 a rdfn:Urdna2015EvalTest; + mf:name "bnode (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test032 a rdfn:Urdna2015EvalTest; + mf:name "bnode (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test033 a rdfn:Urdna2015EvalTest; + mf:name "disjoint identical subgraphs (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test034 a rdfn:Urdna2015EvalTest; + mf:name "disjoint identical subgraphs (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test035 a rdfn:Urdna2015EvalTest; + mf:name "reordered w/strings (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test036 a rdfn:Urdna2015EvalTest; + mf:name "reordered w/strings (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test037 a rdfn:Urdna2015EvalTest; + mf:name "reordered w/strings (3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test038 a rdfn:Urdna2015EvalTest; + mf:name "reordered 4 bnodes, reordered 2 properties (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test039 a rdfn:Urdna2015EvalTest; + mf:name "reordered 4 bnodes, reordered 2 properties (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test040 a rdfn:Urdna2015EvalTest; + mf:name "reordered 6 bnodes (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test041 a rdfn:Urdna2015EvalTest; + mf:name "reordered 6 bnodes (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test042 a rdfn:Urdna2015EvalTest; + mf:name "reordered 6 bnodes (3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test043 a rdfn:Urdna2015EvalTest; + mf:name "literal with language"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test044 a rdfn:Urdna2015EvalTest; + mf:name "evil (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test045 a rdfn:Urdna2015EvalTest; + mf:name "evil (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test046 a rdfn:Urdna2015EvalTest; + mf:name "evil (3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test047 a rdfn:Urdna2015EvalTest; + mf:name "deep diff (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test048 a rdfn:Urdna2015EvalTest; + mf:name "deep diff (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test049 a rdfn:Urdna2015EvalTest; + mf:name "remove null"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test050 a rdfn:Urdna2015EvalTest; + mf:name "nulls"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test051 a rdfn:Urdna2015EvalTest; + mf:name "merging subjects"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test052 a rdfn:Urdna2015EvalTest; + mf:name "alias keywords"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test053 a rdfn:Urdna2015EvalTest; + mf:name "@list"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test054 a rdfn:Urdna2015EvalTest; + mf:name "t-graph"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test055 a rdfn:Urdna2015EvalTest; + mf:name "simple reorder (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test056 a rdfn:Urdna2015EvalTest; + mf:name "simple reorder (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test057 a rdfn:Urdna2015EvalTest; + mf:name "unnamed graph"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test058 a rdfn:Urdna2015EvalTest; + mf:name "unnamed graph with blank node objects"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test059 a rdfn:Urdna2015EvalTest; + mf:name "n-quads parsing"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test060 a rdfn:Urdna2015EvalTest; + mf:name "n-quads escaping"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test061 a rdfn:Urdna2015EvalTest; + mf:name "same literal value with multiple languages"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test062 a rdfn:Urdna2015EvalTest; + mf:name "same literal value with multiple datatypes"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . diff --git a/graph/formats/rdf/testdata/manifest-urgna2012.jsonld b/graph/formats/rdf/testdata/manifest-urgna2012.jsonld new file mode 100644 index 00000000..786f84a7 --- /dev/null +++ b/graph/formats/rdf/testdata/manifest-urgna2012.jsonld @@ -0,0 +1,569 @@ +{ + "@context": { + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#", + "mq": "http://www.w3.org/2001/sw/DataAccess/tests/test-query#", + "rdfn": "http://json-ld.github.io/normalization/test-vocab#", + "rdft": "http://www.w3.org/ns/rdftest#", + "id": "@id", + "type": "@type", + "action": { + "@id": "mf:action", + "@type": "@id" + }, + "approval": { + "@id": "rdft:approval", + "@type": "@id" + }, + "comment": "rdfs:comment", + "entries": { + "@id": "mf:entries", + "@type": "@id", + "@container": "@list" + }, + "label": "rdfs:label", + "name": "mf:name", + "result": { + "@id": "mf:result", + "@type": "@id" + } + }, + "id": "manifest-urgna2012", + "type": "mf:Manifest", + "label": "RDF Graph Normalization (URGNA2012)", + "comment": "Tests the 2012 version of RDF Graph Normalization.", + "entries": [ + { + "id": "manifest-urgna2012#test001", + "type": "rdfn:Urgna2012EvalTest", + "name": "simple id", + "comment": null, + "approval": "rdft:Proposed", + "action": "test001-in.nq", + "result": "test001-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test002", + "type": "rdfn:Urgna2012EvalTest", + "name": "duplicate property iri values", + "comment": null, + "approval": "rdft:Proposed", + "action": "test002-in.nq", + "result": "test002-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test003", + "type": "rdfn:Urgna2012EvalTest", + "name": "bnode", + "comment": null, + "approval": "rdft:Proposed", + "action": "test003-in.nq", + "result": "test003-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test004", + "type": "rdfn:Urgna2012EvalTest", + "name": "bnode plus embed w/subject", + "comment": null, + "approval": "rdft:Proposed", + "action": "test004-in.nq", + "result": "test004-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test005", + "type": "rdfn:Urgna2012EvalTest", + "name": "bnode embed", + "comment": null, + "approval": "rdft:Proposed", + "action": "test005-in.nq", + "result": "test005-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test006", + "type": "rdfn:Urgna2012EvalTest", + "name": "multiple rdf types", + "comment": null, + "approval": "rdft:Proposed", + "action": "test006-in.nq", + "result": "test006-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test007", + "type": "rdfn:Urgna2012EvalTest", + "name": "coerce CURIE value", + "comment": null, + "approval": "rdft:Proposed", + "action": "test007-in.nq", + "result": "test007-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test008", + "type": "rdfn:Urgna2012EvalTest", + "name": "single subject complex", + "comment": null, + "approval": "rdft:Proposed", + "action": "test008-in.nq", + "result": "test008-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test009", + "type": "rdfn:Urgna2012EvalTest", + "name": "multiple subjects - complex", + "comment": null, + "approval": "rdft:Proposed", + "action": "test009-in.nq", + "result": "test009-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test010", + "type": "rdfn:Urgna2012EvalTest", + "name": "type", + "comment": null, + "approval": "rdft:Proposed", + "action": "test010-in.nq", + "result": "test010-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test011", + "type": "rdfn:Urgna2012EvalTest", + "name": "type-coerced type", + "comment": null, + "approval": "rdft:Proposed", + "action": "test011-in.nq", + "result": "test011-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test012", + "type": "rdfn:Urgna2012EvalTest", + "name": "type-coerced type, remove duplicate reference", + "comment": null, + "approval": "rdft:Proposed", + "action": "test012-in.nq", + "result": "test012-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test013", + "type": "rdfn:Urgna2012EvalTest", + "name": "type-coerced type, cycle", + "comment": null, + "approval": "rdft:Proposed", + "action": "test013-in.nq", + "result": "test013-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test014", + "type": "rdfn:Urgna2012EvalTest", + "name": "check types", + "comment": null, + "approval": "rdft:Proposed", + "action": "test014-in.nq", + "result": "test014-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test015", + "type": "rdfn:Urgna2012EvalTest", + "name": "top level context", + "comment": null, + "approval": "rdft:Proposed", + "action": "test015-in.nq", + "result": "test015-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test016", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - dual link - embed", + "comment": null, + "approval": "rdft:Proposed", + "action": "test016-in.nq", + "result": "test016-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test017", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - dual link - non-embed", + "comment": null, + "approval": "rdft:Proposed", + "action": "test017-in.nq", + "result": "test017-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test018", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - self link", + "comment": null, + "approval": "rdft:Proposed", + "action": "test018-in.nq", + "result": "test018-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test019", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - disjoint self links", + "comment": null, + "approval": "rdft:Proposed", + "action": "test019-in.nq", + "result": "test019-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test020", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - diamond", + "comment": null, + "approval": "rdft:Proposed", + "action": "test020-in.nq", + "result": "test020-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test021", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - circle of 2", + "comment": null, + "approval": "rdft:Proposed", + "action": "test021-in.nq", + "result": "test021-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test022", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - double circle of 2", + "comment": null, + "approval": "rdft:Proposed", + "action": "test022-in.nq", + "result": "test022-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test023", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - circle of 3", + "comment": null, + "approval": "rdft:Proposed", + "action": "test023-in.nq", + "result": "test023-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test024", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - double circle of 3 (1-2-3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test024-in.nq", + "result": "test024-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test025", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - double circle of 3 (1-3-2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test025-in.nq", + "result": "test025-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test026", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - double circle of 3 (2-1-3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test026-in.nq", + "result": "test026-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test027", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - double circle of 3 (2-3-1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test027-in.nq", + "result": "test027-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test028", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - double circle of 3 (3-2-1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test028-in.nq", + "result": "test028-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test029", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - double circle of 3 (3-1-2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test029-in.nq", + "result": "test029-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test030", + "type": "rdfn:Urgna2012EvalTest", + "name": "blank node - point at circle of 3", + "comment": null, + "approval": "rdft:Proposed", + "action": "test030-in.nq", + "result": "test030-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test031", + "type": "rdfn:Urgna2012EvalTest", + "name": "bnode (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test031-in.nq", + "result": "test031-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test032", + "type": "rdfn:Urgna2012EvalTest", + "name": "bnode (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test032-in.nq", + "result": "test032-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test033", + "type": "rdfn:Urgna2012EvalTest", + "name": "disjoint identical subgraphs (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test033-in.nq", + "result": "test033-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test034", + "type": "rdfn:Urgna2012EvalTest", + "name": "disjoint identical subgraphs (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test034-in.nq", + "result": "test034-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test035", + "type": "rdfn:Urgna2012EvalTest", + "name": "reordered w/strings (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test035-in.nq", + "result": "test035-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test036", + "type": "rdfn:Urgna2012EvalTest", + "name": "reordered w/strings (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test036-in.nq", + "result": "test036-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test037", + "type": "rdfn:Urgna2012EvalTest", + "name": "reordered w/strings (3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test037-in.nq", + "result": "test037-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test038", + "type": "rdfn:Urgna2012EvalTest", + "name": "reordered 4 bnodes, reordered 2 properties (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test038-in.nq", + "result": "test038-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test039", + "type": "rdfn:Urgna2012EvalTest", + "name": "reordered 4 bnodes, reordered 2 properties (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test039-in.nq", + "result": "test039-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test040", + "type": "rdfn:Urgna2012EvalTest", + "name": "reordered 6 bnodes (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test040-in.nq", + "result": "test040-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test041", + "type": "rdfn:Urgna2012EvalTest", + "name": "reordered 6 bnodes (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test041-in.nq", + "result": "test041-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test042", + "type": "rdfn:Urgna2012EvalTest", + "name": "reordered 6 bnodes (3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test042-in.nq", + "result": "test042-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test043", + "type": "rdfn:Urgna2012EvalTest", + "name": "literal with language", + "comment": null, + "approval": "rdft:Proposed", + "action": "test043-in.nq", + "result": "test043-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test044", + "type": "rdfn:Urgna2012EvalTest", + "name": "evil (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test044-in.nq", + "result": "test044-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test045", + "type": "rdfn:Urgna2012EvalTest", + "name": "evil (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test045-in.nq", + "result": "test045-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test046", + "type": "rdfn:Urgna2012EvalTest", + "name": "evil (3)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test046-in.nq", + "result": "test046-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test047", + "type": "rdfn:Urgna2012EvalTest", + "name": "deep diff (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test047-in.nq", + "result": "test047-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test048", + "type": "rdfn:Urgna2012EvalTest", + "name": "deep diff (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test048-in.nq", + "result": "test048-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test049", + "type": "rdfn:Urgna2012EvalTest", + "name": "remove null", + "comment": null, + "approval": "rdft:Proposed", + "action": "test049-in.nq", + "result": "test049-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test050", + "type": "rdfn:Urgna2012EvalTest", + "name": "nulls", + "comment": null, + "approval": "rdft:Proposed", + "action": "test050-in.nq", + "result": "test050-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test051", + "type": "rdfn:Urgna2012EvalTest", + "name": "merging subjects", + "comment": null, + "approval": "rdft:Proposed", + "action": "test051-in.nq", + "result": "test051-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test052", + "type": "rdfn:Urgna2012EvalTest", + "name": "alias keywords", + "comment": null, + "approval": "rdft:Proposed", + "action": "test052-in.nq", + "result": "test052-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test053", + "type": "rdfn:Urgna2012EvalTest", + "name": "@list", + "comment": null, + "approval": "rdft:Proposed", + "action": "test053-in.nq", + "result": "test053-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test054", + "type": "rdfn:Urgna2012EvalTest", + "name": "t-graph", + "comment": null, + "approval": "rdft:Proposed", + "action": "test054-in.nq", + "result": "test054-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test055", + "type": "rdfn:Urgna2012EvalTest", + "name": "simple reorder (1)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test055-in.nq", + "result": "test055-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test056", + "type": "rdfn:Urgna2012EvalTest", + "name": "simple reorder (2)", + "comment": null, + "approval": "rdft:Proposed", + "action": "test056-in.nq", + "result": "test056-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test060", + "type": "rdfn:Urgna2012EvalTest", + "name": "n-quads escaping", + "comment": null, + "approval": "rdft:Proposed", + "action": "test060-in.nq", + "result": "test060-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test061", + "type": "rdfn:Urgna2012EvalTest", + "name": "same literal value with multiple languages", + "comment": null, + "approval": "rdft:Proposed", + "action": "test061-in.nq", + "result": "test061-urgna2012.nq" + }, + { + "id": "manifest-urgna2012#test062", + "type": "rdfn:Urgna2012EvalTest", + "name": "same literal value with multiple datatypes", + "comment": null, + "approval": "rdft:Proposed", + "action": "test062-in.nq", + "result": "test062-urgna2012.nq" + } + ] +} diff --git a/graph/formats/rdf/testdata/manifest-urgna2012.ttl b/graph/formats/rdf/testdata/manifest-urgna2012.ttl new file mode 100644 index 00000000..61fa02e7 --- /dev/null +++ b/graph/formats/rdf/testdata/manifest-urgna2012.ttl @@ -0,0 +1,445 @@ +## RDF Dataset Normalization tests +## Distributed under both the W3C Test Suite License[1] and the W3C 3- +## clause BSD License[2]. To contribute to a W3C Test Suite, see the +## policies and contribution forms [3] +## +## 1. http://www.w3.org/Consortium/Legal/2008/04-testsuite-license +## 2. http://www.w3.org/Consortium/Legal/2008/03-bsd-license +## 3. http://www.w3.org/2004/10/27-testcases +## +## Test types +## * rdfn:Urgna2012EvalTest - Normalization using URGNA2012 +## * rdfn:Urdna2015EvalTest - Normalization using URDNA2015 + +@prefix : . +@prefix rdf: . +@prefix rdfs: . +@prefix mf: . +@prefix rdft: . +@prefix rdfn: . + + a mf:Manifest ; + + rdfs:label "RDF Graph Normalization (URGNA2012)"; + rdfs:comment "Tests the 2012 version of RDF Graph Normalization."; + mf:entries ( + :test001 :test002 :test003 :test004 :test005 :test006 :test007 :test008 :test009 :test010 + :test011 :test012 :test013 :test014 :test015 :test016 :test017 :test018 :test019 :test020 + :test021 :test022 :test023 :test024 :test025 :test026 :test027 :test028 :test029 :test030 + :test031 :test032 :test033 :test034 :test035 :test036 :test037 :test038 :test039 :test040 + :test041 :test042 :test043 :test044 :test045 :test046 :test047 :test048 :test049 :test050 + :test051 :test052 :test053 :test054 :test055 :test056 :test060 :test061 :test062 + ) . + +:test001 a rdfn:Urgna2012EvalTest; + mf:name "simple id"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test002 a rdfn:Urgna2012EvalTest; + mf:name "duplicate property iri values"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test003 a rdfn:Urgna2012EvalTest; + mf:name "bnode"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test004 a rdfn:Urgna2012EvalTest; + mf:name "bnode plus embed w/subject"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test005 a rdfn:Urgna2012EvalTest; + mf:name "bnode embed"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test006 a rdfn:Urgna2012EvalTest; + mf:name "multiple rdf types"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test007 a rdfn:Urgna2012EvalTest; + mf:name "coerce CURIE value"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test008 a rdfn:Urgna2012EvalTest; + mf:name "single subject complex"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test009 a rdfn:Urgna2012EvalTest; + mf:name "multiple subjects - complex"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test010 a rdfn:Urgna2012EvalTest; + mf:name "type"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test011 a rdfn:Urgna2012EvalTest; + mf:name "type-coerced type"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test012 a rdfn:Urgna2012EvalTest; + mf:name "type-coerced type, remove duplicate reference"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test013 a rdfn:Urgna2012EvalTest; + mf:name "type-coerced type, cycle"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test014 a rdfn:Urgna2012EvalTest; + mf:name "check types"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test015 a rdfn:Urgna2012EvalTest; + mf:name "top level context"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test016 a rdfn:Urgna2012EvalTest; + mf:name "blank node - dual link - embed"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test017 a rdfn:Urgna2012EvalTest; + mf:name "blank node - dual link - non-embed"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test018 a rdfn:Urgna2012EvalTest; + mf:name "blank node - self link"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test019 a rdfn:Urgna2012EvalTest; + mf:name "blank node - disjoint self links"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test020 a rdfn:Urgna2012EvalTest; + mf:name "blank node - diamond"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test021 a rdfn:Urgna2012EvalTest; + mf:name "blank node - circle of 2"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test022 a rdfn:Urgna2012EvalTest; + mf:name "blank node - double circle of 2"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test023 a rdfn:Urgna2012EvalTest; + mf:name "blank node - circle of 3"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test024 a rdfn:Urgna2012EvalTest; + mf:name "blank node - double circle of 3 (1-2-3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test025 a rdfn:Urgna2012EvalTest; + mf:name "blank node - double circle of 3 (1-3-2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test026 a rdfn:Urgna2012EvalTest; + mf:name "blank node - double circle of 3 (2-1-3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test027 a rdfn:Urgna2012EvalTest; + mf:name "blank node - double circle of 3 (2-3-1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test028 a rdfn:Urgna2012EvalTest; + mf:name "blank node - double circle of 3 (3-2-1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test029 a rdfn:Urgna2012EvalTest; + mf:name "blank node - double circle of 3 (3-1-2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test030 a rdfn:Urgna2012EvalTest; + mf:name "blank node - point at circle of 3"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test031 a rdfn:Urgna2012EvalTest; + mf:name "bnode (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test032 a rdfn:Urgna2012EvalTest; + mf:name "bnode (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test033 a rdfn:Urgna2012EvalTest; + mf:name "disjoint identical subgraphs (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test034 a rdfn:Urgna2012EvalTest; + mf:name "disjoint identical subgraphs (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test035 a rdfn:Urgna2012EvalTest; + mf:name "reordered w/strings (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test036 a rdfn:Urgna2012EvalTest; + mf:name "reordered w/strings (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test037 a rdfn:Urgna2012EvalTest; + mf:name "reordered w/strings (3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test038 a rdfn:Urgna2012EvalTest; + mf:name "reordered 4 bnodes, reordered 2 properties (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test039 a rdfn:Urgna2012EvalTest; + mf:name "reordered 4 bnodes, reordered 2 properties (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test040 a rdfn:Urgna2012EvalTest; + mf:name "reordered 6 bnodes (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test041 a rdfn:Urgna2012EvalTest; + mf:name "reordered 6 bnodes (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test042 a rdfn:Urgna2012EvalTest; + mf:name "reordered 6 bnodes (3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test043 a rdfn:Urgna2012EvalTest; + mf:name "literal with language"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test044 a rdfn:Urgna2012EvalTest; + mf:name "evil (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test045 a rdfn:Urgna2012EvalTest; + mf:name "evil (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test046 a rdfn:Urgna2012EvalTest; + mf:name "evil (3)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test047 a rdfn:Urgna2012EvalTest; + mf:name "deep diff (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test048 a rdfn:Urgna2012EvalTest; + mf:name "deep diff (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test049 a rdfn:Urgna2012EvalTest; + mf:name "remove null"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test050 a rdfn:Urgna2012EvalTest; + mf:name "nulls"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test051 a rdfn:Urgna2012EvalTest; + mf:name "merging subjects"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test052 a rdfn:Urgna2012EvalTest; + mf:name "alias keywords"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test053 a rdfn:Urgna2012EvalTest; + mf:name "@list"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test054 a rdfn:Urgna2012EvalTest; + mf:name "t-graph"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test055 a rdfn:Urgna2012EvalTest; + mf:name "simple reorder (1)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test056 a rdfn:Urgna2012EvalTest; + mf:name "simple reorder (2)"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test060 a rdfn:Urgna2012EvalTest; + mf:name "n-quads escaping"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test061 a rdfn:Urgna2012EvalTest; + mf:name "same literal value with multiple languages"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . + +:test062 a rdfn:Urgna2012EvalTest; + mf:name "same literal value with multiple datatypes"; + rdft:approval rdft:Proposed; + mf:action ; + mf:result ; + . diff --git a/graph/formats/rdf/testdata/manifest.csv b/graph/formats/rdf/testdata/manifest.csv new file mode 100644 index 00000000..28a104ed --- /dev/null +++ b/graph/formats/rdf/testdata/manifest.csv @@ -0,0 +1,63 @@ +test,name,comment,approval,urgna2012,urdna2015 +test001,simple id,,,TRUE,TRUE +test002,duplicate property iri values,,,TRUE,TRUE +test003,bnode,,,TRUE,TRUE +test004,bnode plus embed w/subject,,,TRUE,TRUE +test005,bnode embed,,,TRUE,TRUE +test006,multiple rdf types,,,TRUE,TRUE +test007,coerce CURIE value,,,TRUE,TRUE +test008,single subject complex,,,TRUE,TRUE +test009,multiple subjects - complex,,,TRUE,TRUE +test010,type,,,TRUE,TRUE +test011,type-coerced type,,,TRUE,TRUE +test012,"type-coerced type, remove duplicate reference",,,TRUE,TRUE +test013,"type-coerced type, cycle",,,TRUE,TRUE +test014,check types,,,TRUE,TRUE +test015,top level context,,,TRUE,TRUE +test016,blank node - dual link - embed,,,TRUE,TRUE +test017,blank node - dual link - non-embed,,,TRUE,TRUE +test018,blank node - self link,,,TRUE,TRUE +test019,blank node - disjoint self links,,,TRUE,TRUE +test020,blank node - diamond,,,TRUE,TRUE +test021,blank node - circle of 2,,,TRUE,TRUE +test022,blank node - double circle of 2,,,TRUE,TRUE +test023,blank node - circle of 3,,,TRUE,TRUE +test024,blank node - double circle of 3 (1-2-3),,,TRUE,TRUE +test025,blank node - double circle of 3 (1-3-2),,,TRUE,TRUE +test026,blank node - double circle of 3 (2-1-3),,,TRUE,TRUE +test027,blank node - double circle of 3 (2-3-1),,,TRUE,TRUE +test028,blank node - double circle of 3 (3-2-1),,,TRUE,TRUE +test029,blank node - double circle of 3 (3-1-2),,,TRUE,TRUE +test030,blank node - point at circle of 3,,,TRUE,TRUE +test031,bnode (1),,,TRUE,TRUE +test032,bnode (2),,,TRUE,TRUE +test033,disjoint identical subgraphs (1),,,TRUE,TRUE +test034,disjoint identical subgraphs (2),,,TRUE,TRUE +test035,reordered w/strings (1),,,TRUE,TRUE +test036,reordered w/strings (2),,,TRUE,TRUE +test037,reordered w/strings (3),,,TRUE,TRUE +test038,"reordered 4 bnodes, reordered 2 properties (1)",,,TRUE,TRUE +test039,"reordered 4 bnodes, reordered 2 properties (2)",,,TRUE,TRUE +test040,reordered 6 bnodes (1),,,TRUE,TRUE +test041,reordered 6 bnodes (2),,,TRUE,TRUE +test042,reordered 6 bnodes (3),,,TRUE,TRUE +test043,literal with language,,,TRUE,TRUE +test044,evil (1),,,TRUE,TRUE +test045,evil (2),,,TRUE,TRUE +test046,evil (3),,,TRUE,TRUE +test047,deep diff (1),,,TRUE,TRUE +test048,deep diff (2),,,TRUE,TRUE +test049,remove null,,,TRUE,TRUE +test050,nulls,,,TRUE,TRUE +test051,merging subjects,,,TRUE,TRUE +test052,alias keywords,,,TRUE,TRUE +test053,@list,,,TRUE,TRUE +test054,t-graph,,,TRUE,TRUE +test055,simple reorder (1),,,TRUE,TRUE +test056,simple reorder (2),,,TRUE,TRUE +test057,unnamed graph,,,FALSE,TRUE +test058,unnamed graph with blank node objects,,,FALSE,TRUE +test059,n-quads parsing,,,FALSE,TRUE +test060,n-quads escaping,,,TRUE,TRUE +test061,same literal value with multiple languages,,,TRUE,TRUE +test062,same literal value with multiple datatypes,,,TRUE,TRUE diff --git a/graph/formats/rdf/testdata/manifest.jsonld b/graph/formats/rdf/testdata/manifest.jsonld new file mode 100644 index 00000000..bf2f94af --- /dev/null +++ b/graph/formats/rdf/testdata/manifest.jsonld @@ -0,0 +1,17 @@ +{ + "@context": { + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#", + "id": "@id", + "type": "@type", + "comment": "rdfs:comment", + "include": {"@id": "mf:include", "@type": "@id", "@container": "@list"}, + "label": "rdfs:label" + }, + "id": "", + "type": "mf:Manifest", + "label": "RDF Dataset Normalization Test Cases", + "comment": "Includes manifests for different application profiles.", + "include": ["manifest-urgna2012", "manifest-urdna2015"] +} diff --git a/graph/formats/rdf/testdata/manifest.ttl b/graph/formats/rdf/testdata/manifest.ttl new file mode 100644 index 00000000..2cee143d --- /dev/null +++ b/graph/formats/rdf/testdata/manifest.ttl @@ -0,0 +1,22 @@ +## RDF Dataset Normalization tests +## Distributed under both the W3C Test Suite License[1] and the W3C 3- +## clause BSD License[2]. To contribute to a W3C Test Suite, see the +## policies and contribution forms [3] +## +## 1. http://www.w3.org/Consortium/Legal/2008/04-testsuite-license +## 2. http://www.w3.org/Consortium/Legal/2008/03-bsd-license +## 3. http://www.w3.org/2004/10/27-testcases +## +## Test types +## * rdfn:Urgna2012EvalTest - Normalization using URGNA2012 +## * rdfn:Urdna2015EvalTest - Normalization using URDNA2015 + +@prefix : <#> . +@prefix rdf: . +@prefix rdfs: . +@prefix mf: . + +<> a mf:Manifest ; + rdfs:label "RDF Dataset Normalization Test Cases" ; + rdfs:comment "Includes manifests for different application profiles." + mf:include ( ). diff --git a/graph/formats/rdf/testdata/mk_manifest.rb b/graph/formats/rdf/testdata/mk_manifest.rb new file mode 100755 index 00000000..afa994d7 --- /dev/null +++ b/graph/formats/rdf/testdata/mk_manifest.rb @@ -0,0 +1,233 @@ +#! /usr/bin/env ruby +# Parse test manifest to create driver and area-specific test manifests + +require 'getoptlong' +require 'csv' +require 'json' +require 'haml' +require 'fileutils' + +class Manifest + JSON_STATE = JSON::State.new( + :indent => " ", + :space => " ", + :space_before => "", + :object_nl => "\n", + :array_nl => "\n" + ) + + TITLE = { + urgna2012: "RDF Graph Normalization (URGNA2012)", + urdna2015: "RDF Dataset Normalization (URDNA2015)", + } + DESCRIPTION = { + urgna2012: "Tests the 2012 version of RDF Graph Normalization.", + urdna2015: "Tests the 2015 version of RDF Dataset Normalization." + } + + Test = Struct.new(:id, :name, :comment, :approval, :action, :urgna2012, :urdna2015) + + attr_accessor :tests + + def initialize + csv = CSV.new(File.open(File.expand_path("../manifest.csv", __FILE__))) + + columns = [] + csv.shift.each_with_index {|c, i| columns[i] = c.to_sym if c} + + @tests = csv.map do |line| + entry = {} + # Create entry as object indexed by symbolized column name + line.each_with_index {|v, i| entry[columns[i]] = v ? v.gsub("\r", "\n").gsub("\\", "\\\\") : nil} + + urgna2012 = "#{entry[:test]}-urgna2012.nq" if entry[:urgna2012] == "TRUE" + urdna2015 = "#{entry[:test]}-urdna2015.nq" if entry[:urdna2015] == "TRUE" + Test.new(entry[:test], entry[:name], entry[:comment], entry[:approval], + "#{entry[:test]}-in.nq", urgna2012, urdna2015) + end + end + + # Create files referenced in the manifest + def create_files + tests.each do |test| + files = [test.action, test.urgna2012, test.urdna2015].compact + files.compact.select {|f| !File.exist?(f)}.each do |f| + File.open(f, "w") {|io| io.puts( f.end_with?('.json') ? "{}" : "")} + end + end + end + + def test_class(test, variant) + case variant.to_sym + when :urgna2012 then "rdfn:Urgna2012EvalTest" + when :urdna2015 then "rdfn:Urdna2015EvalTest" + end + end + + def to_jsonld(variant) + context = ::JSON.parse %({ + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#", + "mq": "http://www.w3.org/2001/sw/DataAccess/tests/test-query#", + "rdfn": "http://json-ld.github.io/normalization/test-vocab#", + "rdft": "http://www.w3.org/ns/rdftest#", + "id": "@id", + "type": "@type", + "action": {"@id": "mf:action", "@type": "@id"}, + "approval": {"@id": "rdft:approval", "@type": "@id"}, + "comment": "rdfs:comment", + "entries": {"@id": "mf:entries", "@type": "@id", "@container": "@list"}, + "label": "rdfs:label", + "name": "mf:name", + "result": {"@id": "mf:result", "@type": "@id"} + }) + + manifest = { + "@context" => context, + "id" => "manifest-#{variant}", + "type" => "mf:Manifest", + "label" => TITLE[variant], + "comment" => DESCRIPTION[variant], + "entries" => [] + } + + tests.each do |test| + next unless test.send(variant) + + manifest["entries"] << { + "id" => "manifest-#{variant}##{test.id}", + "type" => test_class(test, variant), + "name" => test.name, + "comment" => test.comment, + "approval" => (test.approval ? "rdft:#{test.approval}" : "rdft:Proposed"), + "action" => test.action, + "result" => test.send(variant) + } + end + + manifest.to_json(JSON_STATE) + end + + def to_html + # Create vocab.html using vocab_template.haml and compacted vocabulary + template = File.read("template.haml") + manifests = TITLE.keys.inject({}) do |memo, v| + memo["manifest-#{v}"] = ::JSON.load(File.read("manifest-#{v}.jsonld")) + memo + end + + Haml::Engine.new(template, :format => :html5).render(self, + man: ::JSON.load(File.read("manifest.jsonld")), + manifests: manifests + ) + end + + def to_ttl(variant) + output = [] + output << %(## RDF Dataset Normalization tests +## Distributed under both the W3C Test Suite License[1] and the W3C 3- +## clause BSD License[2]. To contribute to a W3C Test Suite, see the +## policies and contribution forms [3] +## +## 1. http://www.w3.org/Consortium/Legal/2008/04-testsuite-license +## 2. http://www.w3.org/Consortium/Legal/2008/03-bsd-license +## 3. http://www.w3.org/2004/10/27-testcases +## +## Test types +## * rdfn:Urgna2012EvalTest - Normalization using URGNA2012 +## * rdfn:Urdna2015EvalTest - Normalization using URDNA2015 + +@prefix : . +@prefix rdf: . +@prefix rdfs: . +@prefix mf: . +@prefix rdft: . +@prefix rdfn: . + + a mf:Manifest ; +) + output << %( rdfs:label "#{TITLE[variant]}";) + output << %( rdfs:comment "#{DESCRIPTION[variant]}";) + output << %( mf:entries \() + + tests.select {|t| t.send(variant)}.map {|t| ":#{t.id}"}.each_slice(10) do |entries| + output << %( #{entries.join(' ')}) + end + output << %( \) .) + + tests.select {|t| t.send(variant)}.each do |test| + output << "" # separator + output << ":#{test.id} a #{test_class(test, variant)};" + output << %( mf:name "#{test.name}";) + output << %( rdfs:comment "#{test.comment}";) if test.comment + output << %( rdft:approval #{(test.approval ? "rdft:#{test.approval}" : "rdft:Proposed")};) + output << %( mf:action <#{test.action}>;) + output << %( mf:result <#{test.send(variant)}>;) + output << %( .) + end + output.join("\n") + end +end + +options = { + output: $stdout +} + +OPT_ARGS = [ + ["--format", "-f", GetoptLong::REQUIRED_ARGUMENT,"Output format, default #{options[:format].inspect}"], + ["--output", "-o", GetoptLong::REQUIRED_ARGUMENT,"Output to the specified file path"], + ["--quiet", GetoptLong::NO_ARGUMENT, "Supress most output other than progress indicators"], + ["--touch", GetoptLong::NO_ARGUMENT, "Create referenced files and directories if missing"], + ["--variant", GetoptLong::REQUIRED_ARGUMENT,"Test variant, 'rdf' or 'json'"], + ["--help", "-?", GetoptLong::NO_ARGUMENT, "This message"] +] +def usage + STDERR.puts %{Usage: #{$0} [options] URL ...} + width = OPT_ARGS.map do |o| + l = o.first.length + l += o[1].length + 2 if o[1].is_a?(String) + l + end.max + OPT_ARGS.each do |o| + s = " %-*s " % [width, (o[1].is_a?(String) ? "#{o[0,2].join(', ')}" : o[0])] + s += o.last + STDERR.puts s + end + exit(1) +end + +opts = GetoptLong.new(*OPT_ARGS.map {|o| o[0..-2]}) + +opts.each do |opt, arg| + case opt + when '--format' then options[:format] = arg.to_sym + when '--output' then options[:output] = File.open(arg, "w") + when '--quiet' then options[:quiet] = true + when '--touch' then options[:touch] = true + when '--variant' then options[:variant] = arg.to_sym + when '--help' then usage + end +end + +vocab = Manifest.new +vocab.create_files if options[:touch] +if options[:format] || options[:variant] + case options[:format] + when :jsonld then options[:output].puts(vocab.to_jsonld(options[:variant])) + when :ttl then options[:output].puts(vocab.to_ttl(options[:variant])) + when :html then options[:output].puts(vocab.to_html) + else STDERR.puts "Unknown format #{options[:format].inspect}" + end +else + Manifest::TITLE.keys.each do |variant| + %w(jsonld ttl).each do |format| + File.open("manifest-#{variant}.#{format}", "w") do |output| + output.puts(vocab.send("to_#{format}".to_sym, variant)) + end + end + end + File.open("index.html", "w") do |output| + output.puts(vocab.to_html) + end +end diff --git a/graph/formats/rdf/testdata/mk_vocab.rb b/graph/formats/rdf/testdata/mk_vocab.rb new file mode 100755 index 00000000..f7851fa0 --- /dev/null +++ b/graph/formats/rdf/testdata/mk_vocab.rb @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby +# Generate vocab.jsonld and vocab.html from vocab.ttl and vocab_template. +# +# Generating vocab.jsonld is equivalent to running the following: +# +# jsonld --compact --context vocab_context.jsonld --input-format ttl vocab.ttl -o vocab.jsonld +require 'linkeddata' +require 'haml' +require 'active_support' + +File.open("vocab.jsonld", "w") do |f| + r = RDF::Repository.load("vocab.ttl") + JSON::LD::API.fromRDF(r, useNativeTypes: true) do |expanded| + # Remove leading/trailing and multiple whitespace from rdf:comments + expanded.each do |o| + c = o[RDF::RDFS.comment.to_s].first['@value'] + o[RDF::RDFS.comment.to_s].first['@value'] = c.strip.gsub(/\s+/m, ' ') + end + JSON::LD::API.compact(expanded, File.open("vocab_context.jsonld")) do |compacted| + # Create vocab.jsonld + f.write(compacted.to_json(JSON::LD::JSON_STATE)) + + # Create vocab.html using vocab_template.haml and compacted vocabulary + template = File.read("vocab_template.haml") + + html = Haml::Engine.new(template, :format => :html5).render(self, + ontology: compacted['@graph'].detect {|o| o['@id'] == "http://json-ld.github.io/normalization/tests/vocab#"}, + classes: compacted['@graph'].select {|o| o['@type'] == "rdfs:Class"}.sort_by {|o| o['rdfs:label']}, + properties: compacted['@graph'].select {|o| o['@type'] == "rdf:Property"}.sort_by {|o| o['rdfs:label']} + ) + File.open("vocab.html", "w") {|fh| fh.write html} + end + end +end diff --git a/graph/formats/rdf/testdata/template.haml b/graph/formats/rdf/testdata/template.haml new file mode 100644 index 00000000..64030903 --- /dev/null +++ b/graph/formats/rdf/testdata/template.haml @@ -0,0 +1,109 @@ +!!! 5 +%html{lang: :en, prefix: "rdfn: http://json-ld.github.io/normalization/test-vocab# mf: http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# rdft: http://www.w3.org/ns/rdftest#"} + %head + %meta{"http-equiv" => "Content-Type", content: "text/html;charset=utf-8"} + %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"} + %link{rel: "stylesheet", type: "text/css", href: "https://www.w3.org/StyleSheets/TR/base"} + :css + body: {bacground-image: none;} + dl.test-detail, dl.test-options { + padding: 0.5em; + } + dl.test-detail>dt, dl.test-options>dt { + float: left; + clear: left; + text-align: right; + font-weight: bold; + color: green; + } + dl.test-detail>dt:after, dl.test-options>dt:after {content: ": "} + dl.test-detail>dd, dl.test-options>dd { + margin: 0 0 0 110px; + padding: 0 0 0.5em 0; + } + dl.test-description>dt {margin-top: 2em;} + dd {margin-left: 0;} + dd code {display: inline;} + footer {text-align: center;} + %title + = man['label'] + :css + em.rfc2119 { + text-transform: lowercase; + font-variant: small-caps; + font-style: normal; + color: #900; + } + a.testlink { + color: inherit; + text-decoration: none; + } + a.testlink:hover { + text-decoration: underline; + } + + %body{resource: man['id'], typeof: man['type']} + %p + %a{href: "http://www.w3.org/"} + %img{src: "http://www.w3.org/Icons/w3c_home", alt: "W3C", height: 48, width: 72} + %h1{property: "rdfs:label"}<= man['label'] + %p{property: "rdfs:comment"}<= man['comment'] + :markdown + This page describes RDF Dataset Normalization tests for URGNA2012 and URDNA2015 profiles. These tests are also described in [JSON-LD](manifest.jsonld) and [Turtle](manifest.ttl) formats for convenience. The manifest vocabulary is described in the [RDF Dataset Normalization Test Vocabulary](vocab.html) ([JSON-LD](vocab.jsonld), [Turtle](vocab.ttl)) and is based on the [RDF Test Vocabulary](http://www.w3.org/TR/2014/NOTE-rdf11-testcases-20140225/). + + ## General instructions for running the RDF Dataset Normalization Test suites + FIXME + + ## Contributing Tests + The test manifests and entries are built automatically from [manifest.csv](manifest.csv) using [mk_manifest.rb](mk_manifest.rb), where each row defines a combination of RDF, JSON and Validation tests for the same _action_ and implicit files. Tests may be contributed via pull request to [https://github.com/json-ld/normalization](https://github.com/json-ld/normalization) with suitable changes to the [manifest.csv](manifest.csv) and necessary _action_ and _result_ files. Tests will also be considered if a contribution is sent to [public-credentials@w3.org](mailto:public-credentials@w3.org). + + ## Distribution + Distributed under both the [W3C Test Suite License](http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) and the [W3C 3-clause BSD License](http://www.w3.org/Consortium/Legal/2008/03-bsd-license). To contribute to a W3C Test Suite, see the [policies and contribution forms](http://www.w3.org/2004/10/27-testcases). + + ## Disclaimer + UNDER BOTH MUTUALLY EXCLUSIVE LICENSES, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF. + + %section.contents + %h2="Contents" + %ol + - manifests.each do |id, man| + %li + %a{href: "##{id}"}<=man['label'] + = "– #{man['entries'].count} entries" + - manifests.each do |id, man| + %section{id: id, property: "mf:entry", inlist: true, resource: id, typeof: man['type']} + %h2<= "#{man['label']} (#{man['entries'].count} entries)" + %p{property: "rdfs:comment"}<= man['comment'] + %p + - if id =~/urgna2012/ + Instructions specific to running URGNA2012 tests. + - elsif id =~ /urdna2016/ + Instructions specific to running URDNA2015 tests. + %dl.test-description + - man['entries'].each do |test| + %dt{id: test['id']} + %a.testlink{href: "##{test['id']}"} + = "#{test['id']}:" + %span{about: test['id'], property: "mf:name"}<~test['name'] + %dd{property: "mf:entry", inlist: true, resource: test['id'], typeof: test['type']} + %div{property: "rdfs:comment"} + :markdown + #{test['comment'].to_s.gsub(/(MUST|MUST NOT|SHOULD|SHOULD NOT|MAY)/, '\\1')} + %dl.test-detail + %dt="type" + %dd<~test['type'] + %dt="approval" + %dd{property: "mf:approval", resource: test['approval']}<~test['approval'] + - if test['action'] + %dt="action" + %dd + %a{property: "mf:action", href: test['action']}<~test['action'] + - if test['result'] + %dt="result" + %dd + %a{property: "mf:result", href: test['result']}<~test['result'] + + %footer + :markdown + [Copyright ©](http://www.w3.org/Consortium/Legal/ipr-notice#Copyright) 2015 [W3C](http://www.w3.org/)® ([MIT](http://www.csail.mit.edu/), [ERCIM](http://www.ercim.org/), [Keio](http://www.keio.ac.jp/), [Beihang](http://ev.buaa.edu.cn/)). W3C® [liability](http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer), [trademark](http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks) and [document use](http://www.w3.org/Consortium/Legal/copyright-documents) rules apply. diff --git a/graph/formats/rdf/testdata/test001-urdna2015.nq b/graph/formats/rdf/testdata/test001-urdna2015.nq new file mode 100644 index 00000000..e69de29b diff --git a/graph/formats/rdf/testdata/test001-urgna2012.nq b/graph/formats/rdf/testdata/test001-urgna2012.nq new file mode 100644 index 00000000..e69de29b diff --git a/graph/formats/rdf/testdata/test002-urdna2015.nq b/graph/formats/rdf/testdata/test002-urdna2015.nq new file mode 100644 index 00000000..529056c8 --- /dev/null +++ b/graph/formats/rdf/testdata/test002-urdna2015.nq @@ -0,0 +1 @@ + . diff --git a/graph/formats/rdf/testdata/test002-urgna2012.nq b/graph/formats/rdf/testdata/test002-urgna2012.nq new file mode 100644 index 00000000..529056c8 --- /dev/null +++ b/graph/formats/rdf/testdata/test002-urgna2012.nq @@ -0,0 +1 @@ + . diff --git a/graph/formats/rdf/testdata/test003-urdna2015.nq b/graph/formats/rdf/testdata/test003-urdna2015.nq new file mode 100644 index 00000000..5ca44444 --- /dev/null +++ b/graph/formats/rdf/testdata/test003-urdna2015.nq @@ -0,0 +1 @@ +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test003-urgna2012.nq b/graph/formats/rdf/testdata/test003-urgna2012.nq new file mode 100644 index 00000000..5ca44444 --- /dev/null +++ b/graph/formats/rdf/testdata/test003-urgna2012.nq @@ -0,0 +1 @@ +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test004-urdna2015.nq b/graph/formats/rdf/testdata/test004-urdna2015.nq new file mode 100644 index 00000000..b8bc8314 --- /dev/null +++ b/graph/formats/rdf/testdata/test004-urdna2015.nq @@ -0,0 +1,2 @@ +_:c14n0 . +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test004-urgna2012.nq b/graph/formats/rdf/testdata/test004-urgna2012.nq new file mode 100644 index 00000000..b8bc8314 --- /dev/null +++ b/graph/formats/rdf/testdata/test004-urgna2012.nq @@ -0,0 +1,2 @@ +_:c14n0 . +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test005-urdna2015.nq b/graph/formats/rdf/testdata/test005-urdna2015.nq new file mode 100644 index 00000000..695c23d2 --- /dev/null +++ b/graph/formats/rdf/testdata/test005-urdna2015.nq @@ -0,0 +1,3 @@ + _:c14n0 . + . +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test005-urgna2012.nq b/graph/formats/rdf/testdata/test005-urgna2012.nq new file mode 100644 index 00000000..695c23d2 --- /dev/null +++ b/graph/formats/rdf/testdata/test005-urgna2012.nq @@ -0,0 +1,3 @@ + _:c14n0 . + . +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test006-urdna2015.nq b/graph/formats/rdf/testdata/test006-urdna2015.nq new file mode 100644 index 00000000..6fdd06dc --- /dev/null +++ b/graph/formats/rdf/testdata/test006-urdna2015.nq @@ -0,0 +1,2 @@ + . + . diff --git a/graph/formats/rdf/testdata/test006-urgna2012.nq b/graph/formats/rdf/testdata/test006-urgna2012.nq new file mode 100644 index 00000000..6fdd06dc --- /dev/null +++ b/graph/formats/rdf/testdata/test006-urgna2012.nq @@ -0,0 +1,2 @@ + . + . diff --git a/graph/formats/rdf/testdata/test007-urdna2015.nq b/graph/formats/rdf/testdata/test007-urdna2015.nq new file mode 100644 index 00000000..95da1839 --- /dev/null +++ b/graph/formats/rdf/testdata/test007-urdna2015.nq @@ -0,0 +1,2 @@ + . + . diff --git a/graph/formats/rdf/testdata/test007-urgna2012.nq b/graph/formats/rdf/testdata/test007-urgna2012.nq new file mode 100644 index 00000000..95da1839 --- /dev/null +++ b/graph/formats/rdf/testdata/test007-urgna2012.nq @@ -0,0 +1,2 @@ + . + . diff --git a/graph/formats/rdf/testdata/test008-urdna2015.nq b/graph/formats/rdf/testdata/test008-urdna2015.nq new file mode 100644 index 00000000..4f30f5e4 --- /dev/null +++ b/graph/formats/rdf/testdata/test008-urdna2015.nq @@ -0,0 +1,6 @@ + . + "Writer" . + "My Book" . + "Fun" . + "Chapter One" . + . diff --git a/graph/formats/rdf/testdata/test008-urgna2012.nq b/graph/formats/rdf/testdata/test008-urgna2012.nq new file mode 100644 index 00000000..4f30f5e4 --- /dev/null +++ b/graph/formats/rdf/testdata/test008-urgna2012.nq @@ -0,0 +1,6 @@ + . + "Writer" . + "My Book" . + "Fun" . + "Chapter One" . + . diff --git a/graph/formats/rdf/testdata/test009-urdna2015.nq b/graph/formats/rdf/testdata/test009-urdna2015.nq new file mode 100644 index 00000000..1c8d94af --- /dev/null +++ b/graph/formats/rdf/testdata/test009-urdna2015.nq @@ -0,0 +1,9 @@ + . + "Writer" . + "My Book" . + "Fun" . + "Chapter One" . + . + "Jane" . + "John" . + . diff --git a/graph/formats/rdf/testdata/test009-urgna2012.nq b/graph/formats/rdf/testdata/test009-urgna2012.nq new file mode 100644 index 00000000..1c8d94af --- /dev/null +++ b/graph/formats/rdf/testdata/test009-urgna2012.nq @@ -0,0 +1,9 @@ + . + "Writer" . + "My Book" . + "Fun" . + "Chapter One" . + . + "Jane" . + "John" . + . diff --git a/graph/formats/rdf/testdata/test010-urdna2015.nq b/graph/formats/rdf/testdata/test010-urdna2015.nq new file mode 100644 index 00000000..dfcde95a --- /dev/null +++ b/graph/formats/rdf/testdata/test010-urdna2015.nq @@ -0,0 +1 @@ + "2011-01-25T00:00:00+00:00"^^ . diff --git a/graph/formats/rdf/testdata/test010-urgna2012.nq b/graph/formats/rdf/testdata/test010-urgna2012.nq new file mode 100644 index 00000000..dfcde95a --- /dev/null +++ b/graph/formats/rdf/testdata/test010-urgna2012.nq @@ -0,0 +1 @@ + "2011-01-25T00:00:00+00:00"^^ . diff --git a/graph/formats/rdf/testdata/test011-urdna2015.nq b/graph/formats/rdf/testdata/test011-urdna2015.nq new file mode 100644 index 00000000..aeac7ab0 --- /dev/null +++ b/graph/formats/rdf/testdata/test011-urdna2015.nq @@ -0,0 +1 @@ + "2011-01-25T00:00:00Z"^^ . diff --git a/graph/formats/rdf/testdata/test011-urgna2012.nq b/graph/formats/rdf/testdata/test011-urgna2012.nq new file mode 100644 index 00000000..aeac7ab0 --- /dev/null +++ b/graph/formats/rdf/testdata/test011-urgna2012.nq @@ -0,0 +1 @@ + "2011-01-25T00:00:00Z"^^ . diff --git a/graph/formats/rdf/testdata/test012-urdna2015.nq b/graph/formats/rdf/testdata/test012-urdna2015.nq new file mode 100644 index 00000000..e542c9fa --- /dev/null +++ b/graph/formats/rdf/testdata/test012-urdna2015.nq @@ -0,0 +1 @@ + "2011-01-25T00:00:00Z"^^ . diff --git a/graph/formats/rdf/testdata/test012-urgna2012.nq b/graph/formats/rdf/testdata/test012-urgna2012.nq new file mode 100644 index 00000000..e542c9fa --- /dev/null +++ b/graph/formats/rdf/testdata/test012-urgna2012.nq @@ -0,0 +1 @@ + "2011-01-25T00:00:00Z"^^ . diff --git a/graph/formats/rdf/testdata/test013-urdna2015.nq b/graph/formats/rdf/testdata/test013-urdna2015.nq new file mode 100644 index 00000000..5f833b1d --- /dev/null +++ b/graph/formats/rdf/testdata/test013-urdna2015.nq @@ -0,0 +1,3 @@ + "2011-01-25T00:00:00Z"^^ . + . + . diff --git a/graph/formats/rdf/testdata/test013-urgna2012.nq b/graph/formats/rdf/testdata/test013-urgna2012.nq new file mode 100644 index 00000000..5f833b1d --- /dev/null +++ b/graph/formats/rdf/testdata/test013-urgna2012.nq @@ -0,0 +1,3 @@ + "2011-01-25T00:00:00Z"^^ . + . + . diff --git a/graph/formats/rdf/testdata/test014-urdna2015.nq b/graph/formats/rdf/testdata/test014-urdna2015.nq new file mode 100644 index 00000000..01da6612 --- /dev/null +++ b/graph/formats/rdf/testdata/test014-urdna2015.nq @@ -0,0 +1,3 @@ + "true"^^ . + "1.23E0"^^ . + "123"^^ . diff --git a/graph/formats/rdf/testdata/test014-urgna2012.nq b/graph/formats/rdf/testdata/test014-urgna2012.nq new file mode 100644 index 00000000..01da6612 --- /dev/null +++ b/graph/formats/rdf/testdata/test014-urgna2012.nq @@ -0,0 +1,3 @@ + "true"^^ . + "1.23E0"^^ . + "123"^^ . diff --git a/graph/formats/rdf/testdata/test015-urdna2015.nq b/graph/formats/rdf/testdata/test015-urdna2015.nq new file mode 100644 index 00000000..e69de29b diff --git a/graph/formats/rdf/testdata/test015-urgna2012.nq b/graph/formats/rdf/testdata/test015-urgna2012.nq new file mode 100644 index 00000000..e69de29b diff --git a/graph/formats/rdf/testdata/test016-urdna2015.nq b/graph/formats/rdf/testdata/test016-urdna2015.nq new file mode 100644 index 00000000..7ea86396 --- /dev/null +++ b/graph/formats/rdf/testdata/test016-urdna2015.nq @@ -0,0 +1,3 @@ + _:c14n0 . + _:c14n0 . + _:c14n0 . diff --git a/graph/formats/rdf/testdata/test016-urgna2012.nq b/graph/formats/rdf/testdata/test016-urgna2012.nq new file mode 100644 index 00000000..7ea86396 --- /dev/null +++ b/graph/formats/rdf/testdata/test016-urgna2012.nq @@ -0,0 +1,3 @@ + _:c14n0 . + _:c14n0 . + _:c14n0 . diff --git a/graph/formats/rdf/testdata/test017-urdna2015.nq b/graph/formats/rdf/testdata/test017-urdna2015.nq new file mode 100644 index 00000000..28a87ed6 --- /dev/null +++ b/graph/formats/rdf/testdata/test017-urdna2015.nq @@ -0,0 +1,2 @@ + _:c14n0 . + _:c14n0 . diff --git a/graph/formats/rdf/testdata/test017-urgna2012.nq b/graph/formats/rdf/testdata/test017-urgna2012.nq new file mode 100644 index 00000000..28a87ed6 --- /dev/null +++ b/graph/formats/rdf/testdata/test017-urgna2012.nq @@ -0,0 +1,2 @@ + _:c14n0 . + _:c14n0 . diff --git a/graph/formats/rdf/testdata/test018-urdna2015.nq b/graph/formats/rdf/testdata/test018-urdna2015.nq new file mode 100644 index 00000000..a01a73a1 --- /dev/null +++ b/graph/formats/rdf/testdata/test018-urdna2015.nq @@ -0,0 +1 @@ +_:c14n0 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test018-urgna2012.nq b/graph/formats/rdf/testdata/test018-urgna2012.nq new file mode 100644 index 00000000..a01a73a1 --- /dev/null +++ b/graph/formats/rdf/testdata/test018-urgna2012.nq @@ -0,0 +1 @@ +_:c14n0 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test019-urdna2015.nq b/graph/formats/rdf/testdata/test019-urdna2015.nq new file mode 100644 index 00000000..b617fa70 --- /dev/null +++ b/graph/formats/rdf/testdata/test019-urdna2015.nq @@ -0,0 +1,2 @@ +_:c14n0 _:c14n0 . +_:c14n1 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test019-urgna2012.nq b/graph/formats/rdf/testdata/test019-urgna2012.nq new file mode 100644 index 00000000..b617fa70 --- /dev/null +++ b/graph/formats/rdf/testdata/test019-urgna2012.nq @@ -0,0 +1,2 @@ +_:c14n0 _:c14n0 . +_:c14n1 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test020-urdna2015.nq b/graph/formats/rdf/testdata/test020-urdna2015.nq new file mode 100644 index 00000000..97e8e41c --- /dev/null +++ b/graph/formats/rdf/testdata/test020-urdna2015.nq @@ -0,0 +1,4 @@ + _:c14n2 . + _:c14n0 . +_:c14n0 _:c14n1 . +_:c14n2 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test020-urgna2012.nq b/graph/formats/rdf/testdata/test020-urgna2012.nq new file mode 100644 index 00000000..66ac3f5e --- /dev/null +++ b/graph/formats/rdf/testdata/test020-urgna2012.nq @@ -0,0 +1,4 @@ + _:c14n2 . + _:c14n1 . +_:c14n1 _:c14n0 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test021-urdna2015.nq b/graph/formats/rdf/testdata/test021-urdna2015.nq new file mode 100644 index 00000000..d67d3872 --- /dev/null +++ b/graph/formats/rdf/testdata/test021-urdna2015.nq @@ -0,0 +1,2 @@ +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test021-urgna2012.nq b/graph/formats/rdf/testdata/test021-urgna2012.nq new file mode 100644 index 00000000..d67d3872 --- /dev/null +++ b/graph/formats/rdf/testdata/test021-urgna2012.nq @@ -0,0 +1,2 @@ +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test022-urdna2015.nq b/graph/formats/rdf/testdata/test022-urdna2015.nq new file mode 100644 index 00000000..725618a5 --- /dev/null +++ b/graph/formats/rdf/testdata/test022-urdna2015.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test022-urgna2012.nq b/graph/formats/rdf/testdata/test022-urgna2012.nq new file mode 100644 index 00000000..725618a5 --- /dev/null +++ b/graph/formats/rdf/testdata/test022-urgna2012.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test023-urdna2015.nq b/graph/formats/rdf/testdata/test023-urdna2015.nq new file mode 100644 index 00000000..f19adb63 --- /dev/null +++ b/graph/formats/rdf/testdata/test023-urdna2015.nq @@ -0,0 +1,3 @@ +_:c14n0 _:c14n1 . +_:c14n1 _:c14n2 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test023-urgna2012.nq b/graph/formats/rdf/testdata/test023-urgna2012.nq new file mode 100644 index 00000000..cbf821d0 --- /dev/null +++ b/graph/formats/rdf/testdata/test023-urgna2012.nq @@ -0,0 +1,3 @@ +_:c14n0 _:c14n2 . +_:c14n1 _:c14n0 . +_:c14n2 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test024-urdna2015.nq b/graph/formats/rdf/testdata/test024-urdna2015.nq new file mode 100644 index 00000000..a5f88784 --- /dev/null +++ b/graph/formats/rdf/testdata/test024-urdna2015.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n2 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n2 . +_:c14n2 _:c14n1 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test024-urgna2012.nq b/graph/formats/rdf/testdata/test024-urgna2012.nq new file mode 100644 index 00000000..6a6bf240 --- /dev/null +++ b/graph/formats/rdf/testdata/test024-urgna2012.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n1 _:c14n2 . +_:c14n1 _:c14n0 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test025-urdna2015.nq b/graph/formats/rdf/testdata/test025-urdna2015.nq new file mode 100644 index 00000000..a5f88784 --- /dev/null +++ b/graph/formats/rdf/testdata/test025-urdna2015.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n2 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n2 . +_:c14n2 _:c14n1 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test025-urgna2012.nq b/graph/formats/rdf/testdata/test025-urgna2012.nq new file mode 100644 index 00000000..6a6bf240 --- /dev/null +++ b/graph/formats/rdf/testdata/test025-urgna2012.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n1 _:c14n2 . +_:c14n1 _:c14n0 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test026-urdna2015.nq b/graph/formats/rdf/testdata/test026-urdna2015.nq new file mode 100644 index 00000000..a5f88784 --- /dev/null +++ b/graph/formats/rdf/testdata/test026-urdna2015.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n2 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n2 . +_:c14n2 _:c14n1 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test026-urgna2012.nq b/graph/formats/rdf/testdata/test026-urgna2012.nq new file mode 100644 index 00000000..6a6bf240 --- /dev/null +++ b/graph/formats/rdf/testdata/test026-urgna2012.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n1 _:c14n2 . +_:c14n1 _:c14n0 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test027-urdna2015.nq b/graph/formats/rdf/testdata/test027-urdna2015.nq new file mode 100644 index 00000000..a5f88784 --- /dev/null +++ b/graph/formats/rdf/testdata/test027-urdna2015.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n2 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n2 . +_:c14n2 _:c14n1 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test027-urgna2012.nq b/graph/formats/rdf/testdata/test027-urgna2012.nq new file mode 100644 index 00000000..6a6bf240 --- /dev/null +++ b/graph/formats/rdf/testdata/test027-urgna2012.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n1 _:c14n2 . +_:c14n1 _:c14n0 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test028-urdna2015.nq b/graph/formats/rdf/testdata/test028-urdna2015.nq new file mode 100644 index 00000000..a5f88784 --- /dev/null +++ b/graph/formats/rdf/testdata/test028-urdna2015.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n2 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n2 . +_:c14n2 _:c14n1 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test028-urgna2012.nq b/graph/formats/rdf/testdata/test028-urgna2012.nq new file mode 100644 index 00000000..6a6bf240 --- /dev/null +++ b/graph/formats/rdf/testdata/test028-urgna2012.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n1 _:c14n2 . +_:c14n1 _:c14n0 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test029-urdna2015.nq b/graph/formats/rdf/testdata/test029-urdna2015.nq new file mode 100644 index 00000000..a5f88784 --- /dev/null +++ b/graph/formats/rdf/testdata/test029-urdna2015.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n2 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n2 . +_:c14n2 _:c14n1 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test029-urgna2012.nq b/graph/formats/rdf/testdata/test029-urgna2012.nq new file mode 100644 index 00000000..6a6bf240 --- /dev/null +++ b/graph/formats/rdf/testdata/test029-urgna2012.nq @@ -0,0 +1,6 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n1 _:c14n2 . +_:c14n1 _:c14n0 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test030-urdna2015.nq b/graph/formats/rdf/testdata/test030-urdna2015.nq new file mode 100644 index 00000000..d38524a9 --- /dev/null +++ b/graph/formats/rdf/testdata/test030-urdna2015.nq @@ -0,0 +1,6 @@ + _:c14n0 . + _:c14n1 . + _:c14n2 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n2 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test030-urgna2012.nq b/graph/formats/rdf/testdata/test030-urgna2012.nq new file mode 100644 index 00000000..554c7d8e --- /dev/null +++ b/graph/formats/rdf/testdata/test030-urgna2012.nq @@ -0,0 +1,6 @@ + _:c14n1 . + _:c14n2 . + _:c14n0 . +_:c14n0 _:c14n1 . +_:c14n1 _:c14n2 . +_:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test031-urdna2015.nq b/graph/formats/rdf/testdata/test031-urdna2015.nq new file mode 100644 index 00000000..5ca44444 --- /dev/null +++ b/graph/formats/rdf/testdata/test031-urdna2015.nq @@ -0,0 +1 @@ +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test031-urgna2012.nq b/graph/formats/rdf/testdata/test031-urgna2012.nq new file mode 100644 index 00000000..5ca44444 --- /dev/null +++ b/graph/formats/rdf/testdata/test031-urgna2012.nq @@ -0,0 +1 @@ +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test032-urdna2015.nq b/graph/formats/rdf/testdata/test032-urdna2015.nq new file mode 100644 index 00000000..5ca44444 --- /dev/null +++ b/graph/formats/rdf/testdata/test032-urdna2015.nq @@ -0,0 +1 @@ +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test032-urgna2012.nq b/graph/formats/rdf/testdata/test032-urgna2012.nq new file mode 100644 index 00000000..5ca44444 --- /dev/null +++ b/graph/formats/rdf/testdata/test032-urgna2012.nq @@ -0,0 +1 @@ +_:c14n0 . diff --git a/graph/formats/rdf/testdata/test033-urdna2015.nq b/graph/formats/rdf/testdata/test033-urdna2015.nq new file mode 100644 index 00000000..31a84caf --- /dev/null +++ b/graph/formats/rdf/testdata/test033-urdna2015.nq @@ -0,0 +1,2 @@ +_:c14n0 _:c14n1 . +_:c14n2 _:c14n3 . diff --git a/graph/formats/rdf/testdata/test033-urgna2012.nq b/graph/formats/rdf/testdata/test033-urgna2012.nq new file mode 100644 index 00000000..623996c5 --- /dev/null +++ b/graph/formats/rdf/testdata/test033-urgna2012.nq @@ -0,0 +1,2 @@ +_:c14n1 _:c14n0 . +_:c14n3 _:c14n2 . diff --git a/graph/formats/rdf/testdata/test034-urdna2015.nq b/graph/formats/rdf/testdata/test034-urdna2015.nq new file mode 100644 index 00000000..31a84caf --- /dev/null +++ b/graph/formats/rdf/testdata/test034-urdna2015.nq @@ -0,0 +1,2 @@ +_:c14n0 _:c14n1 . +_:c14n2 _:c14n3 . diff --git a/graph/formats/rdf/testdata/test034-urgna2012.nq b/graph/formats/rdf/testdata/test034-urgna2012.nq new file mode 100644 index 00000000..623996c5 --- /dev/null +++ b/graph/formats/rdf/testdata/test034-urgna2012.nq @@ -0,0 +1,2 @@ +_:c14n1 _:c14n0 . +_:c14n3 _:c14n2 . diff --git a/graph/formats/rdf/testdata/test035-urdna2015.nq b/graph/formats/rdf/testdata/test035-urdna2015.nq new file mode 100644 index 00000000..eb561bf6 --- /dev/null +++ b/graph/formats/rdf/testdata/test035-urdna2015.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n1 "Foo" . +_:c14n2 _:c14n3 . +_:c14n3 "Foo" . diff --git a/graph/formats/rdf/testdata/test035-urgna2012.nq b/graph/formats/rdf/testdata/test035-urgna2012.nq new file mode 100644 index 00000000..eb561bf6 --- /dev/null +++ b/graph/formats/rdf/testdata/test035-urgna2012.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n1 "Foo" . +_:c14n2 _:c14n3 . +_:c14n3 "Foo" . diff --git a/graph/formats/rdf/testdata/test036-urdna2015.nq b/graph/formats/rdf/testdata/test036-urdna2015.nq new file mode 100644 index 00000000..eb561bf6 --- /dev/null +++ b/graph/formats/rdf/testdata/test036-urdna2015.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n1 "Foo" . +_:c14n2 _:c14n3 . +_:c14n3 "Foo" . diff --git a/graph/formats/rdf/testdata/test036-urgna2012.nq b/graph/formats/rdf/testdata/test036-urgna2012.nq new file mode 100644 index 00000000..eb561bf6 --- /dev/null +++ b/graph/formats/rdf/testdata/test036-urgna2012.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n1 "Foo" . +_:c14n2 _:c14n3 . +_:c14n3 "Foo" . diff --git a/graph/formats/rdf/testdata/test037-urdna2015.nq b/graph/formats/rdf/testdata/test037-urdna2015.nq new file mode 100644 index 00000000..eb561bf6 --- /dev/null +++ b/graph/formats/rdf/testdata/test037-urdna2015.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n1 "Foo" . +_:c14n2 _:c14n3 . +_:c14n3 "Foo" . diff --git a/graph/formats/rdf/testdata/test037-urgna2012.nq b/graph/formats/rdf/testdata/test037-urgna2012.nq new file mode 100644 index 00000000..eb561bf6 --- /dev/null +++ b/graph/formats/rdf/testdata/test037-urgna2012.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n1 "Foo" . +_:c14n2 _:c14n3 . +_:c14n3 "Foo" . diff --git a/graph/formats/rdf/testdata/test038-urdna2015.nq b/graph/formats/rdf/testdata/test038-urdna2015.nq new file mode 100644 index 00000000..70a3eb46 --- /dev/null +++ b/graph/formats/rdf/testdata/test038-urdna2015.nq @@ -0,0 +1,3 @@ +_:c14n0 _:c14n2 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n3 . diff --git a/graph/formats/rdf/testdata/test038-urgna2012.nq b/graph/formats/rdf/testdata/test038-urgna2012.nq new file mode 100644 index 00000000..b29dc042 --- /dev/null +++ b/graph/formats/rdf/testdata/test038-urgna2012.nq @@ -0,0 +1,3 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n1 _:c14n3 . diff --git a/graph/formats/rdf/testdata/test039-urdna2015.nq b/graph/formats/rdf/testdata/test039-urdna2015.nq new file mode 100644 index 00000000..70a3eb46 --- /dev/null +++ b/graph/formats/rdf/testdata/test039-urdna2015.nq @@ -0,0 +1,3 @@ +_:c14n0 _:c14n2 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n3 . diff --git a/graph/formats/rdf/testdata/test039-urgna2012.nq b/graph/formats/rdf/testdata/test039-urgna2012.nq new file mode 100644 index 00000000..b29dc042 --- /dev/null +++ b/graph/formats/rdf/testdata/test039-urgna2012.nq @@ -0,0 +1,3 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n1 _:c14n3 . diff --git a/graph/formats/rdf/testdata/test040-urdna2015.nq b/graph/formats/rdf/testdata/test040-urdna2015.nq new file mode 100644 index 00000000..3f3ac7db --- /dev/null +++ b/graph/formats/rdf/testdata/test040-urdna2015.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n1 _:c14n2 . +_:c14n3 _:c14n4 . +_:c14n4 _:c14n5 . diff --git a/graph/formats/rdf/testdata/test040-urgna2012.nq b/graph/formats/rdf/testdata/test040-urgna2012.nq new file mode 100644 index 00000000..69da9716 --- /dev/null +++ b/graph/formats/rdf/testdata/test040-urgna2012.nq @@ -0,0 +1,4 @@ +_:c14n1 _:c14n0 . +_:c14n2 _:c14n1 . +_:c14n4 _:c14n3 . +_:c14n5 _:c14n4 . diff --git a/graph/formats/rdf/testdata/test041-urdna2015.nq b/graph/formats/rdf/testdata/test041-urdna2015.nq new file mode 100644 index 00000000..3f3ac7db --- /dev/null +++ b/graph/formats/rdf/testdata/test041-urdna2015.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n1 _:c14n2 . +_:c14n3 _:c14n4 . +_:c14n4 _:c14n5 . diff --git a/graph/formats/rdf/testdata/test041-urgna2012.nq b/graph/formats/rdf/testdata/test041-urgna2012.nq new file mode 100644 index 00000000..69da9716 --- /dev/null +++ b/graph/formats/rdf/testdata/test041-urgna2012.nq @@ -0,0 +1,4 @@ +_:c14n1 _:c14n0 . +_:c14n2 _:c14n1 . +_:c14n4 _:c14n3 . +_:c14n5 _:c14n4 . diff --git a/graph/formats/rdf/testdata/test042-urdna2015.nq b/graph/formats/rdf/testdata/test042-urdna2015.nq new file mode 100644 index 00000000..3f3ac7db --- /dev/null +++ b/graph/formats/rdf/testdata/test042-urdna2015.nq @@ -0,0 +1,4 @@ +_:c14n0 _:c14n1 . +_:c14n1 _:c14n2 . +_:c14n3 _:c14n4 . +_:c14n4 _:c14n5 . diff --git a/graph/formats/rdf/testdata/test042-urgna2012.nq b/graph/formats/rdf/testdata/test042-urgna2012.nq new file mode 100644 index 00000000..69da9716 --- /dev/null +++ b/graph/formats/rdf/testdata/test042-urgna2012.nq @@ -0,0 +1,4 @@ +_:c14n1 _:c14n0 . +_:c14n2 _:c14n1 . +_:c14n4 _:c14n3 . +_:c14n5 _:c14n4 . diff --git a/graph/formats/rdf/testdata/test043-urdna2015.nq b/graph/formats/rdf/testdata/test043-urdna2015.nq new file mode 100644 index 00000000..09d5dc2e --- /dev/null +++ b/graph/formats/rdf/testdata/test043-urdna2015.nq @@ -0,0 +1 @@ + "test"@en . diff --git a/graph/formats/rdf/testdata/test043-urgna2012.nq b/graph/formats/rdf/testdata/test043-urgna2012.nq new file mode 100644 index 00000000..09d5dc2e --- /dev/null +++ b/graph/formats/rdf/testdata/test043-urgna2012.nq @@ -0,0 +1 @@ + "test"@en . diff --git a/graph/formats/rdf/testdata/test044-urdna2015.nq b/graph/formats/rdf/testdata/test044-urdna2015.nq new file mode 100644 index 00000000..07ba4ca5 --- /dev/null +++ b/graph/formats/rdf/testdata/test044-urdna2015.nq @@ -0,0 +1,36 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n0 _:c14n3 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n4 . +_:c14n1 _:c14n5 . +_:c14n10 _:c14n7 . +_:c14n10 _:c14n8 . +_:c14n10 _:c14n9 . +_:c14n11 _:c14n7 . +_:c14n11 _:c14n8 . +_:c14n11 _:c14n9 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n3 . +_:c14n2 _:c14n5 . +_:c14n3 _:c14n0 . +_:c14n3 _:c14n2 . +_:c14n3 _:c14n4 . +_:c14n4 _:c14n1 . +_:c14n4 _:c14n3 . +_:c14n4 _:c14n5 . +_:c14n5 _:c14n1 . +_:c14n5 _:c14n2 . +_:c14n5 _:c14n4 . +_:c14n6 _:c14n7 . +_:c14n6 _:c14n8 . +_:c14n6 _:c14n9 . +_:c14n7 _:c14n10 . +_:c14n7 _:c14n11 . +_:c14n7 _:c14n6 . +_:c14n8 _:c14n10 . +_:c14n8 _:c14n11 . +_:c14n8 _:c14n6 . +_:c14n9 _:c14n10 . +_:c14n9 _:c14n11 . +_:c14n9 _:c14n6 . diff --git a/graph/formats/rdf/testdata/test044-urgna2012.nq b/graph/formats/rdf/testdata/test044-urgna2012.nq new file mode 100644 index 00000000..540d3aa0 --- /dev/null +++ b/graph/formats/rdf/testdata/test044-urgna2012.nq @@ -0,0 +1,36 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n0 _:c14n3 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n4 . +_:c14n1 _:c14n5 . +_:c14n10 _:c14n11 . +_:c14n10 _:c14n7 . +_:c14n10 _:c14n9 . +_:c14n11 _:c14n10 . +_:c14n11 _:c14n8 . +_:c14n11 _:c14n9 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n4 . +_:c14n2 _:c14n5 . +_:c14n3 _:c14n0 . +_:c14n3 _:c14n4 . +_:c14n3 _:c14n5 . +_:c14n4 _:c14n1 . +_:c14n4 _:c14n2 . +_:c14n4 _:c14n3 . +_:c14n5 _:c14n1 . +_:c14n5 _:c14n2 . +_:c14n5 _:c14n3 . +_:c14n6 _:c14n7 . +_:c14n6 _:c14n8 . +_:c14n6 _:c14n9 . +_:c14n7 _:c14n10 . +_:c14n7 _:c14n6 . +_:c14n7 _:c14n8 . +_:c14n8 _:c14n11 . +_:c14n8 _:c14n6 . +_:c14n8 _:c14n7 . +_:c14n9 _:c14n10 . +_:c14n9 _:c14n11 . +_:c14n9 _:c14n6 . diff --git a/graph/formats/rdf/testdata/test045-urdna2015.nq b/graph/formats/rdf/testdata/test045-urdna2015.nq new file mode 100644 index 00000000..07ba4ca5 --- /dev/null +++ b/graph/formats/rdf/testdata/test045-urdna2015.nq @@ -0,0 +1,36 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n0 _:c14n3 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n4 . +_:c14n1 _:c14n5 . +_:c14n10 _:c14n7 . +_:c14n10 _:c14n8 . +_:c14n10 _:c14n9 . +_:c14n11 _:c14n7 . +_:c14n11 _:c14n8 . +_:c14n11 _:c14n9 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n3 . +_:c14n2 _:c14n5 . +_:c14n3 _:c14n0 . +_:c14n3 _:c14n2 . +_:c14n3 _:c14n4 . +_:c14n4 _:c14n1 . +_:c14n4 _:c14n3 . +_:c14n4 _:c14n5 . +_:c14n5 _:c14n1 . +_:c14n5 _:c14n2 . +_:c14n5 _:c14n4 . +_:c14n6 _:c14n7 . +_:c14n6 _:c14n8 . +_:c14n6 _:c14n9 . +_:c14n7 _:c14n10 . +_:c14n7 _:c14n11 . +_:c14n7 _:c14n6 . +_:c14n8 _:c14n10 . +_:c14n8 _:c14n11 . +_:c14n8 _:c14n6 . +_:c14n9 _:c14n10 . +_:c14n9 _:c14n11 . +_:c14n9 _:c14n6 . diff --git a/graph/formats/rdf/testdata/test045-urgna2012.nq b/graph/formats/rdf/testdata/test045-urgna2012.nq new file mode 100644 index 00000000..540d3aa0 --- /dev/null +++ b/graph/formats/rdf/testdata/test045-urgna2012.nq @@ -0,0 +1,36 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n0 _:c14n3 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n4 . +_:c14n1 _:c14n5 . +_:c14n10 _:c14n11 . +_:c14n10 _:c14n7 . +_:c14n10 _:c14n9 . +_:c14n11 _:c14n10 . +_:c14n11 _:c14n8 . +_:c14n11 _:c14n9 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n4 . +_:c14n2 _:c14n5 . +_:c14n3 _:c14n0 . +_:c14n3 _:c14n4 . +_:c14n3 _:c14n5 . +_:c14n4 _:c14n1 . +_:c14n4 _:c14n2 . +_:c14n4 _:c14n3 . +_:c14n5 _:c14n1 . +_:c14n5 _:c14n2 . +_:c14n5 _:c14n3 . +_:c14n6 _:c14n7 . +_:c14n6 _:c14n8 . +_:c14n6 _:c14n9 . +_:c14n7 _:c14n10 . +_:c14n7 _:c14n6 . +_:c14n7 _:c14n8 . +_:c14n8 _:c14n11 . +_:c14n8 _:c14n6 . +_:c14n8 _:c14n7 . +_:c14n9 _:c14n10 . +_:c14n9 _:c14n11 . +_:c14n9 _:c14n6 . diff --git a/graph/formats/rdf/testdata/test046-urdna2015.nq b/graph/formats/rdf/testdata/test046-urdna2015.nq new file mode 100644 index 00000000..07ba4ca5 --- /dev/null +++ b/graph/formats/rdf/testdata/test046-urdna2015.nq @@ -0,0 +1,36 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n0 _:c14n3 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n4 . +_:c14n1 _:c14n5 . +_:c14n10 _:c14n7 . +_:c14n10 _:c14n8 . +_:c14n10 _:c14n9 . +_:c14n11 _:c14n7 . +_:c14n11 _:c14n8 . +_:c14n11 _:c14n9 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n3 . +_:c14n2 _:c14n5 . +_:c14n3 _:c14n0 . +_:c14n3 _:c14n2 . +_:c14n3 _:c14n4 . +_:c14n4 _:c14n1 . +_:c14n4 _:c14n3 . +_:c14n4 _:c14n5 . +_:c14n5 _:c14n1 . +_:c14n5 _:c14n2 . +_:c14n5 _:c14n4 . +_:c14n6 _:c14n7 . +_:c14n6 _:c14n8 . +_:c14n6 _:c14n9 . +_:c14n7 _:c14n10 . +_:c14n7 _:c14n11 . +_:c14n7 _:c14n6 . +_:c14n8 _:c14n10 . +_:c14n8 _:c14n11 . +_:c14n8 _:c14n6 . +_:c14n9 _:c14n10 . +_:c14n9 _:c14n11 . +_:c14n9 _:c14n6 . diff --git a/graph/formats/rdf/testdata/test046-urgna2012.nq b/graph/formats/rdf/testdata/test046-urgna2012.nq new file mode 100644 index 00000000..540d3aa0 --- /dev/null +++ b/graph/formats/rdf/testdata/test046-urgna2012.nq @@ -0,0 +1,36 @@ +_:c14n0 _:c14n1 . +_:c14n0 _:c14n2 . +_:c14n0 _:c14n3 . +_:c14n1 _:c14n0 . +_:c14n1 _:c14n4 . +_:c14n1 _:c14n5 . +_:c14n10 _:c14n11 . +_:c14n10 _:c14n7 . +_:c14n10 _:c14n9 . +_:c14n11 _:c14n10 . +_:c14n11 _:c14n8 . +_:c14n11 _:c14n9 . +_:c14n2 _:c14n0 . +_:c14n2 _:c14n4 . +_:c14n2 _:c14n5 . +_:c14n3 _:c14n0 . +_:c14n3 _:c14n4 . +_:c14n3 _:c14n5 . +_:c14n4 _:c14n1 . +_:c14n4 _:c14n2 . +_:c14n4 _:c14n3 . +_:c14n5 _:c14n1 . +_:c14n5 _:c14n2 . +_:c14n5 _:c14n3 . +_:c14n6 _:c14n7 . +_:c14n6 _:c14n8 . +_:c14n6 _:c14n9 . +_:c14n7 _:c14n10 . +_:c14n7 _:c14n6 . +_:c14n7 _:c14n8 . +_:c14n8 _:c14n11 . +_:c14n8 _:c14n6 . +_:c14n8 _:c14n7 . +_:c14n9 _:c14n10 . +_:c14n9 _:c14n11 . +_:c14n9 _:c14n6 . diff --git a/graph/formats/rdf/testdata/test047-urdna2015.nq b/graph/formats/rdf/testdata/test047-urdna2015.nq new file mode 100644 index 00000000..1d345e5a --- /dev/null +++ b/graph/formats/rdf/testdata/test047-urdna2015.nq @@ -0,0 +1,8 @@ +_:c14n0 "bar1" . +_:c14n0 "bar2" . +_:c14n1 "foo1" . +_:c14n1 "foo2" . +_:c14n2 _:c14n0 . +_:c14n3 _:c14n2 . +_:c14n4 _:c14n1 . +_:c14n5 _:c14n4 . diff --git a/graph/formats/rdf/testdata/test047-urgna2012.nq b/graph/formats/rdf/testdata/test047-urgna2012.nq new file mode 100644 index 00000000..1d345e5a --- /dev/null +++ b/graph/formats/rdf/testdata/test047-urgna2012.nq @@ -0,0 +1,8 @@ +_:c14n0 "bar1" . +_:c14n0 "bar2" . +_:c14n1 "foo1" . +_:c14n1 "foo2" . +_:c14n2 _:c14n0 . +_:c14n3 _:c14n2 . +_:c14n4 _:c14n1 . +_:c14n5 _:c14n4 . diff --git a/graph/formats/rdf/testdata/test048-urdna2015.nq b/graph/formats/rdf/testdata/test048-urdna2015.nq new file mode 100644 index 00000000..1d345e5a --- /dev/null +++ b/graph/formats/rdf/testdata/test048-urdna2015.nq @@ -0,0 +1,8 @@ +_:c14n0 "bar1" . +_:c14n0 "bar2" . +_:c14n1 "foo1" . +_:c14n1 "foo2" . +_:c14n2 _:c14n0 . +_:c14n3 _:c14n2 . +_:c14n4 _:c14n1 . +_:c14n5 _:c14n4 . diff --git a/graph/formats/rdf/testdata/test048-urgna2012.nq b/graph/formats/rdf/testdata/test048-urgna2012.nq new file mode 100644 index 00000000..1d345e5a --- /dev/null +++ b/graph/formats/rdf/testdata/test048-urgna2012.nq @@ -0,0 +1,8 @@ +_:c14n0 "bar1" . +_:c14n0 "bar2" . +_:c14n1 "foo1" . +_:c14n1 "foo2" . +_:c14n2 _:c14n0 . +_:c14n3 _:c14n2 . +_:c14n4 _:c14n1 . +_:c14n5 _:c14n4 . diff --git a/graph/formats/rdf/testdata/test049-urdna2015.nq b/graph/formats/rdf/testdata/test049-urdna2015.nq new file mode 100644 index 00000000..e69de29b diff --git a/graph/formats/rdf/testdata/test049-urgna2012.nq b/graph/formats/rdf/testdata/test049-urgna2012.nq new file mode 100644 index 00000000..e69de29b diff --git a/graph/formats/rdf/testdata/test050-urdna2015.nq b/graph/formats/rdf/testdata/test050-urdna2015.nq new file mode 100644 index 00000000..e49bd6b0 --- /dev/null +++ b/graph/formats/rdf/testdata/test050-urdna2015.nq @@ -0,0 +1,3 @@ +_:c14n0 "value" . +_:c14n0 "Test 'null' in various locations" . +_:c14n0 _:c14n1 . diff --git a/graph/formats/rdf/testdata/test050-urgna2012.nq b/graph/formats/rdf/testdata/test050-urgna2012.nq new file mode 100644 index 00000000..c0085ed2 --- /dev/null +++ b/graph/formats/rdf/testdata/test050-urgna2012.nq @@ -0,0 +1,3 @@ +_:c14n1 "value" . +_:c14n1 "Test 'null' in various locations" . +_:c14n1 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test051-urdna2015.nq b/graph/formats/rdf/testdata/test051-urdna2015.nq new file mode 100644 index 00000000..56ed9a1e --- /dev/null +++ b/graph/formats/rdf/testdata/test051-urdna2015.nq @@ -0,0 +1,3 @@ + "object1" . + "object2" . + "object3" . diff --git a/graph/formats/rdf/testdata/test051-urgna2012.nq b/graph/formats/rdf/testdata/test051-urgna2012.nq new file mode 100644 index 00000000..56ed9a1e --- /dev/null +++ b/graph/formats/rdf/testdata/test051-urgna2012.nq @@ -0,0 +1,3 @@ + "object1" . + "object2" . + "object3" . diff --git a/graph/formats/rdf/testdata/test052-urdna2015.nq b/graph/formats/rdf/testdata/test052-urdna2015.nq new file mode 100644 index 00000000..a9213cf3 --- /dev/null +++ b/graph/formats/rdf/testdata/test052-urdna2015.nq @@ -0,0 +1,4 @@ + . + . + . + "foo" . diff --git a/graph/formats/rdf/testdata/test052-urgna2012.nq b/graph/formats/rdf/testdata/test052-urgna2012.nq new file mode 100644 index 00000000..a9213cf3 --- /dev/null +++ b/graph/formats/rdf/testdata/test052-urgna2012.nq @@ -0,0 +1,4 @@ + . + . + . + "foo" . diff --git a/graph/formats/rdf/testdata/test053-urdna2015.nq b/graph/formats/rdf/testdata/test053-urdna2015.nq new file mode 100644 index 00000000..a44660ad --- /dev/null +++ b/graph/formats/rdf/testdata/test053-urdna2015.nq @@ -0,0 +1,14 @@ +_:c14n0 "3" . +_:c14n0 . +_:c14n1 "6" . +_:c14n1 . +_:c14n2 "1" . +_:c14n2 _:c14n5 . +_:c14n3 _:c14n2 . +_:c14n3 _:c14n6 . +_:c14n4 "5" . +_:c14n4 _:c14n1 . +_:c14n5 "2" . +_:c14n5 _:c14n0 . +_:c14n6 "4" . +_:c14n6 _:c14n4 . diff --git a/graph/formats/rdf/testdata/test053-urgna2012.nq b/graph/formats/rdf/testdata/test053-urgna2012.nq new file mode 100644 index 00000000..08ae4d27 --- /dev/null +++ b/graph/formats/rdf/testdata/test053-urgna2012.nq @@ -0,0 +1,14 @@ +_:c14n0 _:c14n2 . +_:c14n0 _:c14n3 . +_:c14n1 "2" . +_:c14n1 _:c14n5 . +_:c14n2 "1" . +_:c14n2 _:c14n1 . +_:c14n3 "4" . +_:c14n3 _:c14n6 . +_:c14n4 "6" . +_:c14n4 . +_:c14n5 "3" . +_:c14n5 . +_:c14n6 "5" . +_:c14n6 _:c14n4 . diff --git a/graph/formats/rdf/testdata/test054-urdna2015.nq b/graph/formats/rdf/testdata/test054-urdna2015.nq new file mode 100644 index 00000000..0c34b2f1 --- /dev/null +++ b/graph/formats/rdf/testdata/test054-urdna2015.nq @@ -0,0 +1,15 @@ +_:c14n0 _:c14n14 . +_:c14n0 _:c14n7 . +_:c14n1 _:c14n15 . +_:c14n10 _:c14n9 . +_:c14n11 _:c14n10 . +_:c14n12 _:c14n11 . +_:c14n13 _:c14n12 . +_:c14n14 _:c14n13 . +_:c14n15 _:c14n0 . +_:c14n3 _:c14n2 . +_:c14n4 _:c14n3 . +_:c14n5 _:c14n4 . +_:c14n6 _:c14n5 . +_:c14n7 _:c14n6 . +_:c14n9 _:c14n8 . diff --git a/graph/formats/rdf/testdata/test054-urgna2012.nq b/graph/formats/rdf/testdata/test054-urgna2012.nq new file mode 100644 index 00000000..0c34b2f1 --- /dev/null +++ b/graph/formats/rdf/testdata/test054-urgna2012.nq @@ -0,0 +1,15 @@ +_:c14n0 _:c14n14 . +_:c14n0 _:c14n7 . +_:c14n1 _:c14n15 . +_:c14n10 _:c14n9 . +_:c14n11 _:c14n10 . +_:c14n12 _:c14n11 . +_:c14n13 _:c14n12 . +_:c14n14 _:c14n13 . +_:c14n15 _:c14n0 . +_:c14n3 _:c14n2 . +_:c14n4 _:c14n3 . +_:c14n5 _:c14n4 . +_:c14n6 _:c14n5 . +_:c14n7 _:c14n6 . +_:c14n9 _:c14n8 . diff --git a/graph/formats/rdf/testdata/test055-urdna2015.nq b/graph/formats/rdf/testdata/test055-urdna2015.nq new file mode 100644 index 00000000..000d870c --- /dev/null +++ b/graph/formats/rdf/testdata/test055-urdna2015.nq @@ -0,0 +1,3 @@ +_:c14n0 . +_:c14n0 _:c14n1 . +_:c14n1 . diff --git a/graph/formats/rdf/testdata/test055-urgna2012.nq b/graph/formats/rdf/testdata/test055-urgna2012.nq new file mode 100644 index 00000000..000d870c --- /dev/null +++ b/graph/formats/rdf/testdata/test055-urgna2012.nq @@ -0,0 +1,3 @@ +_:c14n0 . +_:c14n0 _:c14n1 . +_:c14n1 . diff --git a/graph/formats/rdf/testdata/test056-urdna2015.nq b/graph/formats/rdf/testdata/test056-urdna2015.nq new file mode 100644 index 00000000..000d870c --- /dev/null +++ b/graph/formats/rdf/testdata/test056-urdna2015.nq @@ -0,0 +1,3 @@ +_:c14n0 . +_:c14n0 _:c14n1 . +_:c14n1 . diff --git a/graph/formats/rdf/testdata/test056-urgna2012.nq b/graph/formats/rdf/testdata/test056-urgna2012.nq new file mode 100644 index 00000000..000d870c --- /dev/null +++ b/graph/formats/rdf/testdata/test056-urgna2012.nq @@ -0,0 +1,3 @@ +_:c14n0 . +_:c14n0 _:c14n1 . +_:c14n1 . diff --git a/graph/formats/rdf/testdata/test057-urdna2015.nq b/graph/formats/rdf/testdata/test057-urdna2015.nq new file mode 100644 index 00000000..460da845 --- /dev/null +++ b/graph/formats/rdf/testdata/test057-urdna2015.nq @@ -0,0 +1,2 @@ +_:c14n1 _:c14n0 . +_:c14n1 "Manu Sporny" _:c14n0 . diff --git a/graph/formats/rdf/testdata/test057-urgna2012.nq b/graph/formats/rdf/testdata/test057-urgna2012.nq new file mode 100644 index 00000000..460da845 --- /dev/null +++ b/graph/formats/rdf/testdata/test057-urgna2012.nq @@ -0,0 +1,2 @@ +_:c14n1 _:c14n0 . +_:c14n1 "Manu Sporny" _:c14n0 . diff --git a/graph/formats/rdf/testdata/test058-urdna2015.nq b/graph/formats/rdf/testdata/test058-urdna2015.nq new file mode 100644 index 00000000..962d8bdf --- /dev/null +++ b/graph/formats/rdf/testdata/test058-urdna2015.nq @@ -0,0 +1,2 @@ + _:c14n1 _:c14n0 . + _:c14n2 _:c14n0 . diff --git a/graph/formats/rdf/testdata/test059-urdna2015.nq b/graph/formats/rdf/testdata/test059-urdna2015.nq new file mode 100644 index 00000000..81ae867c --- /dev/null +++ b/graph/formats/rdf/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/graph/formats/rdf/testdata/test060-urdna2015.nq b/graph/formats/rdf/testdata/test060-urdna2015.nq new file mode 100644 index 00000000..ced56922 --- /dev/null +++ b/graph/formats/rdf/testdata/test060-urdna2015.nq @@ -0,0 +1,17 @@ + "" . + "simple" . + "\"" . + "\\" . + "\n" . + "\r" . + "\"\\\n\r" . + "\"\\" . + " \n\r \"'\\" . + "\\u0039" . + "\\n" . + "\\\\" . + "\"\"" . + "\\\\\\" . + "\"\"\"" . + "∞" . + "∞" . diff --git a/graph/formats/rdf/testdata/test060-urgna2012.nq b/graph/formats/rdf/testdata/test060-urgna2012.nq new file mode 100644 index 00000000..ced56922 --- /dev/null +++ b/graph/formats/rdf/testdata/test060-urgna2012.nq @@ -0,0 +1,17 @@ + "" . + "simple" . + "\"" . + "\\" . + "\n" . + "\r" . + "\"\\\n\r" . + "\"\\" . + " \n\r \"'\\" . + "\\u0039" . + "\\n" . + "\\\\" . + "\"\"" . + "\\\\\\" . + "\"\"\"" . + "∞" . + "∞" . diff --git a/graph/formats/rdf/testdata/test061-urdna2015.nq b/graph/formats/rdf/testdata/test061-urdna2015.nq new file mode 100644 index 00000000..6ac8fd5c --- /dev/null +++ b/graph/formats/rdf/testdata/test061-urdna2015.nq @@ -0,0 +1,2 @@ + "test"@en . + "test"@fr . diff --git a/graph/formats/rdf/testdata/test061-urgna2012.nq b/graph/formats/rdf/testdata/test061-urgna2012.nq new file mode 100644 index 00000000..6ac8fd5c --- /dev/null +++ b/graph/formats/rdf/testdata/test061-urgna2012.nq @@ -0,0 +1,2 @@ + "test"@en . + "test"@fr . diff --git a/graph/formats/rdf/testdata/test062-urdna2015.nq b/graph/formats/rdf/testdata/test062-urdna2015.nq new file mode 100644 index 00000000..5988604a --- /dev/null +++ b/graph/formats/rdf/testdata/test062-urdna2015.nq @@ -0,0 +1,2 @@ + "test"^^ . + "test"^^ . diff --git a/graph/formats/rdf/testdata/test062-urgna2012.nq b/graph/formats/rdf/testdata/test062-urgna2012.nq new file mode 100644 index 00000000..5988604a --- /dev/null +++ b/graph/formats/rdf/testdata/test062-urgna2012.nq @@ -0,0 +1,2 @@ + "test"^^ . + "test"^^ . diff --git a/graph/formats/rdf/testdata/vocab.html b/graph/formats/rdf/testdata/vocab.html new file mode 100644 index 00000000..9b610ebb --- /dev/null +++ b/graph/formats/rdf/testdata/vocab.html @@ -0,0 +1,95 @@ + + + + + + + + + RDF Dataset Normalization Test Vocabulary + + + + + +

+ + W3C + +

+

RDF Dataset Normalization Test Vocabulary

+ +

This is a vocabulary document used to define classes and properties used in + RDF Dataset Normalization Test Cases and associated test manifests.

+ +

This vocabulary extends the RDF Test Vocabulary + and Test Manifest Vocabulary with Normalization-specific tests. + The URI of the vocabulary is http://json-ld.github.io/normalization/tests/vocab# + (abbreviated by rdfn in this document). + Turtle and JSON-LD versions of the vocabular are also available. + The vocabulary is published by the W3C Credentials Community Group.

+
+
+

Vocabulary Terms

+

The vocabulary terms below constitute the complete RDF Dataset Normalization Test vocabulary

+
+

Classes

+
+
rdfn:Test
+
+ Superclass of all RDF Dataset Normalization tests +

All RDF Dataset Normalization tests have an input file referenced using mf:action and a result file referenced using mf:result. Results are compared as text where the result of running the test is serialized to canonical N-Quads, lexicographically-sorted.

+
+ + subClassOf: + +
    +
  • + mf:ManifestEntry +
  • +
  • + rdft:Test +
  • +
+
+
+
rdfn:Urdna2015EvalTest
+
+ URDNA2015 Evaluation Test +

Normalization performed using the URDNA2015 algorithm.

+
+ + subClassOf: + + rdfn:Test +
+
+
rdfn:Urgna2012EvalTest
+
+ URGNA2012 Evaluation Test +

Normalization performed using the URGNA2012 algorithm.

+
+ + subClassOf: + + rdfn:Test +
+
+
+
+
+

Properties

+
+
+
+
+
+ W3C Credentials Community Group +
+ + diff --git a/graph/formats/rdf/testdata/vocab.jsonld b/graph/formats/rdf/testdata/vocab.jsonld new file mode 100644 index 00000000..646734bc --- /dev/null +++ b/graph/formats/rdf/testdata/vocab.jsonld @@ -0,0 +1,59 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfn": "http://json-ld.github.io/normalization/tests/vocab#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "rdft": "http://www.w3.org/ns/rdftest#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "dc:identifier": { + "@type": "@id" + }, + "rdfs:subClassOf": { + "@type": "@id" + }, + "rdfs:domain": { + "@type": "@id" + }, + "rdfs:range": { + "@type": "@id" + } + }, + "@graph": [ + { + "@id": "http://json-ld.github.io/normalization/tests/vocab#", + "dc:creator": "Gregg Kellogg", + "dc:date": "2015-05-19", + "dc:description": "\n This is a vocabulary document used to define classes and properties used in\n [RDF Dataset Normalization Test Cases](http://json-ld.github.io/normalization/tests/) and associated test manifests.\n ", + "dc:identifier": "http://json-ld.github.io/normalization/tests/vocab#", + "dc:publisher": "W3C Credentials Community Group", + "dc:title": "RDF Dataset Normalization Test Vocabulary", + "rdfs:comment": "This is a vocabulary document used to define classes and properties used in [RDF Dataset Normalization Test Cases](http://json-ld.github.io/normalization/tests/) and associated test manifests." + }, + { + "@id": "rdfn:Test", + "@type": "rdfs:Class", + "rdfs:comment": "All RDF Dataset Normalization tests have an input file referenced using `mf:action` and a result file referenced using `mf:result`. Results are compared as text where the result of running the test is serialized to canonical N-Quads, lexicographically-sorted.", + "rdfs:label": "Superclass of all RDF Dataset Normalization tests", + "rdfs:subClassOf": [ + "mf:ManifestEntry", + "rdft:Test" + ] + }, + { + "@id": "rdfn:Urdna2015EvalTest", + "@type": "rdfs:Class", + "rdfs:comment": "Normalization performed using the URDNA2015 algorithm.", + "rdfs:label": "URDNA2015 Evaluation Test", + "rdfs:subClassOf": "rdfn:Test" + }, + { + "@id": "rdfn:Urgna2012EvalTest", + "@type": "rdfs:Class", + "rdfs:comment": "Normalization performed using the URGNA2012 algorithm.", + "rdfs:label": "URGNA2012 Evaluation Test", + "rdfs:subClassOf": "rdfn:Test" + } + ] +} \ No newline at end of file diff --git a/graph/formats/rdf/testdata/vocab.ttl b/graph/formats/rdf/testdata/vocab.ttl new file mode 100644 index 00000000..236e4950 --- /dev/null +++ b/graph/formats/rdf/testdata/vocab.ttl @@ -0,0 +1,52 @@ +# W3C RDF Dataset Normalization Test Vocabulary +# This vocabulary defines classes an properties which extend +# the test-manifest vocabulary at . + +@prefix : . +@prefix dc: . +@prefix mf: . +@prefix rdf: . +@prefix rdfn: . +@prefix rdfs: . +@prefix rdft: . +@prefix xsd: . + +: dc:title "RDF Dataset Normalization Test Vocabulary"; + dc:creator "Gregg Kellogg"; + dc:publisher "W3C Credentials Community Group"; + dc:description """ + This is a vocabulary document used to define classes and properties used in + [RDF Dataset Normalization Test Cases](http://json-ld.github.io/normalization/tests/) and associated test manifests. + """; + rdfs:comment """ + This is a vocabulary document used to define classes and properties used in + [RDF Dataset Normalization Test Cases](http://json-ld.github.io/normalization/tests/) and associated test manifests. + """; + dc:date "2015-05-19"; + dc:identifier rdfn: . + +## ---- Test Case Classes --- + +:Test a rdfs:Class; + rdfs:subClassOf mf:ManifestEntry; + rdfs:label "Superclass of all RDF Dataset Normalization tests"; + rdfs:subClassOf rdft:Test; + rdfs:comment """ + All RDF Dataset Normalization tests have an input file referenced using `mf:action` + and a result file referenced using `mf:result`. Results are compared as text + where the result of running the test is serialized to canonical N-Quads, lexicographically-sorted. + """ . + +:Urgna2012EvalTest a rdfs:Class; + rdfs:label "URGNA2012 Evaluation Test"; + rdfs:subClassOf :Test; + rdfs:comment """ + Normalization performed using the URGNA2012 algorithm. + """ . + +:Urdna2015EvalTest a rdfs:Class; + rdfs:label "URDNA2015 Evaluation Test"; + rdfs:subClassOf :Test; + rdfs:comment """ + Normalization performed using the URDNA2015 algorithm. + """ . diff --git a/graph/formats/rdf/testdata/vocab_context.jsonld b/graph/formats/rdf/testdata/vocab_context.jsonld new file mode 100644 index 00000000..f6cc0f11 --- /dev/null +++ b/graph/formats/rdf/testdata/vocab_context.jsonld @@ -0,0 +1,16 @@ +{ + "@context": { + "dc": "http://purl.org/dc/elements/1.1/", + "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfn": "http://json-ld.github.io/normalization/tests/vocab#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "rdft": "http://www.w3.org/ns/rdftest#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + + "dc:identifier": {"@type": "@id"}, + "rdfs:subClassOf": {"@type": "@id"}, + "rdfs:domain": {"@type": "@id"}, + "rdfs:range": {"@type": "@id"} + } +} \ No newline at end of file diff --git a/graph/formats/rdf/testdata/vocab_template.haml b/graph/formats/rdf/testdata/vocab_template.haml new file mode 100644 index 00000000..3c948606 --- /dev/null +++ b/graph/formats/rdf/testdata/vocab_template.haml @@ -0,0 +1,88 @@ +!!! 5 +%html{lang: :en, prefix: "rdfn: http://json-ld.github.io/normalization/tests/vocab# mf: http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# rdft: http://www.w3.org/ns/rdftest#"} + %head + %meta{"http-equiv" => "Content-Type", content: "text/html;charset=utf-8"} + %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"} + %link{rel: "stylesheet", type: "text/css", href: "https://www.w3.org/StyleSheets/TR/base"} + :css + body: {bacground-image: none;} + dt {margin-top: 2em;} + dd code {display: inline;} + footer {text-align: center;} + %title + = ontology['dc:title'] + %body{resource: ontology['@id'], typeof: "owl:Ontology"} + %meta{property: "dc:creator", value: ontology["dc:creator"]} + %link{property: "dc:identifier", href: ontology["@id"]} + %p + %a{href: "http://www.w3.org/"} + %img{src: "http://www.w3.org/Icons/w3c_home", alt: "W3C", height: 48, width: 72} + %h1{property: "dc:title rdfs:label"}<= ontology["dc:title"] + %span{property: "dc:description rdfs:comment"} + :markdown + #{ontology["dc:description"].gsub(/^\s+/, '')} + + This vocabulary extends the [RDF Test Vocabulary](http://www.w3.org/ns/rdftest#) + and [Test Manifest Vocabulary](http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#) with Normalization-specific tests. + The URI of the vocabulary is `http://json-ld.github.io/normalization/tests/vocab#` + (abbreviated by `rdfn` in this document). + [Turtle](vocab.ttl) and [JSON-LD](vocab.jsonld) versions of the vocabular are also available. + The vocabulary is published by the [W3C Credentials Community Group](https://www.w3.org/community/credentials/). + %section + %h2="Vocabulary Terms" + %p="The vocabulary terms below constitute the complete RDF Dataset Normalization Test vocabulary" + %section + %h3#classes="Classes" + %dl + - classes.sort_by {|c| c['@id']}.each do |cls| + %dt{about: cls['@id'], typeof: cls['@type'], property: "rdfs:label"}<~cls["@id"] + %dd{about: cls['@id']} + %em{property: "rdfs:label"}<~cls["rdfs:label"] + %span{property: "rdfs:comment"}< + :markdown + #{cls["rdfs:comment"].to_s.gsub(/^\s+/, '')} + - if cls["rdfs:subClassOf"] + %div + %strong + subClassOf: + - if cls["rdfs:subClassOf"].is_a?(Array) + %ul + - cls["rdfs:subClassOf"].each do |e| + %li + %code{property: "rdfs:subClassOf", resource: e}=e + - else + %code{property: "rdfs:subClassOf", resource: cls["rdfs:subClassOf"]}=cls["rdfs:subClassOf"] + %section + %h3#properties="Properties" + %dl + - properties.sort_by {|c| c['@id']}.each do |prop| + %dt{about: prop['@id'], typeof: prop['@type'], property: "rdfs:label"}<~prop["@id"] + %dd{about: prop['@id']} + %em{property: "rdfs:label"}<~prop["rdfs:label"] + %span{property: "rdfs:comment"}< + :markdown + #{prop["rdfs:comment"].to_s.gsub(/^\s+/, '')} + - if prop["rdfs:domain"] + %div + %strong + domain: + - if prop["rdfs:domain"].is_a?(Array) + %ul + - prop["rdfs:domain"].each do |e| + %li + %code{property: "rdfs:domain", resource: e}=e + - else + %code{property: "rdfs:domain", resource: prop["rdfs:domain"]}=prop["rdfs:domain"] + - if prop["rdfs:range"] + %div + %strong + range: + - if prop["rdfs:range"].is_a?(Array) + %ul + - prop["rdfs:range"].each do |e| + %li + %code{property: "rdfs:range", resource: e}=e + - else + %code{property: "rdfs:range", resource: prop["rdfs:range"]}=prop["rdfs:range"] + %footer + %span{property: "dc:publisher"}<= ontology["dc:publisher"] diff --git a/graph/formats/rdf/urna.go b/graph/formats/rdf/urna.go new file mode 100644 index 00000000..4db2e7ba --- /dev/null +++ b/graph/formats/rdf/urna.go @@ -0,0 +1,540 @@ +// Copyright ©2020 The Gonum Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package rdf + +import ( + "bytes" + "crypto/sha1" + "crypto/sha256" + "errors" + "fmt" + "hash" + "sort" + "strings" + + "gonum.org/v1/gonum/stat/combin" +) + +// Note on implementation details: The comment numbering in the code relates the +// implementation to the steps of the algorithm described in the specification. + +// URGNA2012 applies the Universal RDF Graph Normalization Algorithm 2012 +// to the statements in src, placing the result in dst and returning it. +// If dst is nil a slice of statements will be allocated. If dst is not +// nil and not the same length as src, URGNA2012 will return an error. +// +// See https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html for details. +func URGNA2012(dst, src []*Statement) ([]*Statement, error) { + // 1. https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#algorithm + u := &urna{ + canon: newIssuer("_:c14n"), + hashes: make(map[string]string), + statementsFor: make(map[string][]*Statement), + hash: sha1.New(), + label: "_:g", + } + u.hashToRelated = u.hashToRelatedURGNA2012 + return u.relabel(dst, src) +} + +// URDNA2015 applies the Universal RDF Dataset Normalization Algorithm 2015 +// to the statements in src, placing the result in dst and returning it. +// If dst is nil a slice of statements will be allocated. If dst is not +// nil and not the same length as src, URDNA2015 will return an error. +// +// See https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html for details. +func URDNA2015(dst, src []*Statement) ([]*Statement, error) { + // 1. https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#algorithm + u := &urna{ + canon: newIssuer("_:c14n"), + hashes: make(map[string]string), + statementsFor: make(map[string][]*Statement), + hash: sha256.New(), + } + u.hashToRelated = u.hashToRelatedURDNA2015 + return u.relabel(dst, src) +} + +// urna is the canonicalization state for the URGNA2012 and URDNA2015 +// algorithms. The urna type implements both algorithms through the state +// of the label and hashToRelated fields. +// +// See https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#canonicalization-state +// for details. +type urna struct { + // canon is the canonical issuer. + canon *issuer + + // hashes holds already calculated hashes + // for hashing first degree quads. + hashes map[string]string + + // statementsFor is the blank node to quads map. + statementsFor map[string][]*Statement + + // hash is the hash function used by the + // canonicalization function. + hash hash.Hash + // hashToRelated holds URGNA2012 and URDNA2015- + // specific hashing routines. + hashToRelated relatedHashCreator + // label holds "_:g" when running URGNA2012. + // Otherwise it is empty. + label string +} + +// relabel is the algorithm described in section 4.4.2 of the spec at +// https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#algorithm. +func (u *urna) relabel(dst, src []*Statement) ([]*Statement, error) { + // termsFor is the hash to blank nodes map. + // It is not held in the urna struct, but is + // part of the canonicalization state. + // + // https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#dfn-hash-to-blank-nodes-map + var termsFor map[string][]string // 1. + + for _, s := range src { // 2. + terms: + for _, t := range []string{ + s.Subject.Value, + s.Object.Value, + s.Label.Value, + } { + if !strings.HasPrefix(t, "_:") { + continue + } + for _, e := range u.statementsFor[t] { + if e == s { + continue terms + } + } + u.statementsFor[t] = append(u.statementsFor[t], s) + } + } + + // todo is the list of non-normalized blank node identifiers. + todo := make(map[string]bool) // 3. + for b := range u.statementsFor { + todo[b] = true + } + + simple := true // 4. + for simple { // 5. + simple = false // 5.1 + + termsFor = make(map[string][]string) // 5.2 + + for b := range todo { // 5.3 + hash := u.hashFirstDegreeQuads(b) // 5.3.1 + termsFor[hash] = append(termsFor[hash], b) // 5.3.2 + } + + for _, h := range lexicallySortedTermHashes(termsFor) { // 5.4 + terms := termsFor[h] + if len(terms) > 1 { // 5.4.1 + continue + } + u.canon.issueFor(terms[0]) // 5.4.2 + delete(todo, terms[0]) // 5.4.3 + delete(termsFor, h) // 5.4.4 + simple = true // 5.4.5 + } + } + + for _, hash := range lexicallySortedTermHashes(termsFor) { // 6. + paths := make(map[string][]*issuer) // 6.1 + for _, b := range termsFor[hash] { // 6.2 + if u.canon.has(b) { // 6.2.1 + continue + } + names := newIssuer("_:b") // 6.2.2 + names.issueFor(b) // 6.2.3 + + // 6.2.4 + hash, issuer := u.hashNDegreeQuads(b, names) + paths[string(hash)] = append(paths[string(hash)], issuer) + } + + for _, hash := range lexicallySortedPathHashes(paths) { // 6.3 + for _, i := range paths[hash] { + for _, existing := range i.ordered { // 6.3.1 + u.canon.issueFor(existing) + } + } + } + } + + // 7. + if dst == nil { + dst = make([]*Statement, len(src)) + } else if len(dst) != len(src) { + return dst, errors.New("rdf: slice length mismatch") + } + for i, s := range src { + if dst[i] == nil { + dst[i] = &Statement{} + } + n := dst[i] + n.Subject = Term{Value: translateURNA(s.Subject.Value, u.canon.issued), UID: s.Subject.UID} + n.Predicate = s.Predicate + n.Object = Term{Value: translateURNA(s.Object.Value, u.canon.issued), UID: s.Object.UID} + n.Label = Term{Value: translateURNA(s.Label.Value, u.canon.issued), UID: s.Label.UID} + } + sort.Sort(c14nStatements(dst)) + + return dst, nil +} + +// lexicallySortedPathHashes returns the lexically sorted hashes of paths. +func lexicallySortedPathHashes(paths map[string][]*issuer) []string { + lexicalHashPaths := make([]string, len(paths)) + i := 0 + for h := range paths { + lexicalHashPaths[i] = h + i++ + } + sort.Strings(lexicalHashPaths) + return lexicalHashPaths +} + +func translateURNA(term string, mapping map[string]string) string { + term = translate(term, mapping) + if term == "" { + return "" + } + text, qual, kind, err := extract([]rune(term)) + var t Term + switch kind { + case Blank: + return term + case IRI: + t, err = NewIRITerm(text) + case Literal: + t, err = NewLiteralTerm(text, qual) + } + if err != nil { + panic(fmt.Errorf("rdf: invalid term %q: %w", term, err)) + } + return t.Value +} + +// hashFirstDegreeQuads is the algorithm described in section 4.6 of the spec +// at https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#algorithm-1. +func (u *urna) hashFirstDegreeQuads(b string) string { + if h, ok := u.hashes[b]; ok { + return h + } + + var statements []*Statement // 1. + + for _, s := range u.statementsFor[b] { // 2. and 3. + var n Statement + n.Subject.Value = replaceBlank(s.Subject.Value, b, "") + n.Predicate.Value = s.Predicate.Value + n.Object.Value = replaceBlank(s.Object.Value, b, "") + n.Label.Value = replaceBlank(s.Label.Value, b, u.label) + statements = append(statements, &n) + } + + sort.Sort(c14nStatements(statements)) // 4. + + // 5. + u.hash.Reset() + for _, s := range statements { + fmt.Fprintln(u.hash, s) + } + u.hashes[b] = string(hex(u.hash.Sum(nil))) + + return u.hashes[b] +} + +// replaceBlank implements 3.1 of the algorithm described at +// https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#algorithm-1. +func replaceBlank(b, matching, label string) string { + if !strings.HasPrefix(b, "_:") { // 3,1 + return b + } + if label != "" { // URGNA2012 modification. + // When running in URGNA2012 mode, label is "_:g" for Label fields. + // + // If any blank node was used in the graph name position in the quad, + // then the value was serialized using the special blank node identifier, + // "_:g", instead of "_:z". + // https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#urgna2012 + return label + } + // 3.1.1.1 + if b == matching { + return "_:a" + } + return "_:z" +} + +// hashNDegreeQuads is the algorithm described in section 4.8 of the spec +// at https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#hash-n-degree-quads. +func (u *urna) hashNDegreeQuads(b string, names *issuer) ([]byte, *issuer) { + // termsFor is the hash to related blank nodes map. + termsFor := u.hashToRelated(b, names) // 1., 2. and 3. + var final []byte // 4. + + for _, hash := range lexicallySortedTermHashes(termsFor) { // 5. + terms := termsFor[hash] + final = append(final, hash...) // 5.1 + var chosenPath []byte // 5.2 + var chosenIssuer *issuer // 5.3 + p := newPermutations(terms) // 5.4 + permutations: + for p.next() { + namesCopy := names.clone() // 5.4.1 + var path []byte // 5.4.2 + var work []string // 5.4.3 + for _, b := range p.permutation() { // 5.4.4 + if u.canon.has(b) { // 5.4.4.1 + path = append(path, u.canon.issueFor(b)...) + } else { // 5.4.4.1 + if !namesCopy.has(b) { + work = append(work, b) + } + + path = append(path, namesCopy.issueFor(b)...) // 5.4.4.2.2 + } + + // 5.4.4.3 + if len(chosenPath) != 0 && len(path) >= len(chosenPath) && bytes.Compare(path, chosenPath) > 0 { + continue permutations + } + } + + for _, b := range work { // 5.4.5 + hash, issuer := u.hashNDegreeQuads(b, namesCopy) // 5.4.5.1 + path = append(path, namesCopy.issueFor(b)...) // 5.4.5.2 + + // 5.4.5.3 + path = append(path, '<') + path = append(path, hash...) + path = append(path, '>') + + namesCopy = issuer // 5.4.5.4 + + // 5.4.5.5 + if len(chosenPath) != 0 && len(path) >= len(chosenPath) && bytes.Compare(path, chosenPath) > 0 { + continue permutations + } + } + + if len(chosenPath) == 0 || bytes.Compare(path, chosenPath) < 0 { // 5.4.6 + chosenPath = path + chosenIssuer = namesCopy + } + + } + // 5.5 + final = append(final, chosenPath...) + u.hash.Reset() + u.hash.Write(final) //nolint:errcheck + + names = chosenIssuer // 5.6 + } + + return hex(u.hash.Sum(nil)), names +} + +// lexicallySortedTermHashes returns the lexically sorted hashes of termsFor. +func lexicallySortedTermHashes(termsFor map[string][]string) []string { + lexicalHashes := make([]string, len(termsFor)) + i := 0 + for h := range termsFor { + lexicalHashes[i] = h + i++ + } + sort.Strings(lexicalHashes) + return lexicalHashes +} + +type relatedHashCreator func(b string, names *issuer) map[string][]string + +// hashToRelatedURDNA2015 is the section 1. 2. and 3. of 4.8.2 of the spec +// at https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#hash-n-degree-quads. +func (u *urna) hashToRelatedURDNA2015(b string, names *issuer) map[string][]string { + // termsFor is the hash to related blank nodes map. + termsFor := make(map[string][]string) // 1. + + for _, s := range u.statementsFor[b] { // 2. and 3. + for i, term := range []string{ // 3.1 + s.Subject.Value, + s.Object.Value, + s.Label.Value, + } { + if !strings.HasPrefix(term, "_:") || term == b { + continue + } + + // 3.1.1 + const position = "sog" + hash := u.hashRelatedBlank(term, s, names, position[i]) + + // 3.1.2 + termsFor[string(hash)] = append(termsFor[string(hash)], term) + } + } + + return termsFor +} + +// hashToRelatedURGNA2012 is the section 1., 2. and 3. of 4.8.2 of the spec +// at https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#hash-n-degree-quads +// with changes made for URGNA2012 shown in the appendix for 4.8 at +// https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#urgna2012. +// The numbering of steps here corresponds to the spec's numbering in the +// appendix. +func (u *urna) hashToRelatedURGNA2012(b string, names *issuer) map[string][]string { + // termsFor is the hash to related blank nodes map. + termsFor := make(map[string][]string) + + for _, s := range u.statementsFor[b] { // 1. + var ( + term string + pos byte + ) + switch { + case strings.HasPrefix(s.Subject.Value, "_:") && s.Subject.Value != b: // 1.1 + term = s.Subject.Value + pos = 'p' + case strings.HasPrefix(s.Object.Value, "_:") && s.Object.Value != b: // 1.2 + term = s.Object.Value + pos = 'r' + default: + continue // 1.3 + } + + // 1.4 + hash := u.hashRelatedBlank(term, s, names, pos) + termsFor[string(hash)] = append(termsFor[string(hash)], term) + } + + return termsFor +} + +// hashNDegreeQuads is the algorithm described in section 4.7 of the spec +// https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#hash-related-blank-node. +func (u *urna) hashRelatedBlank(term string, s *Statement, names *issuer, pos byte) []byte { + // 1. + var b string + switch { + case u.canon.has(term): + b = u.canon.issueFor(term) + case names.has(term): + b = names.issueFor(term) + default: + b = u.hashFirstDegreeQuads(term) + } + + // 2. + u.hash.Reset() + u.hash.Write([]byte{pos}) //nolint:errcheck + + if pos != 'g' { // 3. + if u.label == "" { + // URDNA2015: Term.Value retained the angle quotes + // so we don't need to add them. + u.hash.Write([]byte(s.Predicate.Value)) //nolint:errcheck + } else { + // URGNA2012 does not delimit predicate by < and >. + // https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#urgna2012 + // with reference to 4.7. + u.hash.Write([]byte(unquoteIRI(s.Predicate.Value))) //nolint:errcheck + } + } + + // 4. and 5. + u.hash.Write([]byte(b)) //nolint:errcheck + return hex(u.hash.Sum(nil)) +} + +// issuer is an identifier issuer. +type issuer struct { + prefix string + issued map[string]string + ordered []string +} + +// newIssuer returns a new identifier issuer with the given prefix. +func newIssuer(prefix string) *issuer { + return &issuer{prefix: prefix, issued: make(map[string]string)} +} + +// issueFor implements the issue identifier algorithm. +// +// See https://json-ld.github.io/rdf-dataset-canonicalization/spec/index.html#issue-identifier-algorithm +func (i *issuer) issueFor(b string) string { + c, ok := i.issued[b] + if ok { + return c + } + c = fmt.Sprintf("%s%d", i.prefix, len(i.issued)) + i.issued[b] = c + i.ordered = append(i.ordered, b) + return c +} + +func (i *issuer) has(id string) bool { + _, ok := i.issued[id] + return ok +} + +func (i *issuer) clone() *issuer { + new := issuer{ + prefix: i.prefix, + issued: make(map[string]string, len(i.issued)), + ordered: make([]string, len(i.ordered)), + } + copy(new.ordered, i.ordered) + for k, v := range i.issued { + new.issued[k] = v + } + return &new +} + +func hex(data []byte) []byte { + const digit = "0123456789abcdef" + buf := make([]byte, 0, len(data)*2) + for _, b := range data { + buf = append(buf, digit[b>>4], digit[b&0xf]) + } + return buf +} + +// permutations is a string permutation generator. +type permutations struct { + src []string + dst []string + idx []int + perm *combin.PermutationGenerator +} + +// newPermutation returns a new permutations. +func newPermutations(src []string) *permutations { + return &permutations{ + src: src, + dst: make([]string, len(src)), + perm: combin.NewPermutationGenerator(len(src), len(src)), + idx: make([]int, len(src)), + } +} + +// next returns whether there is another permutation available. +func (p *permutations) next() bool { + return p.perm.Next() +} + +// permutation returns the permutation. The caller may not retain the +// returned slice between iterations. +func (p *permutations) permutation() []string { + p.perm.Permutation(p.idx) + for i, j := range p.idx { + p.dst[j] = p.src[i] + } + return p.dst +} diff --git a/graph/formats/rdf/urna_example_test.go b/graph/formats/rdf/urna_example_test.go new file mode 100644 index 00000000..de069ef5 --- /dev/null +++ b/graph/formats/rdf/urna_example_test.go @@ -0,0 +1,119 @@ +// Copyright ©2020 The Gonum Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package rdf_test + +import ( + "fmt" + "log" + "strings" + + "gonum.org/v1/gonum/graph/formats/rdf" +) + +func ExampleURDNA2015() { + for _, statements := range []string{ + ` +_:a . +_:b . +_:c _:a . +_:d _:b . +_:c _:d . +`, + ` +_:c1 _:a1 . +_:b1 . +_:d1 _:b1 . +_:a1 . +_:c1 _:d1 . +`, + } { + // Decode the statement stream. + dec := rdf.NewDecoder(strings.NewReader(statements)) + var s []*rdf.Statement + for { + l, err := dec.Unmarshal() + if err != nil { + break + } + s = append(s, l) + } + + relabeled, err := rdf.URDNA2015(nil, s) + if err != nil { + log.Fatal(err) + } + for _, s := range relabeled { + fmt.Println(s) + } + fmt.Println() + } + + // Output: + // + // _:c14n0 _:c14n2 . + // _:c14n1 _:c14n3 . + // _:c14n1 _:c14n0 . + // _:c14n2 . + // _:c14n3 . + // + // _:c14n0 _:c14n2 . + // _:c14n1 _:c14n3 . + // _:c14n1 _:c14n0 . + // _:c14n2 . + // _:c14n3 . +} + +func ExampleURGNA2012() { + for _, statements := range []string{ + ` +_:a . +_:b . +_:c _:a . +_:d _:b . +_:c _:d . +`, + ` +_:c1 _:a1 . +_:b1 . +_:d1 _:b1 . +_:a1 . +_:c1 _:d1 . +`, + } { + // Decode the statement stream. + dec := rdf.NewDecoder(strings.NewReader(statements)) + var s []*rdf.Statement + for { + l, err := dec.Unmarshal() + if err != nil { + break + } + s = append(s, l) + } + + relabeled, err := rdf.URGNA2012(nil, s) + if err != nil { + log.Fatal(err) + } + for _, s := range relabeled { + fmt.Println(s) + } + fmt.Println() + } + + // Output: + // + // _:c14n0 _:c14n3 . + // _:c14n0 _:c14n1 . + // _:c14n1 _:c14n2 . + // _:c14n2 . + // _:c14n3 . + // + // _:c14n0 _:c14n3 . + // _:c14n0 _:c14n1 . + // _:c14n1 _:c14n2 . + // _:c14n2 . + // _:c14n3 . +} diff --git a/graph/formats/rdf/urna_test.go b/graph/formats/rdf/urna_test.go new file mode 100644 index 00000000..9554943a --- /dev/null +++ b/graph/formats/rdf/urna_test.go @@ -0,0 +1,139 @@ +// Copyright ©2020 The Gonum Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package rdf + +import ( + "bytes" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + "testing" +) + +func TestURNA(t *testing.T) { + glob, err := filepath.Glob(filepath.Join("testdata", *tests)) + if err != nil { + t.Fatalf("Failed to open test suite: %v", err) + } + for _, test := range []struct { + name string + fn func(dst, src []*Statement) ([]*Statement, error) + truth string + }{ + { + name: "URDNA2015", + fn: URDNA2015, + truth: "-urdna2015.nq", + }, + { + name: "URGNA2012", + fn: URGNA2012, + truth: "-urgna2012.nq", + }, + } { + t.Run(test.name, func(t *testing.T) { + for _, path := range glob { + name := filepath.Base(path) + golden := strings.TrimSuffix(path, "-in.nq") + test.truth + want, err := ioutil.ReadFile(golden) + if err != nil { + if !os.IsNotExist(err) { + t.Errorf("Failed to read golden data: %v", err) + } + continue + } + + t.Run(name, func(t *testing.T) { + f, err := os.Open(path) + if err != nil { + t.Fatalf("Failed to open test suite in %q: %v", path, err) + } + var statements []*Statement + dec := NewDecoder(f) + for { + s, err := dec.Unmarshal() + if err != nil { + if err == io.EOF { + break + } + t.Fatalf("Unexpected error reading from %q: %v", path, err) + } + statements = append(statements, s) + } + f.Close() + + relabeled, _ := test.fn(nil, statements) + + var buf bytes.Buffer + for _, s := range relabeled { + fmt.Fprintln(&buf, s) + } + got := buf.Bytes() + + if !bytes.Equal(got, want) { + t.Errorf("Unexpected result for %s %s:\ngot:\n%s\nwant:\n%s", + test.name, path, got, want) + } + }) + } + }) + } +} + +func BenchmarkURNA(b *testing.B) { + benchmarks := []string{ + "test019-in.nq", + "test044-in.nq", + } + + for _, name := range benchmarks { + path := filepath.Join("testdata", name) + b.Run(name, func(b *testing.B) { + f, err := os.Open(path) + if err != nil { + b.Fatalf("Failed to open test suite in %q: %v", path, err) + } + var statements []*Statement + dec := NewDecoder(f) + for { + s, err := dec.Unmarshal() + if err != nil { + if err == io.EOF { + break + } + b.Fatalf("Unexpected error reading from %q: %v", path, err) + } + statements = append(statements, s) + } + f.Close() + + for _, bench := range []struct { + name string + fn func(dst, src []*Statement) ([]*Statement, error) + }{ + { + name: "URDNA2015", + fn: URDNA2015, + }, + { + name: "URGNA2012", + fn: URGNA2012, + }, + } { + b.Run(bench.name, func(b *testing.B) { + for i := 0; i < b.N; i++ { + relabeled, _ := bench.fn(nil, statements) + if len(relabeled) != len(statements) { + b.Fatalf("unexpected number of relabeled statements: %d != %d", len(relabeled), len(statements)) + } + } + }) + } + }) + } +}