src/acdhOeaw/fedora/FedoraResource.php
private function getSparqlTriples(Resource $metadata): string {
        $uri = $this->fedora->sanitizeUri($this->uri);
        $res = $metadata->copy(self::$skipProp, self::$skipPropRegExp, $uri);

        // make sure the ACL property is in current transaction
        $aclProp = $res->getResource(WebAcl::ACL_LINK_PROP);
        if ($aclProp) {
            $res->deleteResource(WebAcl::ACL_LINK_PROP);
            if ($aclProp->getUri() !== 'http://fedora.info/definitions/v4/repository#inaccessibleResource') {
                $res->addResource(WebAcl::ACL_LINK_PROP, $this->fedora->sanitizeUri($aclProp->getUri()));
            }
        }

        $rdf = $res->getGraph()->serialise('ntriples');
        return $rdf;
    }
private function getSparqlTriples(Resource $metadata): string {
        $uri = $this->fedora->sanitizeUri($this->uri);
        $res = $metadata->copy(self::$skipProp, self::$skipPropRegExp, $uri);

        // make sure the ACL property is in current transaction
        $aclProp = $res->getResource(WebAcl::ACL_LINK_PROP);
        if ($aclProp) {
            $res->deleteResource(WebAcl::ACL_LINK_PROP);
            if ($aclProp->getUri() !== 'http://fedora.info/definitions/v4/repository#inaccessibleResource') {
                $res->addResource(WebAcl::ACL_LINK_PROP, $this->fedora->sanitizeUri($aclProp->getUri()));
            }
        }

        $rdf = $res->getGraph()->serialise('ntriples');
        return $rdf;
    }
private function getSparqlTriples ( Resource $ metadata ) : string { $ uri = $ this -> fedora -> sanitizeUri ( $ this -> uri ) ; $ res = $ metadata -> copy ( self :: $ skipProp , self :: $ skipPropRegExp , $ uri ) ; // make sure the ACL property is in current transaction $ aclProp = $ res -> getResource ( WebAcl :: ACL_LINK_PROP ) ; if ( $ aclProp ) { $ res -> deleteResource ( WebAcl :: ACL_LINK_PROP ) ; if ( $ aclProp -> getUri ( ) !== 'http://fedora.info/definitions/v4/repository#inaccessibleResource' ) { $ res -> addResource ( WebAcl :: ACL_LINK_PROP , $ this -> fedora -> sanitizeUri ( $ aclProp -> getUri ( ) ) ) ; } } $ rdf = $ res -> getGraph ( ) -> serialise ( 'ntriples' ) ; return $ rdf ; }
Serializes metadata to a form suitable for Fedora's SPARQL-update query.

This means the "ntriples" format with subject URIs compliant with current
Fedora connection and excluding properties Fedora reserves for itself
(and rises errors when they are provided from the outside).

@param \EasyRdf\Resource $metadata metadata to serialize
@return string
@see $skipProp
@see $skipPropRegExp
Serializes metadata to a form suitable for Fedora s SPARQL - update query .