At the very least, I would automatically generate an enum class from this URL. You can parse HTML, extract values, and write a java file that defines an enumeration.
And whenever the contents of this URL change, you can re-run the autogenerator and create a new enum class.
But keep in mind - every change in enumeration can introduce errors into the rest of the code.
source
share