Package gov.nih.mipav.model.file
Class FileTypeTable
- java.lang.Object
-
- gov.nih.mipav.model.file.FileTypeTable
-
public class FileTypeTable extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Hashtable<java.lang.String,java.lang.Integer>FILE_EXT_TABLEprivate static java.util.Hashtable<java.lang.Integer,FileTypeInfo>FILE_TYPE_TABLE
-
Constructor Summary
Constructors Constructor Description FileTypeTable()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddExtensionAssociation(java.lang.String ext, int fileType)static java.lang.String[]getAllFileTypeDefaultExtensions()static java.lang.String[]getAllFileTypeDescriptions()static java.util.Vector<java.lang.String>getAllFileTypeExtensions()static int[]getAllFileTypes()static intgetFileTypeFromSuffix(java.lang.String ext)Gets the file type based upon the suffix.static FileTypeInfogetFileTypeInfo(int fileType)static java.util.Hashtable<java.lang.Integer,FileTypeInfo>getFileTypeTable()private static java.lang.StringstandardizeExtensionFormat(java.lang.String ext)Standardizes an file extension string to conform with how they should be stored in the file type table.
-
-
-
Field Detail
-
FILE_TYPE_TABLE
private static java.util.Hashtable<java.lang.Integer,FileTypeInfo> FILE_TYPE_TABLE
-
FILE_EXT_TABLE
private static java.util.Hashtable<java.lang.String,java.lang.Integer> FILE_EXT_TABLE
-
-
Method Detail
-
getFileTypeFromSuffix
public static final int getFileTypeFromSuffix(java.lang.String ext)
Gets the file type based upon the suffix.- Parameters:
ext- The suffix (including the period -- e.g., ".xml")- Returns:
- The file type for the given suffix (or UNDEFINED if the suffix is null, unrecognized, or ambiguous).
-
getFileTypeInfo
public static final FileTypeInfo getFileTypeInfo(int fileType)
-
addExtensionAssociation
public static final void addExtensionAssociation(java.lang.String ext, int fileType)
-
standardizeExtensionFormat
private static final java.lang.String standardizeExtensionFormat(java.lang.String ext)
Standardizes an file extension string to conform with how they should be stored in the file type table.- Parameters:
ext- The extension to standardize.- Returns:
- The standardized extension.
-
getAllFileTypeDescriptions
public static final java.lang.String[] getAllFileTypeDescriptions()
-
getAllFileTypeExtensions
public static final java.util.Vector<java.lang.String> getAllFileTypeExtensions()
-
getAllFileTypeDefaultExtensions
public static final java.lang.String[] getAllFileTypeDefaultExtensions()
-
getAllFileTypes
public static final int[] getAllFileTypes()
-
getFileTypeTable
public static final java.util.Hashtable<java.lang.Integer,FileTypeInfo> getFileTypeTable()
-
-