pangraph-0.2.1: A set of parsers for graph languages and conversions to graph libaries.

Safe HaskellNone
LanguageHaskell2010

Pangraph.Gml.Writer

Description

Functions for writing gml files. Follows the gml specification at http://www.fim.uni-passau.de/fileadmin/files/lehrstuhl/brandenburg/projekte/gml/gml-technical-report.pdf execpt for two cases:

  1. all produced ByteStrings are encoded in UTF8 instead of ASCII,
  2. the line length limit is ignored.
Synopsis

Documentation

writeGml :: Gml ByteString -> Maybe ByteString Source #

Serializes a Gml syntax tree into a bytestring. Produces Nothing for all values except Object since a gml file must contain at least one top level object to hold all values.

pangraphToGml :: Pangraph -> Gml ByteString Source #

Converts a Pangraph into a Gml syntax tree. Automatically encodes special characters in strings.

write :: Pangraph -> ByteString Source #

Serializes a Pangraph into a GML file.

encodeStrings :: Gml ByteString -> Gml ByteString Source #

Encodes the string values in a Gml syntax tree.