public function denormalize($data, $class, $format = null, array $context = array())
    {
        $value = $data;

        if (is_array($data)) {
            if (!isset($data['@value']) || !isset($data['@type'])) {
                throw new RuntimeException(
                    "Cannot denormalize the data as it isn't a valid JSON-LD typed value: " .
                    var_export($data, true)
                );
            }

            if (self::XSD_DATETIME_IRI !== $data['@type']) {
                throw new RuntimeException(
                    "Cannot denormalize the data as it isn't a XSD dateTime value: " .
                    var_export($data, true)
                );
            }

            $value = $data['@value'];
        } elseif (!is_string($data)) {
            throw new RuntimeException(
                "Cannot denormalize the data into a DateTime object: " .
                var_export($data, true)
            );
        }

        try {
            $date = new \DateTime($value);

            return $date;
        } catch(Exception $e) {
            throw new RuntimeException(
                "Cannot denormalize the data as the value is invalid: " . var_export($data, true),
                0,
                $e
            );
        }
    }