Class FileFormatImpl

java.lang.Object
com.stardog.stark.io.FileFormatImpl
All Implemented Interfaces:
FileFormat

public class FileFormatImpl extends Object implements FileFormat

Default implementation of FileFormat

Since:
1.0
Version:
1.0
Author:
Michael Grove
  • Field Details

    • mName

      protected final String mName
    • mMimetypes

      protected final List<String> mMimetypes
    • mFileExtensions

      protected final List<String> mFileExtensions
  • Constructor Details

    • FileFormatImpl

      public FileFormatImpl(@Nonnull String theName, @Nonnull List<String> theMimetypes, @Nonnull List<String> theFileExtensions)
  • Method Details

    • name

      @Nonnull public String name()
      The friendly format name
      Specified by:
      name in interface FileFormat
      Returns:
      the name
    • defaultExtension

      @Nonnull public String defaultExtension()
      Return the default file extension for this format
      Specified by:
      defaultExtension in interface FileFormat
      Returns:
      the default file extension
    • defaultMimeType

      @Nonnull public String defaultMimeType()
      Return the default mimetype for this format
      Specified by:
      defaultMimeType in interface FileFormat
      Returns:
      the default mimetype
    • extensions

      @Nonnull public Stream<String> extensions()
      Return all supported file format extensions
      Specified by:
      extensions in interface FileFormat
      Returns:
      the extensions
    • mimeTypes

      @Nonnull public Stream<String> mimeTypes()
      Return all supported mimetypes of this format
      Specified by:
      mimeTypes in interface FileFormat
      Returns:
      the mimetypes
    • toString

      public String toString()
      Overrides:
      toString in class Object