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 Details

    • EncodingStrategyHint

      public EncodingStrategyHint()
    • EncodingStrategyHint

      public EncodingStrategyHint​(String categoryName, String columnName, String encoding, Integer precision)
      Construct a hint from scratch.
      Parameters:
      categoryName - the category referenced
      columnName - the column reference
      encoding - the encoding to employ
      precision - the precision (number of decimal places to keep)
  • Method Details

    • 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