Download the PHP package pdsinterop/flysystem-rdf without Composer
On this page you can find all versions of the php package pdsinterop/flysystem-rdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pdsinterop/flysystem-rdf
More information about pdsinterop/flysystem-rdf
Files in pdsinterop/flysystem-rdf
Package flysystem-rdf
Short Description Flysystem plugin to transform RDF data between various serialization formats.
License MIT
Informations about the package flysystem-rdf
Flysystem RDF Converter Plugin
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
- Background
- Installation
- Usage
- Adapter
- Plugin
- Contribute
- License
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
The advised install method is through composer:
PHP version 7.3 and higher is supported. The mbstring
extension needs to be enabled in order for this package to work.
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
To use the adapter, instantiate it, add it to a Flysystem filesystem and add the helper plugin.
The adapter adds any found .meta
files that reference a file to that file's
metadata, which can be retrieved with $filesystem->getMetadata($path)
.
Plugin
To use the plugin, instantiate it and add it to a Flysystem filesystem.
The function readRdf
can then be called to get RDF files in a specific format:
Develop
-
Do not forget to install the required dependencies using
composer
. -
Most of the logic here involves EasyRdf and/or FlySystem. You'll want to familiarise yourself with their workings.
-
Test are available in the
tests/
directory. They are run by GitHub actions for any pull request. To run them,call./bin/phpunit
- The changelog can be automatically generated using
github_changelog_generator
with the provided configuration file
Contributing
Questions or feedback can be given by opening an issue on GitHub.
All PDS Interop projects are open source and community-friendly. Any contribution is welcome! For more details read the contribution guidelines.
All PDS Interop projects adhere to the Code Manifesto as its code-of-conduct. Contributors are expected to abide by its terms.
There is a list of all contributors on GitHub.
For a list of changes see the the GitHub releases page.
License
All code created by PDS Interop is licensed under the MIT License.
All versions of flysystem-rdf with dependencies
ext-mbstring Version *
easyrdf/easyrdf Version ^1.1.1
league/flysystem Version ^1.0
ml/json-ld Version ^1.2