Class JsonOutputFormatter.JsonOutputConverter

  • All Implemented Interfaces:
    OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
    Enclosing class:
    JsonOutputFormatter

    public static class JsonOutputFormatter.JsonOutputConverter
    extends java.lang.Object
    implements OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromBoolean​(boolean data)
      Converts data from Boolean to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromByte​(byte data)
      Converts data from byte to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromByteArray​(byte[] data)
      Converts data from a byte array to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromDate​(java.util.Date data, java.lang.String format)
      Converts data from a date to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromDouble​(double data)
      Converts data from double to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromDoubleArray​(double[] data)
      Converts data from a double array to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromFloat​(float data)
      Converts data from float to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromInteger​(int data)
      Converts data from int to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromIntegerArray​(int[] data)
      Converts data from an integer array to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromLong​(long data)
      Converts data from long to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromObject​(java.lang.Object data)
      Converts data from an object the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromShort​(short data)
      Converts data from short to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromString​(java.lang.String data)
      Converts data from String to the output format.
      de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromStringArray​(java.lang.String[] data)
      Converts data from a string array to the output format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonOutputConverter

        public JsonOutputConverter()
    • Method Detail

      • fromInteger

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromInteger​(int data)
                                                                                                                    throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from int to the output format.
        Specified by:
        fromInteger in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromByte

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromByte​(byte data)
                                                                                                                 throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from byte to the output format.
        Specified by:
        fromByte in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromLong

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromLong​(long data)
                                                                                                                 throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from long to the output format.
        Specified by:
        fromLong in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromString

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromString​(java.lang.String data)
                                                                                                                   throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from String to the output format.
        Specified by:
        fromString in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromShort

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromShort​(short data)
                                                                                                                  throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from short to the output format.
        Specified by:
        fromShort in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromDouble

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromDouble​(double data)
                                                                                                                   throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from double to the output format.
        Specified by:
        fromDouble in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromFloat

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromFloat​(float data)
                                                                                                                  throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from float to the output format.
        Specified by:
        fromFloat in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromBoolean

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromBoolean​(boolean data)
                                                                                                                    throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from Boolean to the output format.
        Specified by:
        fromBoolean in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromIntegerArray

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromIntegerArray​(int[] data)
                                                                                                                         throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from an integer array to the output format.
        Specified by:
        fromIntegerArray in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromDoubleArray

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromDoubleArray​(double[] data)
                                                                                                                        throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from a double array to the output format.
        Specified by:
        fromDoubleArray in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromStringArray

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromStringArray​(java.lang.String[] data)
                                                                                                                        throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from a string array to the output format.
        Specified by:
        fromStringArray in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromByteArray

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromByteArray​(byte[] data)
                                                                                                                      throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from a byte array to the output format.
        Specified by:
        fromByteArray in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromObject

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromObject​(java.lang.Object data)
                                                                                                                   throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from an object the output format. [fallback dummy]
        Specified by:
        fromObject in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromDate

        public de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator> fromDate​(java.util.Date data,
                                                                                                                        java.lang.String format)
                                                                                                                 throws java.io.IOException
        Description copied from interface: OutputFormatter.OutputConverter
        Converts data from a date to the output format.
        Specified by:
        fromDate in interface OutputFormatter.OutputConverter<de.iip_ecosphere.platform.support.function.IOConsumer<com.fasterxml.jackson.core.JsonGenerator>>
        Parameters:
        data - the date
        format - the target date format (see SimpleDateFormat)
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails