Class SimpleChangeConverter
- All Implemented Interfaces:
org.incenp.linkml.core.IConverter
A custom converter is needed here because, even though the
new_value and old_value slots of the
SimpleChange class are typed as strings, they are sometimes expected
to contain CURIEs, when the value that is being affected by the change is
itself an IRI (for example, when the change is a
PredicateChange).
When that happens, the fact that old_value (resp.
new_value) is a CURIE is indicated by the
old_value_type (resp. new_value_type) slot, which
is set to curie. This is a KGCL-specific mechanism that cannot
be handled generically at the level of the LinkML runtime, so we must deal
with it here.
An alternative option would be to deal with those values in a post-parsing
step, in which we iterate over SimpleChange-typed changes and expand their
old_value / new_value slots as needed. But custom
converters offer a nice way of ensuring that expansion is done for us during
the parsing phase.
-
Field Summary
Fields inherited from class org.incenp.linkml.core.ObjectConverter
klass -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.incenp.linkml.core.ObjectConverter
convert, convert, convert, convertForSlot, convertTo, getGlobalIdentifier, getGlobalIdentifierList, getType, normaliseList, serialise, serialiseForSlot, toIdentifier, toList, toMap
-
Constructor Details
-
SimpleChangeConverter
-
-
Method Details
-
convertTo
-
serialise
-