swish-0.6.3.0: A semantic web toolkit.

PortabilityOverloadedStrings
Stabilityexperimental
MaintainerDouglas Burke

Swish.RDF.RDFParser

Description

Support for the RDF Parsing modules.

Synopsis

Documentation

type SpecialMap = LookupMap (String, ScopedName)Source

Type for special name lookup table

prefixTable :: [Namespace]Source

Define default table of namespaces

specialTable :: Maybe ScopedName -> [(String, ScopedName)]Source

Define default special-URI table. The optional argument defines the initial base URI.

runParserWithErrorSource

Arguments

:: Parser a b

parser (carrying state) to apply

-> a

starting state for the parser

-> Text

input to be parsed

-> Either String b 

Run the parser and return the successful parse or an error message which consists of the standard Polyparse error plus a fragment of the unparsed input to provide context.

ignore :: Applicative f => f a -> f ()Source

lexeme :: Parser s a -> Parser s aSource

endBy :: Parser s a -> Parser s b -> Parser s [a]Source

sepEndBy :: Parser s a -> Parser s b -> Parser s [a]Source

sepEndBy1 :: Parser s a -> Parser s b -> Parser s [a]Source

manyTill :: Parser s a -> Parser s b -> Parser s [a]Source

mkTypedLitSource

Arguments

:: ScopedName

the type

-> Text

the value

-> RDFLabel 

Create a typed literal.

appendURIsSource

Arguments

:: URI

The base URI

-> URI

The URI to append (it can be an absolute URI).

-> Either String URI 

Append the two URIs. Should probably be moved out of RDFParser. It is also just a thin wrapper around relativeTo.