rdf4h-3.0.0: A library for RDF processing in Haskell

Safe HaskellNone
LanguageHaskell98

Data.RDF.Graph.MapSP

Description

A graph implementation mapping (S,P) pairs to O, backed by Map.

Synopsis

Documentation

data SP Source #

A map-based graph implementation.

This instance of RDF is an adjacency map with each subject mapping to a mapping from a predicate node to to the adjacent nodes via that predicate.

Given the following triples graph::

  (http://example.com/s1,http://example.com/p1,http://example.com/o1)
  (http://example.com/s1,http://example.com/p1,http://example.com/o2)
  (http://example.com/s1,http://example.com/p2,http://example.com/o1)
  (http://example.com/s2,http://example.com/p3,http://example.com/o3)

the in-memory map representation of the triples graph is:

key:(http://example.com/s1,http://example.com/p1),
value:[http://example.com/o1,http://example.com/o2];

key:(http://example.com/s1,http://example.com/p2),
value:[http://example.com/o1];

key:(http://example.com/s2,http://example.com/p3),
value:[http://example.com/o3];

Instances

Generic SP Source # 

Associated Types

type Rep SP :: * -> * #

Methods

from :: SP -> Rep SP x #

to :: Rep SP x -> SP #

Binary SP Source # 

Methods

put :: SP -> Put #

get :: Get SP #

putList :: [SP] -> Put #

NFData SP Source # 

Methods

rnf :: SP -> () #

Rdf SP Source # 
Generic (RDF SP) Source # 

Associated Types

type Rep (RDF SP) :: * -> * #

Methods

from :: RDF SP -> Rep (RDF SP) x #

to :: Rep (RDF SP) x -> RDF SP #

NFData (RDF SP) Source # 

Methods

rnf :: RDF SP -> () #

type Rep SP Source # 
type Rep SP = D1 (MetaData "SP" "Data.RDF.Graph.MapSP" "rdf4h-3.0.0-2ntD2jwEZEwPz1DcgwjHG" False) V1
data RDF SP Source # 
data RDF SP = SP (SPMap, Maybe BaseUrl, PrefixMappings)
type Rep (RDF SP) Source # 
type Rep (RDF SP)