redland-0.2.0.1: Redland RDF library bindings

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

Redland.LowLevel

Contents

Description

Low-level Redland RDF library bindings, a straightforward translation.

Synopsis

World

Hashes

librdf_hash_put_strings Source #

Arguments

:: Ptr RedlandHash

hash

-> CString

key

-> CString

value

-> IO CInt

non-zero on failure

librdf_hash_get Source #

Arguments

:: Ptr RedlandHash

hash

-> CString

key

-> IO CString

must be freed by the caller

librdf_hash_get_del Source #

Arguments

:: Ptr RedlandHash

hash

-> CString

key

-> IO CString

must be freed by the caller

RDF Graph (librdf_model)

librdf_model_load Source #

Arguments

:: Ptr RedlandModel 
-> Ptr RedlandURI

source URI

-> CString

parser name, can be NULL

-> CString

MIME type, can be NULL

-> Ptr RedlandURI

type URI, can be NULL

-> IO CInt 

RDF term (librdf_node)

librdf_new_node_from_blank_identifier Source #

Arguments

:: Ptr RedlandWorld 
-> CString

blank node identifier, can be NULL

-> IO (Ptr RedlandNode) 

librdf_new_node_from_literal Source #

Arguments

:: Ptr RedlandWorld 
-> CString

string value

-> CString

literal XML language, can be NULL

-> CInt

non-zero if literal is XML

-> IO (Ptr RedlandNode) 

librdf_new_node_from_typed_literal Source #

Arguments

:: Ptr RedlandWorld 
-> CString

string value

-> CString

literal XML language, can be NULL

-> Ptr RedlandURI

typed literal datatype URI, can be NULL

-> IO (Ptr RedlandNode) 

librdf_node_get_literal_value Source #

Arguments

:: Ptr RedlandNode 
-> IO CString

Literal value, must be copied

librdf_node_get_literal_value_language Source #

Arguments

:: Ptr RedlandNode 
-> IO CString

Literal language value, must be copied

librdf_node_get_literal_value_datatype_uri Source #

Arguments

:: Ptr RedlandNode 
-> IO (Ptr RedlandURI)

Literal datatype URI, must be copied

librdf_node_get_literal_value_is_wf_xml Source #

Arguments

:: Ptr RedlandNode 
-> IO CInt

0 if it's not well formed XML

librdf_node_get_uri Source #

Arguments

:: Ptr RedlandNode 
-> IO (Ptr RedlandURI)

URI, must be copied

Parsers

librdf_new_parser Source #

Arguments

:: Ptr RedlandWorld

world

-> CString

name

-> CString

MIME type

-> Ptr RedlandURI

type URI

-> IO (Ptr RedlandParser) 

librdf_parser_parse_string_into_model Source #

Arguments

:: Ptr RedlandParser

parser

-> CString

string to parse

-> Ptr RedlandURI

base URI

-> Ptr RedlandModel

model

-> IO CInt

non-zero on failure

librdf_parser_guess_name2 Source #

Arguments

:: Ptr RedlandWorld 
-> CString

MIME type or NULL

-> CString

content buffer or NULL

-> CString

content identifier or NULL

-> IO CString

parser name or NULL

Querying

librdf_new_query Source #

Arguments

:: Ptr RedlandWorld 
-> CString

language name

-> Ptr RedlandURI

language URI (can be NULL)

-> CString

query string

-> Ptr RedlandURI

base URI (can be NULL)

-> IO (Ptr RedlandQuery) 

Query results

RDF Triple (librdf_statement)

librdf_new_statement_from_nodes :: Ptr RedlandWorld -> Ptr RedlandNode -> Ptr RedlandNode -> Ptr RedlandNode -> IO (Ptr RedlandStatement) Source #

"The node objects become owned by the new statement (or freed on error)."

librdf_statement_get_subject Source #

Arguments

:: Ptr RedlandStatement 
-> IO (Ptr RedlandNode)

the returned node is shared, should be copied

librdf_statement_set_subject Source #

Arguments

:: Ptr RedlandStatement 
-> Ptr RedlandNode

becomes owned by the statement

-> IO () 

Triple stores

librdf_new_storage Source #

Arguments

:: Ptr RedlandWorld

world

-> CString

storage type name (e.g., "hashes")

-> CString

storage identifier

-> CString

options

-> IO (Ptr RedlandStorage) 

librdf_new_storage_with_options Source #

Arguments

:: Ptr RedlandWorld

world

-> CString

storage type name (e.g., "hashes")

-> CString

storage identifier

-> Ptr RedlandHash

options

-> IO (Ptr RedlandStorage) 

Stream of triples (librdf_statement)

librdf_stream_get_object Source #

Arguments

:: Ptr RedlandStream 
-> IO (Ptr RedlandStatement)

a shared statement, should be copied

URI

librdf_new_uri Source #

Arguments

:: Ptr RedlandWorld

world

-> CString

URI string

-> IO (Ptr RedlandURI)