Interface DataFormat

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canMap​(java.lang.Object value)
      Returns true if this data format can map the provided Java Object.
      java.lang.String getCanonicalTypeName​(java.lang.Object value)
      Returns a data-format-specific canonical type name.
      java.lang.String getName()
      Returns the data format name.
      <T> T readValue​(java.lang.String value, java.lang.Class<T> cls)
      Reads the internal representation of a data format to a java object of the desired class.
      <T> T readValue​(java.lang.String value, java.lang.String typeIdentifier)
      Reads the internal representation of a data format to a java object of the desired class.
      java.lang.String writeValue​(java.lang.Object value)
      Writes a java object to a data format's internal data representation.
    • Method Detail

      • getName

        java.lang.String getName()
        Returns the data format name.
      • canMap

        boolean canMap​(java.lang.Object value)
        Returns true if this data format can map the provided Java Object.
        Parameters:
        parameter - the java object to check
        Returns:
        true if this object can be mapped.
      • writeValue

        java.lang.String writeValue​(java.lang.Object value)
        Writes a java object to a data format's internal data representation.
        Parameters:
        value - object that is written into internal data representation
        Returns:
        the data format's internal representation of that object
      • readValue

        <T> T readValue​(java.lang.String value,
                        java.lang.String typeIdentifier)
        Reads the internal representation of a data format to a java object of the desired class.
        Parameters:
        value - the object to be read
        typeIdentifier - the class to map the object to
        Returns:
        a java object of the specified class that was populated with the input parameter
      • readValue

        <T> T readValue​(java.lang.String value,
                        java.lang.Class<T> cls)
        Reads the internal representation of a data format to a java object of the desired class.
        Parameters:
        value - the object to be read
        cls - a data-format-specific type identifier that describes the class to map to
        Returns:
        a java object of the specified class that was populated with the input parameter
      • getCanonicalTypeName

        java.lang.String getCanonicalTypeName​(java.lang.Object value)
        Returns a data-format-specific canonical type name.