class EasyRdf_Serialiser_Turtle extends EasyRdf_Serialiser
Class to serialise an EasyRdf_Graph to Turtle with no external dependancies.
http://www.w3.org/TR/turtle/
Methods
__construct()
|
from EasyRdf_Serialiser | |
string |
serialise(EasyRdf_Graph $graph, string $format, array $options = array())
Serialise an EasyRdf_Graph to Turtle. |
|
static string |
escapeIri(string $resourceIri)
Given a IRI string, escape and enclose in angle brackets. |
|
static string |
quotedString(string $value)
Given a string, enclose in quotes and escape any quotes in the string. |
|
string |
serialiseResource(EasyRdf_Resource $resource, boolean $createNamespace = false)
Given a an EasyRdf_Resource or URI, convert it into a string, suitable to be written to a Turtle document. |
|
string |
serialiseLiteral(EasyRdf_Literal $literal)
Given an EasyRdf_Literal object, convert it into a string, suitable to be written to a Turtle document. |
|
string |
serialiseObject(EasyRdf_Resource|EasyRdf_Literal $object)
Convert an EasyRdf object into a string suitable to be written to a Turtle document. |
Details
in EasyRdf_Serialiser at line 49
public
__construct()
at line 340
public string
serialise(EasyRdf_Graph $graph, string $format, array $options = array())
Serialise an EasyRdf_Graph to Turtle.
at line 58
static public string
escapeIri(string $resourceIri)
Given a IRI string, escape and enclose in angle brackets.
at line 72
static public string
quotedString(string $value)
Given a string, enclose in quotes and escape any quotes in the string.
Strings containing tabs, linefeeds or carriage returns will be enclosed in three double quotes (""").
at line 92
public string
serialiseResource(EasyRdf_Resource $resource, boolean $createNamespace = false)
Given a an EasyRdf_Resource or URI, convert it into a string, suitable to be written to a Turtle document.
URIs will be shortened into CURIES where possible.
at line 120
public string
serialiseLiteral(EasyRdf_Literal $literal)
Given an EasyRdf_Literal object, convert it into a string, suitable to be written to a Turtle document.
Supports multiline literals and literals with datatypes or languages.
at line 152
public string
serialiseObject(EasyRdf_Resource|EasyRdf_Literal $object)
Convert an EasyRdf object into a string suitable to be written to a Turtle document.