swish-0.9.0.11: A semantic web toolkit.

PortabilityOverloadedStrings
Stabilityexperimental
MaintainerDouglas Burke
Safe HaskellNone

Swish.RDF.Formatter.N3

Description

This Module implements a Notation 3 formatter for an RDFGraph value.

REFERENCES:

TODO:

  • Initial prefix list to include nested formulae; then don't need to update prefix list for these.
  • correct output of strings containing unsupported escape characters (such as \q)
  • more flexible terminator generation for formatted formulae (for inline blank nodes.)

Synopsis

Documentation

type NodeGenLookupMap = Map RDFLabel Word32Source

Node name generation state information that carries through and is updated by nested formulae.

formatGraphAsText :: RDFGraph -> TextSource

Convert the graph to text.

formatGraphAsLazyText :: RDFGraph -> TextSource

Convert the graph to text.

formatGraphAsBuilder :: RDFGraph -> BuilderSource

Convert the graph to a Builder.

formatGraphIndentSource

Arguments

:: Builder

indentation text

-> Bool

are prefixes to be generated?

-> RDFGraph

graph

-> Builder 

Convert the graph to a builder using the given indentation text.

formatGraphDiagSource

Arguments

:: Builder

indentation

-> Bool

are prefixes to be generated?

-> RDFGraph 
-> (Builder, NodeGenLookupMap, Word32, [String]) 

Format graph and return additional information