Extended I/O support
The SSSOM Extended Library provides support for reading and writing a SSSOM mapping set to and from a file in the RDF Turtle serialisation format, in addition to the SSSOM/TSV and SSSOM/JSON formats supported by the core library.
1. RDF write support
Use the RDFWriter class to serialise a mapping set to a file in the RDF/Turtle format:
RDFWriter writer = new RDFWriter("my-mapping-set.ttl"); writer.write(myMappingSet);
2. RDF read support
Use the RDFReader class to read a mapping set from a file in the RDF/Turtle format:
RDFReader reader = new RDFReader("my-mapping-set.ttl"); MappingSet myMappingSet = reader.read();
3. Easily reading from any supported format.
To make it easier to read a mapping set from any of the supported serialisation formats (SSSOM/TSV, SSSOM/CSV, SSSOM/JSON, and RDF/Turtle), the Extended Library provides a ReaderFactory helper class. This class in turns provide methods to obtain a SSSOM reader object from a file, by guessing, whenever possible, the format of the file.