class RdfXml extends Parser

A pure-php class to parse RDF/XML.

Properties

protected Graph $graph from Parser
protected $format The format of the document currently being parsed from Parser
protected $baseUri The base URI for the document currently being parsed from Parser
protected $tripleCount from Parser

Methods

remapBnode($name)

Create a new, unique bnode identifier from a source identifier.

from Parser
resetBnodeMap()

Delete the bnode mapping - to be called at the start of a new parse

from Parser
checkParseParams($graph, $data, $format, $baseUri)

Check, cleanup parameters and prepare for parsing

from Parser
parse($graph, $data, $format, $baseUri)

Parse an RDF/XML document into an EasyRdf\Graph

addTriple($resource, $property, $value)

Add a triple to the current graph, and keep count of the number of triples

from Parser
__construct()

Constructor

init($graph, $base)

No description

initXMLParser()

No description

pushS($s)

No description

popS()

No description

updateS($s)

No description

getParentS()

No description

getParentXBase()

No description

getParentXLang()

No description

splitURI($v)

No description

add($s, $p, $o, $sType, $oType, $oDatatype = null, $oLang = null)

No description

reify($t, $s, $p, $o, $sType, $oType, $oDatatype = null, $oLang = null)

No description

startElementHandler($p, $t, $a)

No description

endElementHandler($p, $t)

No description

cdataHandler($p, $d)

No description

newNamespaceHandler($p, $prf, $uri)

No description

startState0($t, $a)

No description

startState1($t, $a)

No description

startState2($t, $a)

No description

startState4($t, $a)

No description

startState5($t, $a)

No description

startState6($t, $a)

No description

endState1($t)

No description

endState2($t)

No description

endState3($t)

No description

endState4($t)

No description

endState5($t)

No description

endState6($t)

No description

cdataState4($d)

No description

cdataState6($d)

No description

Details

in Parser at line 70
protected remapBnode($name)

Create a new, unique bnode identifier from a source identifier.

If the source identifier has previously been seen, the same new bnode identifier is returned.

Parameters

$name

in Parser at line 82
protected resetBnodeMap()

Delete the bnode mapping - to be called at the start of a new parse

in Parser at line 91
protected checkParseParams($graph, $data, $format, $baseUri)

Check, cleanup parameters and prepare for parsing

Parameters

$graph
$data
$format
$baseUri

at line 785
parse($graph, $data, $format, $baseUri)

Parse an RDF/XML document into an EasyRdf\Graph

Parameters

$graph
$data
$format
$baseUri

Exceptions

Exception
Exception

in Parser at line 148
protected addTriple($resource, $property, $value)

Add a triple to the current graph, and keep count of the number of triples

Parameters

$resource
$property
$value

at line 65
__construct()

Constructor

at line 70
protected init($graph, $base)

Parameters

$graph
$base

at line 84
protected initXMLParser()

at line 99
protected pushS($s)

Parameters

$s

at line 107
protected popS()

at line 118
protected updateS($s)

Parameters

$s

at line 124
protected getParentS()

at line 134
protected getParentXBase()

at line 150
protected getParentXLang()

at line 166
protected splitURI($v)

Parameters

$v

at line 180
protected add($s, $p, $o, $sType, $oType, $oDatatype = null, $oLang = null)

Parameters

$s
$p
$o
$sType
$oType
$oDatatype
$oLang

at line 195
protected reify($t, $s, $p, $o, $sType, $oType, $oDatatype = null, $oLang = null)

Parameters

$t
$s
$p
$o
$sType
$oType
$oDatatype
$oLang

at line 204
protected startElementHandler($p, $t, $a)

Parameters

$p
$t
$a

at line 227
protected endElementHandler($p, $t)

Parameters

$p
$t

at line 250
protected cdataHandler($p, $d)

Parameters

$p
$d

at line 263
protected newNamespaceHandler($p, $prf, $uri)

Parameters

$p
$prf
$uri

at line 269
protected startState0($t, $a)

Parameters

$t
$a

at line 282
protected startState1($t, $a)

Parameters

$t
$a

at line 377
protected startState2($t, $a)

Parameters

$t
$a

at line 525
protected startState4($t, $a)

Parameters

$t
$a

at line 531
protected startState5($t, $a)

Parameters

$t
$a

at line 538
protected startState6($t, $a)

Parameters

$t
$a

at line 589
protected endState1($t)

Parameters

$t

at line 596
protected endState2($t)

Parameters

$t

at line 619
protected endState3($t)

Parameters

$t

at line 626
protected endState4($t)

Parameters

$t

at line 690
protected endState5($t)

Parameters

$t

at line 701
protected endState6($t)

Parameters

$t

at line 753
protected cdataState4($d)

Parameters

$d

at line 762
protected cdataState6($d)

Parameters

$d