swish-0.10.10.0: A semantic web toolkit.

Copyright | (c) 2011 2012 2013 2018 2021 Douglas Burke
License | GPL V2
Maintainer | Douglas Burke
Stability | experimental
Portability | CPP
Safe Haskell | Safe-Inferred
Language | Haskell2010

Swish.RDF.Parser.NTriples

Description

This Module implements a NTriples parser, returning a new `RDFGraph` consisting of triples and namespace information parsed from the supplied NTriples input string, or an error indication.

REFERENCES:

- "RDF Test Cases", W3C Recommendation 10 February 2004, http://www.w3.org/TR/rdf-testcases/#ntriples

NOTES:

- If the URI is actually an IRI (Internationalized Resource Identifiers) then the parser will fail since `parseURI` fails.
- The case of language tags is retained.
- Update to the document "N-Triples. A line-based syntax for an RDF graph" W3C Working Group Note 09 April 2013, http://www.w3.org/TR/2013/NOTE-n-triples-20130409/

Synopsis

- type ParseResult = Either String RDFGraph
- parseNT :: Text -> ParseResult

# Documentation

type ParseResult = Either String RDFGraph Source #

The result of a parse, which is either an error message or a graph.

parseNT Source #

Arguments

:: Text | input in NTriples format.
-> ParseResult |

Parse a string.