Camel serializer
The camel serializer exists as a proof-of-concept serialization of resources within the repository. The intention is to have an eventually consistent copy of the repository content. In working to build lossless import/export functionality, the serialization format is used as a starting point.
RDF and Non-RDF
The serializer has the option of including or excluding content based on whether it's an RDF resource or a non-RDF resource. Furthermore, those two types of content can be segregated into configurable directories.
- binaries are written to a filesystem path that corresponds to their relative repository path within the configured folder
- RDF is serialized to the configured format at a path that corresponds to their relative repository path within the configured folder but with a suitable file extension (.ttl for text/turtle)
- Server-managed triples are included in the serialized RDF
- the resource in the "describedby" header for binaries is serialized to the corresponding path of the binary, but within the RDF folder with a suitable file extension (.ttl for text/turtle)
Possible issues
- I was unable to test how resources whose paths contains characters that cannot be in filenames are serialized (try a resource with a ':' in the path on an OSX system for instance)
- bad stuff happens when your repository contains two resources with the same name (differentiated by \[1\])