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
All Methods Instance Methods Concrete Methods 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 Detail
-
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 Detail
-
getCategoryName
public String getCategoryName()
The category this hint refers to.- Returns:
- a string
-
setCategoryName
public void setCategoryName(String categoryName)
Change the category this hint refers to.- Parameters:
categoryName- the new category name
-
getColumnName
public String getColumnName()
The column this hint refers to.- Returns:
- a string
-
setColumnName
public void setColumnName(String columnName)
Change the column this hint refers to.- Parameters:
columnName- the new column name
-
getEncoding
public String getEncoding()
Report the encoding strategy to employ.- Returns:
- a string of "pack" | "rle" | "delta" | "delta-rle"
-
setEncoding
public void setEncoding(String encoding)
Change the encoding strategy to employ.- Parameters:
encoding- "pack" | "rle" | "delta" | "delta-rle"
-
getPrecision
public Integer getPrecision()
Report the precision to honor.- Returns:
- an int
-
setPrecision
public void setPrecision(Integer precision)
Specify the precision for this column.- Parameters:
precision- the number of decimal places to keep during encoding
-
-