Package com.stardog.stark.io
Class FileFormatImpl
- java.lang.Object
-
- com.stardog.stark.io.FileFormatImpl
-
- All Implemented Interfaces:
FileFormat
public class FileFormatImpl extends java.lang.Object implements FileFormat
Default implementation of
FileFormat
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.stardog.stark.io.FileFormat
FileFormat.Compression
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.String>
mFileExtensions
protected java.util.List<java.lang.String>
mMimetypes
protected java.lang.String
mName
-
Constructor Summary
Constructors Constructor Description FileFormatImpl(java.lang.String theName, java.util.List<java.lang.String> theMimetypes, java.util.List<java.lang.String> theFileExtensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
defaultExtension()
Return the default file extension for this formatjava.lang.String
defaultMimeType()
Return the default mimetype for this formatjava.util.stream.Stream<java.lang.String>
extensions()
Return all supported file format extensionsjava.util.stream.Stream<java.lang.String>
mimeTypes()
Return all supported mimetypes of this formatjava.lang.String
name()
The friendly format namejava.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.stardog.stark.io.FileFormat
charset
-
-
-
-
Method Detail
-
name
@Nonnull public java.lang.String name()
The friendly format name- Specified by:
name
in interfaceFileFormat
- Returns:
- the name
-
defaultExtension
@Nonnull public java.lang.String defaultExtension()
Return the default file extension for this format- Specified by:
defaultExtension
in interfaceFileFormat
- Returns:
- the default file extension
-
defaultMimeType
@Nonnull public java.lang.String defaultMimeType()
Return the default mimetype for this format- Specified by:
defaultMimeType
in interfaceFileFormat
- Returns:
- the default mimetype
-
extensions
@Nonnull public java.util.stream.Stream<java.lang.String> extensions()
Return all supported file format extensions- Specified by:
extensions
in interfaceFileFormat
- Returns:
- the extensions
-
mimeTypes
@Nonnull public java.util.stream.Stream<java.lang.String> mimeTypes()
Return all supported mimetypes of this format- Specified by:
mimeTypes
in interfaceFileFormat
- Returns:
- the mimetypes
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-