redland-0.2.0.1: Redland RDF library bindings

Maintainerdefanor <defanor@uberspace.net>
Stabilityunstable
Portabilitynon-portable (GHC extensions are used)
Safe HaskellSafe
LanguageHaskell2010

Redland.Util

Contents

Description

Utility functions based on mid-level bindings.

Synopsis

Hashes

withHash :: ForeignPtr RedlandWorld -> String -> [(String, String)] -> (ForeignPtr RedlandHash -> IO a) -> IO a Source #

Mostly a conversion function.

RDF Graph (librdf_model)

RDF term (librdf_node)

data Node Source #

Haskell representation of RedlandNode.

Instances

Eq Node Source # 

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

Ord Node Source # 

Methods

compare :: Node -> Node -> Ordering #

(<) :: Node -> Node -> Bool #

(<=) :: Node -> Node -> Bool #

(>) :: Node -> Node -> Bool #

(>=) :: Node -> Node -> Bool #

max :: Node -> Node -> Node #

min :: Node -> Node -> Node #

Show Node Source # 

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

NFData Node Source # 

Methods

rnf :: Node -> () #

redlandNodeToNode :: ForeignPtr RedlandNode -> IO Node Source #

A conversion function.

Parsers

guessingParseStringIntoModel Source #

Arguments

:: ForeignPtr RedlandWorld 
-> ForeignPtr RedlandModel 
-> ForeignPtr RedlandURI

base URI

-> String

string to parse

-> IO () 

Guesses a parser name, and applies it.

Querying

withQuery Source #

Arguments

:: ForeignPtr RedlandWorld 
-> ForeignPtr RedlandModel 
-> String

query language

-> String

query string

-> Maybe (ForeignPtr RedlandURI)

base URI

-> (QueryResults -> IO a) 
-> IO a 

Querying helper.

Query results

RDF Triple (librdf_statement)

data Triple Source #

Haskell representation of RedlandStatement.

Constructors

Triple 

Stream of triples (librdf_statement)

streamToList :: ForeignPtr RedlandStream -> IO [Triple] Source #

A conversion function.

Other

withWSMU Source #

Arguments

:: String

storage factory

-> [(String, String)]

storage options

-> String

storage identifier

-> String

model options

-> String

base URI

-> (ForeignPtr RedlandWorld -> ForeignPtr RedlandStorage -> ForeignPtr RedlandModel -> ForeignPtr RedlandURI -> IO a) 
-> IO a 

Initializes world, storage, model, and base URI at once.