hec.rating.rating_template
Exception for rating templates
Holds independent and dependent parameter names, independent parameter lookup methods, and version string for all associated ratings.
Ratings are associated by using a rating identifier that includes the template identifier.
Initializes the RatingTemplate object
Arguments:
- name (str): The rating template identifier
- lookup_methods (Optional[ tuple[LookupMethod, LookupMethod, LookupMethod] ]): _description_. Defaults to None.
Raises:
- ValueError: _description_
Generates a RatingTemplate object from an XML string representation
Arguments:
- xml (str): The XML string representation
Raises:
- RatingTemplateException: if there is an error in the XML string
Returns:
RatingTemplate: The generated RatingTemplate object
The rating independent parameter lookup behaviors in in-range, out-range-low, out-range-high order as a list of lists of strings (one list for each independent parameter)
Operations:
Read/Write
Returns a formatted xml representation of the rating template.
For unformatted xml use etree.tostring(<template_obj>.xml_element)
Arguments:
- indent (str, optional): The string to use for each level of indentation. Defaults to " ".
- prepend (Optional[str], optional): A string to prepend to each line. Defaults to None.
Returns:
str: The formatted xml
Associates lookup methods with an independent parameter for a RatingTemplate object
Initializes the IndParameter object
Arguments:
- name (str): The associated independent parameter name
- lookup_methods (Optional[ tuple[ LookupMethod, LookupMethod, LookupMethod ] ]): The lookup methods associated with the independent parameter. Defaults to None. If specified, the lookup methods are in the order of in-range, out-of-range-low, out-of-range-high. If not specified, the default methods of [ LINEAR, NEXT, PREVIOUS ] are used.
Raises:
- ValueError: if the name is not a valid Parameter name
The in-range lookup behavior for the independent parameter
Operations:
Read-Only