diff --git a/src/Flysystem/Plugin/ReadRdf.php b/src/Flysystem/Plugin/ReadRdf.php index 8e0a8b3..3554fb7 100644 --- a/src/Flysystem/Plugin/ReadRdf.php +++ b/src/Flysystem/Plugin/ReadRdf.php @@ -45,13 +45,14 @@ final public function __construct(\EasyRdf_Graph $rdfConverter) * * @param string $path path to file * @param string $format RDF format to convert file to + * @param string $url base url for parsing * * @return array|false metadata * * @throws FileNotFoundException * @throws \Pdsinterop\Rdf\Flysystem\Exception */ - public function handle(string $path, string $format) : string + public function handle(string $path, string $format, string $url) : string { $converter = $this->converter; @@ -61,7 +62,7 @@ public function handle(string $path, string $format) : string if (is_string($contents)) { try { - $converter->parse($contents, Format::UNKNOWN, Rdf::EMPTY_NODE); + $converter->parse($contents, Format::UNKNOWN, $url); } catch (\EasyRdf_Exception $exception) { $this->throwException(self::ERROR_COULD_NOT_CONVERT, [ 'file' => $path,