RDF.ex v0.7.0 Release Notes

Release Date: 2019-11-22 // over 4 years ago
  • ➕ Added

    • RDF.Diff data structure for diffs between RDF graphs and descriptions
    • ⚡️ RDF.Description.update/4 updates the objects of a predicate in a description with a custom update function
    • ⚡️ RDF.Graph.update/4 updates the descriptions of a subject in a graph with a custom update function
    • RDF.Description.take/2 creates a description from another one by limiting its statements to a set of predicates
    • RDF.Graph.take/3 creates a graph from another one by limiting its statements to a set of subjects and optionally also a set of predicates
    • 🚚 RDF.Graph.clear/1 removes the triples from a graph
    • 🔧 Mix formatter configuration for using defvocab without parens

    🔄 Changed

    • RDF.Serialization.Writer.write_file/4 which is the basis used by all the write_file/3 and write_file!/3 functions of all serialization format modules like RDF.NTriples, RDF.Turtle, JSON.LD etc. now opens file in a different mode: it no longer opens them with the :utf8 option. First, this by default slowed down the writing, but more importantly could lead to unexpected encoding issues. This is a breaking change: If your code relied on this file mode, you can get the old behaviour, by specifying the file_mode on these functions accordingly as [:utf8, :write, :exclusive]. For example, to write a Turtle file with the old behaviour, you can do it like this:
    RDF.Turtle.write_file!(some_data, some_path, file_mode: ~w[utf8 write exclusive]a)
    

    Compare v0.6.2...v0.7.0