Class CurieConverter

  • All Implemented Interfaces:
    IConverter

    public class CurieConverter
    extends StringConverter
    A converter for String-typed fields whose value is expected to be a CURIE.

    This is especially intended for slots of type uriOrCurie. The converter will automatically expand the CURIE upon deserialising the data, so that after parsing we no longer need to worry about the presence of CURIEs anywhere – there will only be full-length IRIs. Conversely, when serialising the data the converter will take care of compacting the IRIs back into CURIE form.

    This is basically a generalisation of the approach previously used specifically for SSSOM-Java: expand CURIEs as soon as possible upon receiving data, contract them as late as possible upon writing data. In between, you only need to deal with full-length IRIs. This is the only sane way of working with CURIEs.