modules/rdf/parser/ntriples.zzm

rdf-0.0.3 documentation

NAME

rdf/parser/ntriples - N-Triples parser.

SYNOPSIS

  from rdf/parser/ntriples import NTriplesParser;

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

DESCRIPTION

NTriplesParser parses RDF 1.1 N-Triples into RDF quads in the default graph. It accepts base and into parser options for consistency with the other RDF parsers, though N-Triples requires absolute IRIs.

EXPORTS

Classes

  • NTriplesParser
    • 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/ntriples 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.