Typedef Documentation

typedef
struct SratomImpl Sratom
Atom serialiser.

Enumeration Type Documentation

enum
SratomObjectMode
Mode for reading resources to LV2 Objects. This affects how
resources (which are either blank nodes or have URIs) are
read by sratom_read(), since they may be read as
simple references (a URI or blank node ID) or a complete
description (an atom ’Object’).

Currently,
blank nodes are always read as Objects, but support for
reading blank node IDs may be added in the future.

Enumerator
SRATOM_OBJECT_MODE_BLANK

Read blank nodes as Objects,
and named resources as URIs.

SRATOM_OBJECT_MODE_BLANK_SUBJECT

Read blank nodes and the main
subject as Objects, and any other named resources as URIs.
The ’main subject’ is the subject parameter
passed to sratom_read(); if this is a resource it
will be read as an Object, but all other named resources
encountered will be read as URIs.

Function Documentation

Sratom*
sratom_new (LV2_URID_Map * map)
Create a new Atom serialiser.

void
sratom_free (Sratom * sratom)
Free an Atom serialisation.

void
sratom_set_env (Sratom * sratom, SerdEnv * env)
Set the environment for reading or writing Turtle. This can
be used to set namespace prefixes and a base URI for
sratom_to_turtle() and
sratom_from_turtle().

void
sratom_set_sink (Sratom * sratom, const char * base_uri,
SerdStatementSink sink, SerdEndSink end_sink, void *
handle)
Set the sink(s) where sratom will write its output. This
must be called before calling sratom_write().

void
sratom_set_pretty_numbers (Sratom * sratom, bool
pretty_numbers)
Write pretty numeric literals. If pretty_numbers is
true, numbers will be written as pretty Turtle literals,
rather than string literals with precise types. The cost of
this is that the types might get fudged on a round-trip to
RDF and back.