swish-0.3.0.0: A semantic web toolkit.

PortabilityDeriveFunctor, DeriveFoldable, DeriveTraversable, FlexibleInstances, MultiParamTypeClasses
Stabilityexperimental
MaintainerDouglas Burke

Swish.RDF.GraphMem

Description

This module defines a simple memory-based graph instance.

Synopsis

Documentation

data GraphMem lb Source

Memory-based graph type

Constructors

GraphMem 

Fields

arcs :: [Arc lb]
 

setArcs :: LDGraph lg lb => [Arc lb] -> lg lb -> lg lbSource

getArcs :: LDGraph lg lb => lg lb -> [Arc lb]Source

add :: LDGraph lg lb => lg lb -> lg lb -> lg lbSource

delete :: LDGraph lg lb => lg lb -> lg lb -> lg lbSource

extract :: LDGraph lg lb => Selector lb -> lg lb -> lg lbSource

labels :: LDGraph lg lb => lg lb -> [lb]Source

data LabelMem Source

Minimal graph label value - for testing

Constructors

LF String 
LV String 

labelIsVar :: Label lb => lb -> BoolSource

labelHash :: Label lb => Int -> lb -> IntSource

matchGraphMemSource

Arguments

:: Label lb 
=> GraphMem lb 
-> GraphMem lb 
-> (Bool, LabelMap (ScopedLabel lb))

if the first element is True then the second value is a label map that maps each label to an equivalence-class identifier, otherwise emptyMap.

GraphMem matching function accepting GraphMem value and returning node map if successful