SSSOM-Java 1.6.0
Changes since version 1.5.1:
Core library
- Added support for new slots from the upcoming version 1.1 of the SSSOM specification:
record_id,mapping_tool_id,- and
mapping_set_confidence.
- In SSSOM 1.1 compliance mode, URI-typed slots are checked for correctness (their values must indeed be a URI).
- All readers now automatically make additional validity checks by default:
- presence of a
mapping_set_idslot, - presence of a
licenseslot, - correct use of the
record_idslot (if the slot is used at all, then all records must have a unique value).
- presence of a
- A new experimental feature allows to generate a unique hash for a mapping record.
RDF serialisation
The RDF writers and parsers have been tweaked based on discussions about what the RDF serialisation of SSSOM should look like. Note that those discussions are still ongoing, and the RDF serialisation is still not specified, so it may still change in the future.
The main difference compared with previous versions is that a mapping set is represented by its mapping_set_id, rather than by a blank node. That is, instead of:
[] a sssom:MappingSet ;
sssom:mapping_set_id "https://example.org/myset/"^^xsd:anyURI .this is now:
<https://example.org/myset> a sssom:MappingSet .(The former representation is still accepted when reading from RDF.)
Likewise, a mapping record is represented using its record_id if present (otherwise, a blank node is still used).
Command-line tool (sssom-cli)
A new --lax option allows to disable the additional validity checks mentioned above.
SSSOM/T
New substitution placeholders
Two new substitution placeholders have been added:
%{hash}, which inserts a hash value that uniquely represents the mapping record being processed;- and
%{serial}, which inserts a number that is automatically incremented whenever a new mapping is processed.
Such placeholders can be used, for example, to automatically generate values for the record_id slot:
subject==* -> assign("record_id", "https://example.org/records/%{hash}");
to generate a record ID of the form https://example.org/records/<UNIQUE_HASH>, or
subject==* -> assign("record_id", "https://example.org/records/%{serial|format(%07d)}");
to generate a record ID of the form https://example.org/records/NNNNNNN.
New filter function
A new filter function, is_duplicate, allows to select mappings for which a mapping-derived value is identical to that of a previously processed mapping.
For example, to filter out all mappings with the same subject_id except the first one:
is_duplicate(%{subject_id}) -> stop();
To filter out all mappings that have the same triple subject_id / predicate_id / object_id, except the first one:
is_duplicate("%{subject_id}%{predicate_id}%{object_id}") -> stop();
Or, using the aforementioned %{hash} substitution, to filter out all mappings that are completely identical, keeping only the first such mapping:
is_duplicate(%{hash}) -> stop();