Class RangeData

java.lang.Object
_global.tri.oxidationstates.webapi.RangeData

public class RangeData extends Object
This class contains the data needed to generate the oxidation state range plots
  • Constructor Details

    • RangeData

      public RangeData(String ionTypeSymbol, LikelihoodCalculator calculator)
      Creates the data necessary to create the plot for a given ion type.
      Parameters:
      ionTypeSymbol - The symbol for the ion type (e.g. "Li", "SO4"). For polyatomic ions, the symbol may be enclosed in parenthesis, but it doesn't have to be.
      calculator - The LikelihoodCalculator used to calculate the oxidation states. The range boundary information will be read from this calculator.
    • RangeData

      public RangeData(String ionTypeSymbol, int[] oxidationStates, double[] rangeBoundaries)
      This constructor is used by the Jackson library to deserialize a JSON file containing the boundaries.
      Parameters:
      ionTypeSymbol - The symbol for the ion type (e.g. "Li", "SO4"). For polyatomic ions, the symbol may be enclosed in parenthesis, but it doesn't have to be.
      oxidationStates - The allowed oxidation states, in ascending order
      rangeBoundaries - The boundaries between the oxidation states in units of the mapped potential, in the same order as the oxidation states. There should be one more boundary than oxidation state.
  • Method Details

    • getIonTypeSymbol

      public String getIonTypeSymbol()
      Returns the given symbol for the ion type (e.g. "Li", "SO4") for which the plot will be generated.
      Returns:
      the given symbol for the ion type (e.g. "Li", "SO4") for which the plot will be generated.
    • getRangeBoundaries

      public double[] getRangeBoundaries()
      Returns the boundaries of the oxidation states in terms of the mapped potential, starting from the left-most and ending with the right-most
      Returns:
      the boundaries of the oxidation states in terms of the mapped potential, starting from the left-most and ending with the right-most
    • getOxidationStates

      public int[] getOxidationStates()
      Returns the oxidation states to be plotted. If there are N oxidation states, then there will be N-1 oxidation states. The nth oxidation state is bounded by the nth boundary on the left, and the (n+1)th boundary on the right.
      Returns:
      the oxidation states to be plotted. If there are N oxidation states, then there will be N-1 oxidation states. The nth oxidation state is bounded by the nth boundary on the left, and the (n+1)th boundary on the right.
    • toString

      public String toString()
      Overrides:
      toString in class Object