src/FedoraApi.php
public function saveGraph(
        \EasyRdf_Graph $graph,
        $uri = '',
        $headers = []
    ) {
        // Serialze the rdf.
        $turtle = $graph->serialise('turtle');

        // Checksum it.
        $checksum_value = sha1($turtle);

        // Set headers.
        $headers['Content-Type'] = 'text/turtle';
        $headers['digest'] = 'sha1=' . $checksum_value;

        // Save it.
        return $this->saveResource($uri, $turtle, $headers);
    }
public function saveGraph(
        \EasyRdf_Graph $graph,
        $uri = '',
        $headers = []
    ) {
        // Serialze the rdf.
        $turtle = $graph->serialise('turtle');

        // Checksum it.
        $checksum_value = sha1($turtle);

        // Set headers.
        $headers['Content-Type'] = 'text/turtle';
        $headers['digest'] = 'sha1=' . $checksum_value;

        // Save it.
        return $this->saveResource($uri, $turtle, $headers);
    }
public function saveGraph ( \ EasyRdf_Graph $ graph , $ uri = '' , $ headers = [ ] ) { // Serialze the rdf. $ turtle = $ graph -> serialise ( 'turtle' ) ; // Checksum it. $ checksum_value = sha1 ( $ turtle ) ; // Set headers. $ headers [ 'Content-Type' ] = 'text/turtle' ; $ headers [ 'digest' ] = 'sha1=' . $ checksum_value ; // Save it. return $ this -> saveResource ( $ uri , $ turtle , $ headers ) ; }
Saves RDF in Fedora.

@param EasyRdf_Resource  $graph          Graph to save
@param string            $uri            Resource URI
@param array             $headers        HTTP Headers

@return ResponseInterface
Saves RDF in Fedora .