NQuads (.nq)
-
See Also
- Formats
- "TriG"
- "JSONLD"
- "NTriples"
-
-
See Also
- Formats
- "TriG"
- "JSONLD"
- "NTriples"
-
See Also
Background
Import & Export
Import Elements
Options
Examples
Basic Examples
See Also
GraphStore`
Wolfram Language code:
Wolfram Language code:
Wolfram Language code:
NQuads (.nq)
Background
-
- MIME type: application/n-quads.
- Line-based format for RDF datasets.
- N-Quads is an extension of N-Triples.
- N-Quads is specified https://www.w3.org/TR/n-quads/.
Examples
Basic Examples (1)
Needs["GraphStore`"]personStore = ImportString["
<http://example.org/ralph> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
<http://example.org/ralph> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://example.org/graph/ralph> .
<http://example.org/ralph> <http://example.org/hairColor> \"red\" <http://example.org/graph/ralph> .
", "NQuads"]Find all persons together with their hair color:
personStore//SPARQLSelect[{
RDFTriple[SPARQLVariable["person"], URL["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"], URL["http://schema.org/Person"]],
RDFTriple[SPARQLVariable["person"], URL["http://www.w3.org/2000/01/rdf-schema#seeAlso"], SPARQLVariable["g"]],
SPARQLGraph[SPARQLVariable["g"], RDFTriple[SPARQLVariable["person"], URL["http://example.org/hairColor"], SPARQLVariable["hairColor"]]]
} -> {"person", "hairColor"}]