It should be possible to work directly with the data contained in a document. Some functionality that should be supported:
// load a document
$doc = Document::load('document.jsonld');
// get the default graph
$graph = $doc->getGraph();
// get all nodes in the document
$nodes = $graph->getNodes();
// retrieve a node by ID
$node = $graph->getNode('http://example.com/node1');
// get a property
$node->getProperty('http://example.com/vocab/name');
// add a new blank node to the document
$newNode = $graph->createNode();
// link the new blank node to the existing node
$node->addPropertyValue('http://example.com/vocab/link', $newNode);
// even reverse properties are supported; this returns $newNode
$node->getReverseProperty('http://example.com/vocab/link');
At a later point, it should also be possible to query for nodes or properties.
It should be possible to work directly with the data contained in a document. Some functionality that should be supported:
At a later point, it should also be possible to query for nodes or properties.