WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

Background

Import & Export

Import Elements

Options

Examples  
Basic Examples  
See Also
GraphStore`

NQuads (.nq)

Background

Import & Export

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules" full list of rules for each element and option
    "Options" list of rules for options, properties and settings
  • Data representation elements:
  • "Data" an RDFStore

Options

  • Import options:
  • "ProduceGeneralizedRDF" False whether to import a file that contains a blank node in a property position

Examples

Basic Examples  (1)

Wolfram Language code: Needs["GraphStore`"]

Import data about persons:

Wolfram Language code: 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:

Wolfram Language code: 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"}]

See Also

Formats: TriG   JSONLD   NTriples

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /