NtriplesUtil
in package
Description of Util
Tags
Table of Contents
Properties
- $iriEscapeMap : array<string|int, string>
- Characters forbidden in n-triples literals according to https://www.w3.org/TR/n-triples/#grammar-production-IRIREF
- $literalEscapeMap : array<string|int, string>
- Characters forbidden in n-triples literals according to https://www.w3.org/TR/n-triples/#grammar-production-STRING_LITERAL_QUOTE
Methods
- escapeIri() : string
- escapeLiteral() : string
- serialize() : string
- serializeIri() : string
- serializeLiteral() : string
- serializeQuad() : string
Properties
$iriEscapeMap
Characters forbidden in n-triples literals according to https://www.w3.org/TR/n-triples/#grammar-production-IRIREF
private
static array<string|int, string>
$iriEscapeMap
= ["<" => "\\u003C", ">" => "\\u003E", '"' => "\\u0022", "{" => "\\u007B", "}" => "\\u007D", "|" => "\\u007C", "^" => "\\u005E", "`" => "\\u0060", "\\" => "\\u005C", "\x00" => "\\u0000", "\x01" => "\\u0001", "\x02" => "\\u0002", "\x03" => "\\u0003", "\x04" => "\\u0004", "\x05" => "\\u0005", "\x06" => "\\u0006", "\x07" => "\\u0007", "\x08" => "\\u0008", "\t" => "\\u0009", "\n" => "\\u000A", "\v" => "\\u000B", "\f" => "\\u000C", "\r" => "\\u000D", "\x0e" => "\\u000E", "\x0f" => "\\u000F", "\x10" => "\\u0010", "\x11" => "\\u0011", "\x12" => "\\u0012", "\x13" => "\\u0013", "\x14" => "\\u0014", "\x15" => "\\u0015", "\x16" => "\\u0016", "\x17" => "\\u0017", "\x18" => "\\u0018", "\x19" => "\\u0019", "\x1a" => "\\u001A", "\x1b" => "\\u001B", "\x1c" => "\\u001C", "\x1d" => "\\u001D", "\x1e" => "\\u001E", "\x1f" => "\\u001F", " " => "\\u0020"]
$literalEscapeMap
Characters forbidden in n-triples literals according to https://www.w3.org/TR/n-triples/#grammar-production-STRING_LITERAL_QUOTE
private
static array<string|int, string>
$literalEscapeMap
= ["\n" => '\n', "\r" => '\r', '"' => '\"', '\\' => '\\\\']
Methods
escapeIri()
public
static escapeIri(string $str) : string
Parameters
- $str : string
Return values
stringescapeLiteral()
public
static escapeLiteral(string $str) : string
Parameters
- $str : string
Return values
stringserialize()
public
static serialize(NamedNodeInterface|BlankNodeInterface|LiteralInterface|QuadInterface $term) : string
Parameters
Return values
stringserializeIri()
public
static serializeIri(NamedNodeInterface|BlankNodeInterface $res) : string
Parameters
Return values
stringserializeLiteral()
public
static serializeLiteral(LiteralInterface $literal) : string
Parameters
- $literal : LiteralInterface
Return values
stringserializeQuad()
public
static serializeQuad(QuadInterface $quad) : string
Parameters
- $quad : QuadInterface