modules/rdf/parser/nquads.zzm

rdf-0.0.3 documentation

NAME

rdf/parser/nquads - N-Quads parser.

SYNOPSIS

  from rdf/parser/nquads import NQuadsParser;

  let parser := new NQuadsParser();
  let quads := parser.parse_string("<s> <p> \"o\" <g> .\n");

DESCRIPTION

NQuadsParser parses RDF 1.1 N-Quads into RDF quads. Lines without an explicit graph are loaded into the default graph. It accepts base and into parser options for consistency with the other RDF parsers, though N-Quads requires absolute IRIs.

EXPORTS

Classes

  • NQuadsParser
    • parse_string(String text, ... options)

      Parses text. Returns an array of quads, or the supplied into store after adding the quads. Throws RDFSyntaxError on invalid input.

    • parse_file(path, ... options)

      Reads UTF-8 from path and parses it.

    • parse_lines(Array lines, ... options)

      Parses concatenated line chunks.

    • parse_chunks(Array chunks, ... options)

      Parses concatenated string or nested-array chunks.

COPYRIGHT AND LICENCE

rdf/parser/nquads is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.