Class TableMetadataParser


  • public class TableMetadataParser
    extends java.lang.Object
    • Method Detail

      • internalWrite

        public static void internalWrite​(TableMetadata metadata,
                                         OutputFile outputFile,
                                         boolean overwrite)
      • getFileExtension

        public static java.lang.String getFileExtension​(java.lang.String codecName)
      • toJson

        public static java.lang.String toJson​(TableMetadata metadata)
      • toJson

        public static void toJson​(TableMetadata metadata,
                                  com.fasterxml.jackson.core.JsonGenerator generator)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • fromJson

        public static TableMetadata fromJson​(java.lang.String json)
        Read TableMetadata from a JSON string.

        The TableMetadata's metadata file location will be unset.

        Parameters:
        json - a JSON string of table metadata
        Returns:
        a TableMetadata object
      • fromJson

        public static TableMetadata fromJson​(java.lang.String metadataLocation,
                                             java.lang.String json)
        Read TableMetadata from a JSON string.
        Parameters:
        metadataLocation - metadata location for the returned TableMetadata
        json - a JSON string of table metadata
        Returns:
        a TableMetadata object
      • fromJson

        public static TableMetadata fromJson​(InputFile file,
                                             com.fasterxml.jackson.databind.JsonNode node)
      • fromJson

        public static TableMetadata fromJson​(com.fasterxml.jackson.databind.JsonNode node)
      • fromJson

        public static TableMetadata fromJson​(java.lang.String metadataLocation,
                                             com.fasterxml.jackson.databind.JsonNode node)