Class TimeConverter

  • All Implemented Interfaces:
    IConverter

    public class TimeConverter
    extends ScalarConverterBase
    A converter for slots typed as xsd:time (represented as LocalTime).

    This supports LinkML’s time type.

    • Constructor Detail

      • TimeConverter

        public TimeConverter()
    • Method Detail

      • getType

        public Class<?> getType()
        Description copied from interface: IConverter
        Gets the type of object that this converter can convert a raw object into.
        Returns:
        The Java type representing the LinkML object this converter is intended for.
      • serialise

        public Object serialise​(Object object,
                                ConverterContext ctx)
                         throws LinkMLRuntimeException
        Description copied from interface: IConverter
        Converts a LinkML object into a raw object.

        Given the Java representation of a LinkML object, this method shall return an object suitable to be given to a generic JSON/YAML writer.

        Specified by:
        serialise in interface IConverter
        Overrides:
        serialise in class ScalarConverterBase
        Parameters:
        object - The LinkML object to convert.
        ctx - The global converter context.
        Returns:
        The raw object that represents the original LinkML object.
        Throws:
        LinkMLRuntimeException - If the converter cannot convert the given object.