Serializers in Raptor (triples to syntax)
Introduction This section describes the serializers that can be compiled into Raptor and their options. The exact serializers supported may vary by different builds of raptor and can be queried at run-time by use of the raptor_world_get_serializer_description function The optional options that may be set on parsers can also be queried at run-time with the raptor_world_get_option_description function.
Atom 1.0 serializer (name <literal>atom</literal>) A serializer to the Atom 1.0 syndication format defined in IETF RFC 4287. This serializes an RDF graph written in the RSS 1.0 data model to Atom 1.0 plus optionally writes extra RDF triples. The extra RDF triples are written into an at:md metadata block, along with at:feedmap and at:entrymap elements to describe the RSS 1.0 predicate to Atom 1.0 elements mappings for the feed and entry blocks respecively. The extra triples are enabled when serializer option 'rssTriples' is set to string value 'atom-triples'. If no atom triples content type field (at:contentType predicate) is given, the type is set to 'text/html' when writing out an atom:content field in Atom 1.0 format.
JSON serializers (name <literal>json</literal> and name <literal>json-triples</literal>) Two serializers that write JSON in either a resource-centric format with name json and in a triple-dump format with name json-triples. The resource-centric format is based on the Talis RDF/JSON design and the triple-dump format based on the SPARQL query results in JSON design.
mKR serializer - default (name <literal>mkr</literal>) A serializer for the mKR (my Knowledge Representation) Language
N-Quads serializer - default (name <literal>nquads</literal>) A serializer to the N-Quads extension to N-Triples, providing an optional 4th context graph term at the end of the line when a named graph is associated with a triple (the triple is contained in a named graph). This is useful for seeing the output of named graphs or dealing with SPARQL Datasets.
N-Triples serializer - default (name <literal>ntriples</literal>) A serializer to the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.
RDF/XML serializer (name <literal>rdfxml</literal>) A serializer to the standard RDF/XML syntax as revised by the W3C RDF Core working group. This writes a plain triple-based RDF/XML serialization with no optimisation or pretty-printing.
RDF/XML (Abbreviated) serializer (name <literal>rdfxml-abbrev</literal>) An RDF/XML serializer using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents.
RDF/XML (XMP Profile) serializer (name <literal>rdfxml-xmp</literal>) A serializer to the Adobe XMP profile of RDF/XML suitable for embedding inside an external document. Embedding means that the XML header is omitted, wheras for other XML serializings, it is always emitted.
Turtle serializer (name <literal>turtle</literal>) A serializer for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.
RSS 1.0 serializer (name <literal>rss-1.0</literal>) A serializer to the RDF Site Summary (RSS) 1.0 format for describing a syndication feed of items. By default this only serializes the RDF triples that describe the RSS channel and items found. If serialiser option 'rssTriples' is set to value 'rdf-xml' then any additional triples found will be included in the channel or item output.
GraphViz dot serializer (name <literal>dot</literal>) A serializer to the GraphViz DOT format. This serializer has a set of associated serializer options that may be set to customise the output colors using raptor_serializer_set_option() with the appropriate option name and value as given below. RAPTOR_OPTION_RESOURCE_BORDER Border color of resource nodes RAPTOR_OPTION_LITERAL_BORDER Border color of literal nodes RAPTOR_OPTION_BNODE_BORDER Border color of blank nodes RAPTOR_OPTION_RESOURCE_FILL Fill color of resource nodes RAPTOR_OPTION_LITERAL_FILL Fill color of literal nodes RAPTOR_OPTION_BNODE_FILL Fill color of blank nodes