"""Entry point for parsing HOL DMSContent XML responses."""
import xml.etree.ElementTree as ET

from ecmind_blue_client.ecm.parser._dms_content_parser import DmsContentParser
from ecmind_blue_client.ecm.parser._dms_content_object_type_hol import (
    DmsContentObjectTypeHol,
)


class DmsContentParserHol(DmsContentParser[DmsContentObjectTypeHol]):
    """HOL parser for DMSContent XML responses from ``dms.GetResultList``.

    Use this parser when the query was built with ``DmsQueryBuilderHol``. Object types
    expose their result objects via ``DmsContentObjectTypeHol.objects()``.
    """

    def _init_object_type(self, node: ET.Element, archive: ET.Element) -> DmsContentObjectTypeHol:
        return DmsContentObjectTypeHol(node, archive)
