Class RangeData
java.lang.Object
_global.tri.oxidationstates.webapi.RangeData
This class contains the data needed to generate the oxidation state range plots
-
Constructor Summary
ConstructorsConstructorDescriptionThis constructor is used by the Jackson library to deserialize a JSON file containing the boundaries.RangeData(String ionTypeSymbol, LikelihoodCalculator calculator) Creates the data necessary to create the plot for a given ion type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the given symbol for the ion type (e.g.int[]Returns the oxidation states to be plotted.double[]Returns the boundaries of the oxidation states in terms of the mapped potential, starting from the left-most and ending with the right-mosttoString()
-
Constructor Details
-
RangeData
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
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 orderrangeBoundaries- 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
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
-