hec.rating.local_rating_set
Exception class for LocalRatingSet objects
A sub-class of AbstractRatingSet that performs all ratings in local code
@classmethod
def
from_xml( cls, xml_str: str, datastore: Optional[hec.AbstractDataStore] = None) -> LocalRatingSet:
Creates a LocalRatingSet object from an XML instance
Arguments:
- xml_str (str): The XML instance
- datastore (Optional[AbstractDataStore]): The AbstractDataStore object to retrieve rating points from if the XML includes table ratings without rating points (used in lazy loading). Defaults to None. Not needed if the XML has no table ratings or all table ratings have rating points specified for all effective times.
Raises:
Returns:
LocalRatingSet: The constructed LocalRatingSet object
ratings: dict[datetime.datetime, hec.rating.AbstractRating]
The set of ratings in this rating set
Operations:
Read-Only
def
to_xml(self, indent: str = ' ', prepend: str = '') -> str:
Returns a formatted xml representation of the rating set.
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