PHPackages                             pdsinterop/flysystem-rdf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. pdsinterop/flysystem-rdf

ActiveLibrary[File &amp; Storage](/categories/file-storage)

pdsinterop/flysystem-rdf
========================

Flysystem plugin to transform RDF data between various serialization formats.

v0.6.0(1y ago)35.5k[3 issues](https://github.com/pdsinterop/flysystem-rdf/issues)1MITPHPPHP ^8.0CI passing

Since Jul 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/pdsinterop/flysystem-rdf)[ Packagist](https://packagist.org/packages/pdsinterop/flysystem-rdf)[ RSS](/packages/pdsinterop-flysystem-rdf/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (13)Used By (1)

Flysystem RDF Converter Plugin
==============================

[](#flysystem-rdf-converter-plugin)

[![Project stage: Development](https://camo.githubusercontent.com/a1c9643e53fe56b517fa8fd6d39b7c92a9a7774365ab21eb323239aafe491971/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50726f6a65637425323053746167652d446576656c6f706d656e742d79656c6c6f77677265656e2e737667)](https://blog.pother.ca/project-stages/)[![License](https://camo.githubusercontent.com/ae70afe0914e92205a81a2f7a9deddbfec3a3f3dc1e8cee14057af9d849c41a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706473696e7465726f702f666c7973797374656d2d7264662e737667)](./LICENSE)[![Latest Version](https://camo.githubusercontent.com/a10719687d1e3897fbbae541f9e84593eda25a0e46beebc3a8812c955e0381ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f706473696e7465726f702f666c7973797374656d2d7264663f736f72743d73656d766572)](https://packagist.org/packages/pdsinterop/flysystem-rdf)[![Maintained](https://camo.githubusercontent.com/921e6ae18860631d0290081633bc3fec5d982aaa7cbcaa185e7d1bd46d6c08d5/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323032322e737667)](https://camo.githubusercontent.com/921e6ae18860631d0290081633bc3fec5d982aaa7cbcaa185e7d1bd46d6c08d5/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323032322e737667)

[![PDS Interop](https://camo.githubusercontent.com/c6c449365ed37f26f14affece732a4f86c3c5b9bfb525ca9fc72c8dd02da6218/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d504453253230496e7465726f702d3743344446462e7376673f6c6f676f3d64617461253341696d616765253246737667253242786d6c25334262617365363425324350484e325a79423462577875637a30696148523063446f764c336433647935334d793576636d63764d6a41774d43397a646d636949485a705a586443623367394969303149433031494445784d4341784d54416949475a706247773949694e47526b596949484e30636d39725a53313361575230614430694d43492b4369416749434138634746306143426b50534a4e4c5445674e544a6f4d5464684d7a63754e53417a4e433431494441674d4441794e53343149444d784c6a4531646930784d7934334e5745794d4334334e5341794d534177494441784f4334314c5451774c6a4931494449774c6a633149444978494441674d4445344c6a55674e4441754d6a56324d544d754e7a56684d7a63674d7a51754e534177494441774d6a55754e53307a4d5334784e5767784e3245794d6941794d5334784e534177494441784c5445774d6941776569497650676f674943416750484268644767675a443069545341784d4445674e4468684d6934334e7941794c6a5933494441674d4441744d5441794944426f49444533595449754f5463674d693434494441674d4445324f4341776569497650676f384c334e325a7a344b)](https://pdsinterop.org/)[![standard-readme compliant](https://camo.githubusercontent.com/0c3dfab24f4f8358593480cfceac9b9fdaf7aa1ceb02b23defc4036aa289cea8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d5374616e64617264253230526561646d652d627269676874677265656e2e737667)](https://github.com/RichardLitt/standard-readme)[![keep-a-changelog compliant](https://camo.githubusercontent.com/3e985f997c3f0360ea2820fcbe41d1056cf283608370e67f88a4ad67344f9194/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4b656570253230612532304368616e67656c6f672d6631356433302e7376673f6c6f676f3d64617461253341696d616765253246737667253242786d6c25334262617365363425324350484e325a79423462577875637a30696148523063446f764c336433647935334d793576636d63764d6a41774d43397a646d636949475a706247773949694e6d5a6d596949485a705a58644362336739496a41674d4341784f4463674d546731496a3438634746306143426b50534a4e4e6a49674e324d744d5455674d7930794f4341784d43307a4e7941794d6d45784d6a49674d544979494441674d4441744d5467674f5445674e7a51674e7a51674d4341774d44453249444d34597a59674f5341784e4341784e5341794e4341784f4745344f5341344f534177494441774d6a51674e4341304e5341304e534177494441774e69417762444d744d5341784d793078595445314f4341784e5467674d4341774d4455314c5445334944597a4944597a494441674d44417a4e5330314d69417a4e43417a4e434177494441774c5445744e574d744d7930784f4330354c544d7a4c5445354c5451334c5445794c5445334c5449304c5449344c544d344c544d335154673149446731494441674d4441324d694133656d307a4d434134597a4977494451674d7a67674d5451674e544d674d7a45674d5463674d5467674d6a59674d7a63674d6a6b674e5468324d544a6a4c544d674d5463744d544d674d7a41744d6a67674d7a68684d545531494445314e534177494441784c54557a49444532624330784d794179614330785954557849445578494441674d4445744d5449744d5777744d5463744d6d4d744d544d744e4330794d7930784d6930794f5330794e7930314c5445794c5467744d6a51744f43307a4f5745784d7a4d674d544d7a494441674d4445344c545577597a55744d544d674d5445744d6a59674d6a59744d7a4d674d5451744e7941794f533035494451314c545636545451774944513159546b3049446b30494441674d4441744d5463674e5451674e7a55674e7a55674d4341774d4459674d7a4a6a4f4341784f5341794d69417a4d5341304d69417a4d6941794d534179494451784c5449674e6a41744d5452684e6a41674e6a41674d4341774d4449784c5445354944557a4944557a494441674d4441354c544935597a41744d5459744f43307a4d7930794d7930314d5745304e7941304e794177494441774c5455744e574d744d6a4d744d6a41744e4455744d6a59744e6a63744d5467744d5449674e4330794d4341354c54493249444534656d30784d4467674e7a5a684e5441674e5441674d4341774d5330794d5341794d6d4d744d5463674f53307a4d6941784d7930304f4341784d7930784d5341774c5449784c544d744d7a41744f5330314c544d744f5330354c54457a4c5445325954677849446778494441674d4445744e69307a4d6941354e4341354e434177494441784f43307a4e5341354d4341354d434177494441784e6930784d6d77784c544a6a4e5330354944457a4c54457a4944497a4c544532494445324c5455674d7a49744d7941314d4341354944457a494467674d6a4d674d6a41674d7a41674d7a59674e7941784e53413349444935494441674e444a36625330304d7930334d324d744d5463744f43307a4d7930324c545132494455744d5441674f4330784e6941794d4330784f53417a4e3245314e4341314e434177494441774e53417a4e474d3349444531494449774944497a49444d3349444979494449794c5445674d7a67744f5341304f4330794e4745304d5341304d534177494441774f4330794e4341304d7941304d794177494441774c5445744d544a6a4c5459744d5467744d5459744d7a45744d7a49744d7a6836625330794d7941354d5767744d574d744e7941774c5445304c5449744d6a45744e3245794e7941794e794177494441784c5445774c54457a4944553349445533494441674d4445744e4330794d4341324d7941324d794177494441784e6930794e574d314c544579494445794c544535494449304c54497849446b744d7941784f43307949444933494449674d5451674e6941794d7941784f4341794e79417a4d334d744d69417a4d5330784e6941304d474d744d5445674f4330794d5341784d53307a4d6941784d5870744d53307a4e4859784e4767744f4659324f476734646a4934624445774c54457761444578624330784e4341784e5341784e7941784f4567354e6e6f694c7a34384c334e325a7a344b)](https://keepachangelog.com/)

*Flysystem plugin to transform RDF data between various serialization formats.*

When using RDF, you will notice there are several different popular serialization formats. Instead of having to store data in multiple formats, it is easier to store the data in one format and convert it to others as needed.

This project contains a plugin to be used with Flysystem to do just that.

For the conversion EasyRDF is used. Any formats supported by EasyRDF are available from this plugin.

Currently supported formats are:

- JSON-LD
- N-triples
- Notation 3 / N3
- RDF/XML
- Turtle

Table of Contents
-----------------

[](#table-of-contents)

- [Background](#background)
- [Installation](#installation)
- [Usage](#usage)
    - [Adapter](#adapter)
    - [Plugin](#plugin)
- [Contribute](#contribute)
- [License](#license)

Background
----------

[](#background)

This project is part of the PHP stack of projects by PDS Interop. It is used by both the Solid-Nextcloud app and the standalone PHP Solid server.

As the functionality seemed useful for other projects, it was implemented as a separate package.

Installation
------------

[](#installation)

The advised install method is through composer:

```
composer require pdsinterop/flysystem-rdf
```

PHP version 7.3 and higher is supported. The [`mbstring`](https://www.php.net/manual/en/book.mbstring.php)extension needs to be enabled in order for this package to work.

Usage
-----

[](#usage)

This package offers features to read files from a Filesystem that have been stored in one RDF format as another format.

These features are provided by a plugin and an adapter.

The plugin is best suited for light-weight scenarios where all you want to do is convert a file to another format.

The adapter is best suited for full-featured usage of Flysystem, as it also handles calls to `has` and `getMimeType` correctly (which the plugin does not)

### Adapter

[](#adapter)

To use the adapter, instantiate it, add it to a Flysystem filesystem and add the helper plugin.

```
