予備知識
ImportとExport
要素
オプション
例題
例
関連項目
GraphStore`
Wolfram Language code:
Wolfram Language code:
Wolfram Language code:
NQuads (.nq)
予備知識
-
- MIMEタイプ:application/n-quads
- RDFデータ集合のための行ベース形式
- N-QuadsはN-Triplesの拡張である.
- N-Quadsはhttps://www.w3.org/TR/n-quads/に記述されている.
例題
例 (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"]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"}]