--- a/test-suite/vocab.jsonld Fri Aug 23 18:04:23 2013 -0700
+++ b/test-suite/vocab.jsonld Sat Aug 24 14:39:48 2013 -0700
@@ -6,138 +6,186 @@
"mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"jld": "http://json-ld.org/test-suite/vocab#",
- "jld:Test": {"@type": "@id"},
- "dc:identifier": {"@type": "@id"},
- "rdfs:subClassOf": {"@type": "@id"},
- "rdfs:domain": {"@type": "@id"},
- "rdfs:range": {"@type": "@id"}
+ "jld:Test": {
+ "@type": "@id"
+ },
+ "dc:identifier": {
+ "@type": "@id"
+ },
+ "rdfs:subClassOf": {
+ "@type": "@id"
+ },
+ "rdfs:domain": {
+ "@type": "@id"
+ },
+ "rdfs:range": {
+ "@type": "@id"
+ }
},
- "@graph": [{
- "@id": "../test-suite/vocab",
- "jld:Test": "rdf:type",
- "dc:creator": "Gregg Kellogg",
- "dc:date": "2013-09-23",
- "dc:description": "Test case manifest vocabulary extensions",
- "dc:identifier": "../test-suite/vocab",
- "dc:publisher": "W3C Linked JSON Community Group",
- "dc:title": "Test case manifest vocabulary extensions",
- "rdfs:comment": "Manifest vocabulary for JSON-LD test cases"
- }, {
- "@id": "jld:CompactTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A CompactTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,\n PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the compact method\n (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-compact-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)\n with the input argument from mf:action referencing a JSON-LD file in expanded form, context from :input and optional options\n from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.\n ",
- "rdfs:label": "Compact Evaluation Test"
- }, {
- "@id": "jld:ExpandTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A ExpandTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,\n PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the expand method\n (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-expand-Promise-any-input-JsonLdOptions-options)\n with the input argument from mf:action referencing a JSON-LD file, and optional options\n from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.\n ",
- "rdfs:label": "Expand Evaluation Test"
- }, {
- "@id": "jld:FlattenTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A FlattenTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,\n PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the flatten method\n (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-flatten-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)\n with the input argument from mf:action referencing a JSON-LD file, optional context from :input and optional options\n from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.\n ",
- "rdfs:label": "Flatten Evaluation Test"
- }, {
- "@id": "jld:FrameTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A FrameTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,\n PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the frame method\n (http://json-ld.org/spec/latest/json-ld-framing/#widl-JsonLdProcessor-frame-void-object-or-object---or-IRI-input-object-or-IRI-frame-JsonLdCallback-callback-JsonLdOptions-options)\n with the input argument from mf:action referencing a JSON-LD file, frame from :input and optional options\n from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.\n ",
- "rdfs:label": "Frame Evaluation Test"
- }, {
- "@id": "jld:FromRDFTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A FromRDFTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,\n PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the \"RDF to Object Conversion\" algorithm\n (http://json-ld.org/spec/latest/json-ld-api/index.html#rdf-to-object-conversion)\n with the input argument from mf:action referencing an N-Quads file and optional options\n from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.\n ",
- "rdfs:label": "From RDF Evaluation Test"
- }, {
- "@id": "jld:NegativeEvaluationTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A Negative Evaluation test is successful when the result of processing\n the input file specified as mf:action results in the error identified\n by the literal value of mf:result. The specifics of invoking test, including\n the interpretation of options (:option) and other input files are\n specified through another class.\n ",
- "rdfs:label": "Positive Evaluation Test",
- "rdfs:subClassOf": "jld:Test"
- }, {
- "@id": "jld:NegativeSyntaxTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A type of test specifically for syntax testing.\n Syntax tests are not required to have an associated result, only an action.\n Negative syntax tests are tests of which the result should be a parser error.\n ",
- "rdfs:label": "Negative Syntax Test",
- "rdfs:subClassOf": "jld:Test"
- }, {
- "@id": "jld:NormalizeTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A NormalizeTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,\n PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the \"Normalization\" algorithm\n (http://json-ld.org/spec/latest/rdf-graph-normalization/#normalization-algorithm)\n with the input argument from mf:action referencing an JSON-LD file and optional options\n from :option. The expected results for a PositiveEvaluationTest are N-Quads serialized in lexographical order\n and MUST be compared using string comparison.\n ",
- "rdfs:label": "Normalization Evaluation Test"
- }, {
- "@id": "jld:Option",
- "@type": "rdfs:Class",
- "rdfs:label": "Processor Options"
- }, {
- "@id": "jld:PositiveEvaluationTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A Positive Evaluation test is successful when the result of processing\n the input file specified as mf:action exactly matches the output file\n specified as mf:result using the comparison defined in\n another class. The specifics of invoking test, including\n the interpretation of options (:option) and other input files are\n specified through another class.\n ",
- "rdfs:label": "Positive Evaluation Test",
- "rdfs:subClassOf": "jld:Test"
- }, {
- "@id": "jld:PositiveSyntaxTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action.",
- "rdfs:label": "Positive Syntax Test",
- "rdfs:subClassOf": "jld:Test"
- }, {
- "@id": "jld:ToRDFTest",
- "@type": "rdfs:Class",
- "rdfs:comment": "\n A ToRDFTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,\n PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the \"Deserialize JSON-LD to RDF algorithm\" algorithm\n (http://json-ld.org/spec/latest/json-ld-api/index.html#deserialize-json-ld-to-rdf-algorithm)\n with the input argument from mf:action referencing an JSON-LD file and optional options\n from :option. The expected results for a PositiveEvaluationTest are N-Quads serialized in lexographical order\n and MUST be compared either string comparison or Dataset as defined\n in [RDF11-CONCEPTS](http://www.w3.org/TR/rdf11-concepts/#section-dataset-isomorphism).\n ",
- "rdfs:label": "To RDF Evaluation Test"
- }, {
- "@id": "jld:base",
- "@type": "rdf:Property",
- "rdfs:comment": "The base IRI to use when expanding or compacting the document. If set, this overrides the input document's IRI.",
- "rdfs:domain": "jld:Test",
- "rdfs:range": "rdfs:Resource"
- }, {
- "@id": "jld:compactArrays",
- "@type": "rdf:Property",
- "rdfs:comment": "If set to true, the JSON-LD processor replaces arrays with just one element with that element during compaction. If set to false, all arrays will remain arrays even if they have just one element.",
- "rdfs:domain": "jld:Test",
- "rdfs:range": "xsd:boolean"
- }, {
- "@id": "jld:documentLoader",
- "@type": "rdf:Property",
- "rdfs:comment": "The callback of the loader to be used to retrieve remote documents and contexts. If specified, it must be used to retrieve remote documents and contexts; otherwise, if not specified, the processor's built-in loader must be used.",
- "rdfs:domain": "jld:Test",
- "rdfs:range": "xsd:string"
- }, {
- "@id": "jld:expandContext",
- "@type": "rdf:Property",
- "rdfs:comment": "A context that is used to initialize the active context when expanding a document.",
- "rdfs:domain": "jld:Test",
- "rdfs:range": "rdfs:Resource"
- }, {
- "@id": "jld:input",
- "@type": "rdf:Property",
- "rdfs:comment": "Secondary input file",
- "rdfs:domain": "jld:Test",
- "rdfs:range": "rdfs:Resource"
- }, {
- "@id": "jld:option",
- "@type": "rdf:Property",
- "rdfs:comment": "Options affecting processing",
- "rdfs:domain": "jld:Test",
- "rdfs:range": "jld:Option"
- }, {
- "@id": "jld:processingMode",
- "@type": "rdf:Property",
- "rdfs:comment": "\n If set to json-ld-1.0, the JSON-LD processor must produce exactly the same results as\n the algorithms defined in this specification.\n If set to another value, the JSON-LD processor is allowed to extend or modify\n the algorithms defined in this specification to enable application-specific optimizations.\n The definition of such optimizations is beyond the scope of this specification and thus not defined.\n Consequently, different implementations may implement different optimizations.\n Developers must not define modes beginning with json-ld as they are reserved for future versions of this specification.\n ",
- "rdfs:domain": "jld:Test",
- "rdfs:range": "xsd:string"
- }, {
- "@id": "jld:produceGeneralizedRDF",
- "@type": "rdf:Property",
- "rdfs:comment": "Unless the produce generalized RDF flag is set to true, RDF triples containing a blank node predicate are excluded from output.",
- "rdfs:domain": "jld:ToRDFTest",
- "rdfs:range": "xsd:boolean"
- }, {
- "@id": "jld:useNativeTypes",
- "@type": "rdf:Property",
- "rdfs:comment": "\n If the use native types flag is set to true, RDF literals with a datatype IRI tha\n equals xsd:integer or xsd:double are converted to a JSON numbers and RDF literals\n with a datatype IRI that equals xsd:boolean are converted to true or false based\n on their lexical form.\n ",
- "rdfs:domain": "jld:FromRDFTest",
- "rdfs:range": "xsd:boolean"
- }]
+ "@graph": [
+ {
+ "@id": "http://json-ld.org/test-suite/vocab#",
+ "dc:creator": "Gregg Kellogg",
+ "dc:date": "2013-09-23",
+ "dc:description": "Test case manifest vocabulary extensions",
+ "dc:identifier": "http://json-ld.org/test-suite/vocab#",
+ "dc:publisher": "W3C Linked JSON Community Group",
+ "dc:title": "Test case manifest vocabulary extensions",
+ "rdfs:comment": "Manifest vocabulary for JSON-LD test cases"
+ },
+ {
+ "@id": "jld:CompactTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A `CompactTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [compact](http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-compact-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)\n method with the input argument from `mf:action` referencing a JSON-LD file in expanded form, context from `:input` and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:label": "Compact Evaluation Test"
+ },
+ {
+ "@id": "jld:ExpandTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A `ExpandTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [expand](http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-expand-Promise-any-input-JsonLdOptions-options)\n method with the input argument from mf:action referencing a JSON-LD file, and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:label": "Expand Evaluation Test"
+ },
+ {
+ "@id": "jld:FlattenTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A `FlattenTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the flatten method\n (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-flatten-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)\n with the input argument from mf:action referencing a JSON-LD file, optional context from `:input` and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:label": "Flatten Evaluation Test"
+ },
+ {
+ "@id": "jld:FrameTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A `FrameTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [frame](http://json-ld.org/spec/latest/json-ld-framing/#widl-JsonLdProcessor-frame-void-object-or-object---or-IRI-input-object-or-IRI-frame-JsonLdCallback-callback-JsonLdOptions-options)\n method with the input argument from `mf:action` referencing a JSON-LD file, frame from `:input` and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:label": "Frame Evaluation Test"
+ },
+ {
+ "@id": "jld:FromRDFTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A `FromRDFTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [RDF to Object Conversion](http://json-ld.org/spec/latest/json-ld-api/index.html#rdf-to-object-conversion)\n algorithm with the input argument from `mf:action` referencing an N-Quads file and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:label": "From RDF Evaluation Test"
+ },
+ {
+ "@id": "jld:NegativeEvaluationTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A Negative Evaluation test is successful when the result of processing\n the input file specified as `mf:action` results in the error identified\n by the literal value of `mf:result`. The specifics of invoking test, including\n the interpretation of options (`:option`) and other input files are\n specified through another class.\n ",
+ "rdfs:label": "Positive Evaluation Test",
+ "rdfs:subClassOf": "jld:Test"
+ },
+ {
+ "@id": "jld:NegativeSyntaxTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A type of test specifically for syntax testing.\n Syntax tests are not required to have an associated result, only an action.\n Negative syntax tests are tests of which the result should be a parser error.\n ",
+ "rdfs:label": "Negative Syntax Test",
+ "rdfs:subClassOf": "jld:Test"
+ },
+ {
+ "@id": "jld:NormalizeTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A `NormalizeTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [Normalization](http://json-ld.org/spec/latest/rdf-graph-normalization/#normalization-algorithm)\n algorithmwith the input argument from mf:action referencing an JSON-LD file and optional options\n from :option. The expected results for a PositiveEvaluationTest are N-Quads serialized in lexographical order\n and MUST be compared using string comparison.\n ",
+ "rdfs:label": "Normalization Evaluation Test"
+ },
+ {
+ "@id": "jld:Option",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "Options passed to the test runner to affect invocation of the appropriate API method.",
+ "rdfs:label": "Processor Options"
+ },
+ {
+ "@id": "jld:PositiveEvaluationTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A Positive Evaluation test is successful when the result of processing\n the input file specified as `mf:action` exactly matches the output file\n specified as `mf:result` using the comparison defined in\n another class. The specifics of invoking test, including\n the interpretation of options (:option) and other input files are\n specified through another class.\n ",
+ "rdfs:label": "Positive Evaluation Test",
+ "rdfs:subClassOf": "jld:Test"
+ },
+ {
+ "@id": "jld:PositiveSyntaxTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action.",
+ "rdfs:label": "Positive Syntax Test",
+ "rdfs:subClassOf": "jld:Test"
+ },
+ {
+ "@id": "jld:Test",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n All JSON-LD tests have an input file referenced using `mf:action`.\n Positive and Negative Evaluation Tests also have a result file\n referenced using `mf:result`. Other tests may take different inputs\n and options as defined for each test class. Tests should be run\n with the processingMode option set to \"json-ld-1.0\", unless specified\n explicitly as a test option.\n ",
+ "rdfs:label": "Superclass of all JSON-LD tests"
+ },
+ {
+ "@id": "jld:ToRDFTest",
+ "@type": "rdfs:Class",
+ "rdfs:comment": "\n A `ToRDFTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [Deserialize JSON-LD to RDF algorithm](http://json-ld.org/spec/latest/json-ld-api/index.html#deserialize-json-ld-to-rdf-algorithm)\n with the input argument from `mf:action` referencing an JSON-LD file and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` are N-Quads serialized in lexographical order\n and MUST be compared either string comparison or Dataset as defined\n in [RDF11-CONCEPTS](http://www.w3.org/TR/rdf11-concepts/#section-dataset-isomorphism).\n ",
+ "rdfs:label": "To RDF Evaluation Test"
+ },
+ {
+ "@id": "jld:base",
+ "@type": "rdfs:Property",
+ "rdfs:comment": "The base IRI to use when expanding or compacting the document. If set, this overrides the input document's IRI.",
+ "rdfs:domain": "jld:Test",
+ "rdfs:label": "base",
+ "rdfs:range": "rdfs:Resource"
+ },
+ {
+ "@id": "jld:compactArrays",
+ "@type": "rdfs:Property",
+ "rdfs:comment": "If set to `true`, the JSON-LD processor replaces arrays with just one element with that element during compaction. If set to false, all arrays will remain arrays even if they have just one element.",
+ "rdfs:domain": "jld:Test",
+ "rdfs:label": "compact arrays",
+ "rdfs:range": "xsd:boolean"
+ },
+ {
+ "@id": "jld:expandContext",
+ "@type": "rdfs:Property",
+ "rdfs:comment": "A context that is used to initialize the active context when expanding a document.",
+ "rdfs:domain": "jld:Test",
+ "rdfs:label": "expand context",
+ "rdfs:range": "rdfs:Resource"
+ },
+ {
+ "@id": "jld:input",
+ "@type": "rdfs:Property",
+ "rdfs:comment": "Secondary input file",
+ "rdfs:domain": "jld:Test",
+ "rdfs:label": "input",
+ "rdfs:range": "rdfs:Resource"
+ },
+ {
+ "@id": "jld:option",
+ "@type": "rdfs:Property",
+ "rdfs:comment": "Options affecting processing",
+ "rdfs:domain": "jld:Test",
+ "rdfs:label": "option",
+ "rdfs:range": "jld:Option"
+ },
+ {
+ "@id": "jld:processingMode",
+ "@type": "rdfs:Property",
+ "rdfs:comment": "\n If set to \"json-ld-1.0\", the JSON-LD processor must produce exactly the same results as\n the algorithms defined in this specification.\n If set to another value, the JSON-LD processor is allowed to extend or modify\n the algorithms defined in this specification to enable application-specific optimizations.\n The definition of such optimizations is beyond the scope of this specification and thus not defined.\n Consequently, different implementations may implement different optimizations.\n Developers must not define modes beginning with json-ld as they are reserved for future versions of this specification.\n ",
+ "rdfs:domain": "jld:Test",
+ "rdfs:label": "processing mode",
+ "rdfs:range": "xsd:string"
+ },
+ {
+ "@id": "jld:produceGeneralizedRDF",
+ "@type": "rdfs:Property",
+ "rdfs:comment": "Unless the produce generalized RDF flag is set to true, RDF triples containing a blank node predicate are excluded from output.",
+ "rdfs:domain": "jld:ToRDFTest",
+ "rdfs:label": "produce generalized RDF",
+ "rdfs:range": "xsd:boolean"
+ },
+ {
+ "@id": "jld:useDocumentLoader",
+ "@type": "rdfs:Property",
+ "rdfs:comment": "\n Test runners must implement a callback method with a method signature as defined\n in [LoadDocumentCallback](http://json-ld.org/spec/latest/json-ld-api/index.html#idl-def-LoadDocumentCallback).\n Specifying this option requires the test runner to provide this callback to the appropriate\n API method using the `documentLoader` option.\n ",
+ "rdfs:domain": "jld:Test",
+ "rdfs:label": "use document loader",
+ "rdfs:range": "xsd:boolean"
+ },
+ {
+ "@id": "jld:useNativeTypes",
+ "@type": "rdfs:Property",
+ "rdfs:comment": "\n If the _use native types_ flag is set to `true`, RDF literals with a datatype IRI tha\n equals `xsd:integer` or `xsd:double` are converted to a JSON numbers and RDF literals\n with a datatype IRI that equals `xsd:boolean` are converted to `true` or `false` based\n on their lexical form.\n ",
+ "rdfs:domain": "jld:FromRDFTest",
+ "rdfs:label": "use native types",
+ "rdfs:range": "xsd:boolean"
+ }
+ ]
}
\ No newline at end of file
--- a/test-suite/vocab.ttl Fri Aug 23 18:04:23 2013 -0700
+++ b/test-suite/vocab.ttl Sat Aug 24 14:39:48 2013 -0700
@@ -15,42 +15,50 @@
dc:title "Test case manifest vocabulary extensions" ;
dc:description "Test case manifest vocabulary extensions" ;
dc:date "2013-09-23" ;
- dc:identifier : ;
-
-## ---- Test Case Type ---
+ dc:identifier : .
-:Test rdf:type rdfs:Class ;
- rdfs:label "Superclass of all JSON-LD tests" .
+## ---- Test Case Classes ---
-:PositiveEvaluationTest rdf:type rdfs:Class ;
+:Test a rdfs:Class ;
+ rdfs:label "Superclass of all JSON-LD tests" ;
+ rdfs:comment """
+ All JSON-LD tests have an input file referenced using `mf:action`.
+ Positive and Negative Evaluation Tests also have a result file
+ referenced using `mf:result`. Other tests may take different inputs
+ and options as defined for each test class. Tests should be run
+ with the processingMode option set to "json-ld-1.0", unless specified
+ explicitly as a test option.
+ """ .
+
+:PositiveEvaluationTest a rdfs:Class ;
rdfs:label "Positive Evaluation Test" ;
rdfs:subClassOf :Test ;
rdfs:comment """
A Positive Evaluation test is successful when the result of processing
- the input file specified as mf:action exactly matches the output file
- specified as mf:result using the comparison defined in
+ the input file specified as `mf:action` exactly matches the output file
+ specified as `mf:result` using the comparison defined in
another class. The specifics of invoking test, including
the interpretation of options (:option) and other input files are
specified through another class.
""" .
-:NegativeEvaluationTest rdf:type rdfs:Class ;
+:NegativeEvaluationTest a rdfs:Class ;
rdfs:label "Positive Evaluation Test" ;
rdfs:subClassOf :Test ;
rdfs:comment """
A Negative Evaluation test is successful when the result of processing
- the input file specified as mf:action results in the error identified
- by the literal value of mf:result. The specifics of invoking test, including
- the interpretation of options (:option) and other input files are
+ the input file specified as `mf:action` results in the error identified
+ by the literal value of `mf:result`. The specifics of invoking test, including
+ the interpretation of options (`:option`) and other input files are
specified through another class.
""" .
-:PositiveSyntaxTest rdf:type rdfs:Class ;
+:PositiveSyntaxTest a rdfs:Class ;
rdfs:subClassOf :Test ;
rdfs:label "Positive Syntax Test" ;
rdfs:comment "A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action." .
-:NegativeSyntaxTest rdf:type rdfs:Class ;
+:NegativeSyntaxTest a rdfs:Class ;
rdfs:subClassOf :Test ;
rdfs:label "Negative Syntax Test" ;
rdfs:comment """
@@ -59,138 +67,153 @@
Negative syntax tests are tests of which the result should be a parser error.
""" .
-:CompactTest rdf:type rdfs:Class ;
+:CompactTest a rdfs:Class ;
rdfs:label "Compact Evaluation Test" ;
rdfs:comment """
- A CompactTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,
- PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the compact method
- (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-compact-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)
- with the input argument from mf:action referencing a JSON-LD file in expanded form, context from :input and optional options
- from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.
+ A `CompactTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,
+ `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the
+ [compact](http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-compact-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)
+ method with the input argument from `mf:action` referencing a JSON-LD file in expanded form, context from `:input` and optional options
+ from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.
""" .
-:ExpandTest rdf:type rdfs:Class ;
+:ExpandTest a rdfs:Class ;
rdfs:label "Expand Evaluation Test" ;
rdfs:comment """
- A ExpandTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,
- PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the expand method
- (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-expand-Promise-any-input-JsonLdOptions-options)
- with the input argument from mf:action referencing a JSON-LD file, and optional options
- from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.
+ A `ExpandTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,
+ `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the
+ [expand](http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-expand-Promise-any-input-JsonLdOptions-options)
+ method with the input argument from mf:action referencing a JSON-LD file, and optional options
+ from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.
""" .
-:FlattenTest rdf:type rdfs:Class ;
+:FlattenTest a rdfs:Class ;
rdfs:label "Flatten Evaluation Test" ;
rdfs:comment """
- A FlattenTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,
- PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the flatten method
+ A `FlattenTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,
+ `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the flatten method
(http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-flatten-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)
- with the input argument from mf:action referencing a JSON-LD file, optional context from :input and optional options
- from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.
- """ .
-
-:FrameTest rdf:type rdfs:Class ;
- rdfs:label "Frame Evaluation Test" ;
- rdfs:comment """
- A FrameTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,
- PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the frame method
- (http://json-ld.org/spec/latest/json-ld-framing/#widl-JsonLdProcessor-frame-void-object-or-object---or-IRI-input-object-or-IRI-frame-JsonLdCallback-callback-JsonLdOptions-options)
- with the input argument from mf:action referencing a JSON-LD file, frame from :input and optional options
- from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.
+ with the input argument from mf:action referencing a JSON-LD file, optional context from `:input` and optional options
+ from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.
""" .
-:FromRDFTest rdf:type rdfs:Class ;
+:FrameTest a rdfs:Class ;
+ rdfs:label "Frame Evaluation Test" ;
+ rdfs:comment """
+ A `FrameTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,
+ `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the
+ [frame](http://json-ld.org/spec/latest/json-ld-framing/#widl-JsonLdProcessor-frame-void-object-or-object---or-IRI-input-object-or-IRI-frame-JsonLdCallback-callback-JsonLdOptions-options)
+ method with the input argument from `mf:action` referencing a JSON-LD file, frame from `:input` and optional options
+ from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.
+ """ .
+
+:FromRDFTest a rdfs:Class ;
rdfs:label "From RDF Evaluation Test" ;
rdfs:comment """
- A FromRDFTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,
- PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the "RDF to Object Conversion" algorithm
- (http://json-ld.org/spec/latest/json-ld-api/index.html#rdf-to-object-conversion)
- with the input argument from mf:action referencing an N-Quads file and optional options
- from :option. The expected results for a PositiveEvaluationTest MUST be compared using JSON object comparison with the processor output.
+ A `FromRDFTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,
+ `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the
+ [RDF to Object Conversion](http://json-ld.org/spec/latest/json-ld-api/index.html#rdf-to-object-conversion)
+ algorithm with the input argument from `mf:action` referencing an N-Quads file and optional options
+ from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.
""" .
-:NormalizeTest rdf:type rdfs:Class ;
+:NormalizeTest a rdfs:Class ;
rdfs:label "Normalization Evaluation Test" ;
rdfs:comment """
- A NormalizeTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,
- PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the "Normalization" algorithm
- (http://json-ld.org/spec/latest/rdf-graph-normalization/#normalization-algorithm)
- with the input argument from mf:action referencing an JSON-LD file and optional options
+ A `NormalizeTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,
+ `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the
+ [Normalization](http://json-ld.org/spec/latest/rdf-graph-normalization/#normalization-algorithm)
+ algorithmwith the input argument from mf:action referencing an JSON-LD file and optional options
from :option. The expected results for a PositiveEvaluationTest are N-Quads serialized in lexographical order
and MUST be compared using string comparison.
""" .
-:ToRDFTest rdf:type rdfs:Class ;
+:ToRDFTest a rdfs:Class ;
rdfs:label "To RDF Evaluation Test" ;
rdfs:comment """
- A ToRDFTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest,
- PositiveSyntaxTest or NegativeSyntaxTest. Tests are run using the "Deserialize JSON-LD to RDF algorithm" algorithm
- (http://json-ld.org/spec/latest/json-ld-api/index.html#deserialize-json-ld-to-rdf-algorithm)
- with the input argument from mf:action referencing an JSON-LD file and optional options
- from :option. The expected results for a PositiveEvaluationTest are N-Quads serialized in lexographical order
+ A `ToRDFTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,
+ `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the
+ [Deserialize JSON-LD to RDF algorithm](http://json-ld.org/spec/latest/json-ld-api/index.html#deserialize-json-ld-to-rdf-algorithm)
+ with the input argument from `mf:action` referencing an JSON-LD file and optional options
+ from `:option`. The expected results for a `PositiveEvaluationTest` are N-Quads serialized in lexographical order
and MUST be compared either string comparison or Dataset as defined
in [RDF11-CONCEPTS](http://www.w3.org/TR/rdf11-concepts/#section-dataset-isomorphism).
""" .
-:Option rdf:type rdfs:Class ;
- rdfs:label "Processor Options" .
+:Option a rdfs:Class ;
+ rdfs:label "Processor Options" ;
+ rdfs:comment "Options passed to the test runner to affect invocation of the appropriate API method." .
## ---- Property declarations for each test ----
-:input rdf:type rdf:Property ;
- rdfs:comment "Secondary input file" ;
- rdfs:domain :Test ;
- rdfs:range rdfs:Resource .
-
-:option rdf:type rdf:Property ;
- rdfs:comment "Options affecting processing" ;
- rdfs:domain :Test ;
- rdfs:range :Option .
-
-:base rdf:type rdf:Property ;
- rdfs:comment "The base IRI to use when expanding or compacting the document. If set, this overrides the input document's IRI." ;
- rdfs:domain :Test ;
- rdfs:range rdfs:Resource .
+:input a rdfs:Property ;
+ rdfs:label "input";
+ rdfs:comment "Secondary input file" ;
+ rdfs:domain :Test ;
+ rdfs:range rdfs:Resource .
-:compactArrays rdf:type rdf:Property ;
- rdfs:comment "If set to true, the JSON-LD processor replaces arrays with just one element with that element during compaction. If set to false, all arrays will remain arrays even if they have just one element." ;
- rdfs:domain :Test ;
- rdfs:range xsd:boolean .
+:option a rdfs:Property ;
+ rdfs:label "option";
+ rdfs:comment "Options affecting processing" ;
+ rdfs:domain :Test ;
+ rdfs:range :Option .
-:documentLoader rdf:type rdf:Property ;
- rdfs:comment "The callback of the loader to be used to retrieve remote documents and contexts. If specified, it must be used to retrieve remote documents and contexts; otherwise, if not specified, the processor's built-in loader must be used." ;
- rdfs:domain :Test ;
- rdfs:range xsd:string .
+:base a rdfs:Property ;
+ rdfs:label "base";
+ rdfs:comment "The base IRI to use when expanding or compacting the document. If set, this overrides the input document's IRI." ;
+ rdfs:domain :Test ;
+ rdfs:range rdfs:Resource .
-:expandContext rdf:type rdf:Property ;
- rdfs:comment "A context that is used to initialize the active context when expanding a document." ;
- rdfs:domain :Test ;
- rdfs:range rdfs:Resource .
+:compactArrays a rdfs:Property ;
+ rdfs:label "compact arrays";
+ rdfs:comment "If set to `true`, the JSON-LD processor replaces arrays with just one element with that element during compaction. If set to false, all arrays will remain arrays even if they have just one element." ;
+ rdfs:domain :Test ;
+ rdfs:range xsd:boolean .
-:processingMode rdf:type rdf:Property ;
- rdfs:comment """
- If set to json-ld-1.0, the JSON-LD processor must produce exactly the same results as
+:useDocumentLoader a rdfs:Property ;
+ rdfs:label "use document loader";
+ rdfs:comment """
+ Test runners must implement a callback method with a method signature as defined
+ in [LoadDocumentCallback](http://json-ld.org/spec/latest/json-ld-api/index.html#idl-def-LoadDocumentCallback).
+ Specifying this option requires the test runner to provide this callback to the appropriate
+ API method using the `documentLoader` option.
+ """ ;
+ rdfs:domain :Test ;
+ rdfs:range xsd:boolean .
+
+:expandContext a rdfs:Property ;
+ rdfs:label "expand context";
+ rdfs:comment "A context that is used to initialize the active context when expanding a document." ;
+ rdfs:domain :Test ;
+ rdfs:range rdfs:Resource .
+
+:processingMode a rdfs:Property ;
+ rdfs:label "processing mode";
+ rdfs:comment """
+ If set to "json-ld-1.0", the JSON-LD processor must produce exactly the same results as
the algorithms defined in this specification.
If set to another value, the JSON-LD processor is allowed to extend or modify
the algorithms defined in this specification to enable application-specific optimizations.
The definition of such optimizations is beyond the scope of this specification and thus not defined.
Consequently, different implementations may implement different optimizations.
Developers must not define modes beginning with json-ld as they are reserved for future versions of this specification.
- """ ;
- rdfs:domain :Test ;
- rdfs:range xsd:string .
-
-:produceGeneralizedRDF rdf:type rdf:Property ;
- rdfs:comment "Unless the produce generalized RDF flag is set to true, RDF triples containing a blank node predicate are excluded from output." ;
- rdfs:domain :ToRDFTest ;
- rdfs:range xsd:boolean .
+ """ ;
+ rdfs:domain :Test ;
+ rdfs:range xsd:string .
-:useNativeTypes rdf:type rdf:Property ;
- rdfs:comment """
- If the use native types flag is set to true, RDF literals with a datatype IRI tha
- equals xsd:integer or xsd:double are converted to a JSON numbers and RDF literals
- with a datatype IRI that equals xsd:boolean are converted to true or false based
- on their lexical form.
- """ ;
- rdfs:domain :FromRDFTest ;
- rdfs:range xsd:boolean .
+:produceGeneralizedRDF a rdfs:Property ;
+ rdfs:label "produce generalized RDF";
+ rdfs:comment "Unless the produce generalized RDF flag is set to true, RDF triples containing a blank node predicate are excluded from output." ;
+ rdfs:domain :ToRDFTest ;
+ rdfs:range xsd:boolean .
+
+:useNativeTypes a rdfs:Property ;
+ rdfs:label "use native types";
+ rdfs:comment """
+ If the _use native types_ flag is set to `true`, RDF literals with a datatype IRI tha
+ equals `xsd:integer` or `xsd:double` are converted to a JSON numbers and RDF literals
+ with a datatype IRI that equals `xsd:boolean` are converted to `true` or `false` based
+ on their lexical form.
+ """ ;
+ rdfs:domain :FromRDFTest ;
+ rdfs:range xsd:boolean .