Class CompressorControlNameComputer
- java.lang.Object
-
- nom.tam.fits.compression.provider.CompressorControlNameComputer
-
public class CompressorControlNameComputer extends java.lang.Object
Computes the name of the tile compressor class name given the algorithm used to quantize and compress the tile and the type of data the tile contains.
The name of the class is built of four parts:- the capitalized simple name of the base type of the elements in the tile (like Int, Long etc.);
- if a known quantize algorithm is used, the word "Quant", the word "Unknown" if the quantize algorithm is not recognized, nothing (i.e. the empty string) if it is null;
- the short name of the compression algorithm to use (Rice, PLIO, Gzip etc.) or the word "Unknown" if the algorithm is not supported;
- the suffix "Compressor"
Following exception to above rules exist:
- If the primitive type is double or float, the quantize algorithm is ignored (as if it were specified as null)
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
COMPRESSOR_CLASS_SUFFIX
-
Constructor Summary
Constructors Constructor Description CompressorControlNameComputer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createCompressorClassName(java.lang.String quantAlgorithm, java.lang.String compressionAlgorithm, java.lang.Class<?> baseType)
private static java.lang.String
standardizeBaseType(java.lang.String simpleName)
private static java.lang.String
standardizeCompressionAlgorithm(java.lang.String compressionAlgorithm)
private static java.lang.String
standardizeQuantAlgorithm(java.lang.String quantAlgorithm)
-
-
-
Field Detail
-
COMPRESSOR_CLASS_SUFFIX
private static final java.lang.String COMPRESSOR_CLASS_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
standardizeBaseType
private static java.lang.String standardizeBaseType(java.lang.String simpleName)
-
standardizeCompressionAlgorithm
private static java.lang.String standardizeCompressionAlgorithm(java.lang.String compressionAlgorithm)
-
standardizeQuantAlgorithm
private static java.lang.String standardizeQuantAlgorithm(java.lang.String quantAlgorithm)
-
createCompressorClassName
public java.lang.String createCompressorClassName(java.lang.String quantAlgorithm, java.lang.String compressionAlgorithm, java.lang.Class<?> baseType)
-
-