Package org.rcsb.cif
Class EncodingStrategyHint
java.lang.Object
org.rcsb.cif.EncodingStrategyHint
public class EncodingStrategyHint extends Object
Encoding hints can be used to specify the encoding and/or precision for particular columns in the data structure.
If not provided, the library will find the most efficient encoding automatically.
-
Constructor Summary
Constructors Constructor Description EncodingStrategyHint()EncodingStrategyHint(String categoryName, String columnName, String encoding, Integer precision)Construct a hint from scratch. -
Method Summary
Modifier and Type Method Description StringgetCategoryName()The category this hint refers to.StringgetColumnName()The column this hint refers to.StringgetEncoding()Report the encoding strategy to employ.IntegergetPrecision()Report the precision to honor.voidsetCategoryName(String categoryName)Change the category this hint refers to.voidsetColumnName(String columnName)Change the column this hint refers to.voidsetEncoding(String encoding)Change the encoding strategy to employ.voidsetPrecision(Integer precision)Specify the precision for this column.
-
Constructor Details
-
EncodingStrategyHint
public EncodingStrategyHint() -
EncodingStrategyHint
public EncodingStrategyHint(String categoryName, String columnName, String encoding, Integer precision)Construct a hint from scratch.- Parameters:
categoryName- the category referencedcolumnName- the column referenceencoding- the encoding to employprecision- the precision (number of decimal places to keep)
-
-
Method Details
-
getCategoryName
The category this hint refers to.- Returns:
- a string
-
setCategoryName
Change the category this hint refers to.- Parameters:
categoryName- the new category name
-
getColumnName
The column this hint refers to.- Returns:
- a string
-
setColumnName
Change the column this hint refers to.- Parameters:
columnName- the new column name
-
getEncoding
Report the encoding strategy to employ.- Returns:
- a string of "pack" | "rle" | "delta" | "delta-rle"
-
setEncoding
Change the encoding strategy to employ.- Parameters:
encoding- "pack" | "rle" | "delta" | "delta-rle"
-
getPrecision
Report the precision to honor.- Returns:
- an int
-
setPrecision
Specify the precision for this column.- Parameters:
precision- the number of decimal places to keep during encoding
-