
    ni                     $    S SK Jr   " S S5      rg)    )parse_queryc                   F    \ rS rSrS\4S jrS rS rS rS r	S r
S	 rS
rg)Query   
query_textc                 X    [        U5      u  U l        U l        U l        U l        Xl        g)aG  
PyReason query object which is parsed from a string of form:
    `pred(node)` or `pred(edge)` or `pred(node) : [l, u]`
If bounds are not specified, they are set to [1, 1] by default. A tilde `~` before the predicate means that the bounds
are inverted, i.e. [0, 0] for [1, 1] and vice versa.

Queries can be used to analyze the graph and extract information about the graph after the reasoning process.
Queries can also be used as input to the reasoner to filter the ruleset based which rules are applicable to the query.

:param query_text: The query string of form described above
N)r   _Query__pred_Query__component_Query__comp_type_Query__bndr   )selfr   s     V/home/james-whalen/.local/lib/python3.13/site-packages/pyreason/scripts/query/query.py__init__Query.__init__   s)     GRR\F]CT%t'7$    c                     U R                   $ N)r	   r   s    r   get_predicateQuery.get_predicate   s    {{r   c                     U R                   $ r   )r
   r   s    r   get_componentQuery.get_component       r   c                     U R                   $ r   )r   r   s    r   get_component_typeQuery.get_component_type   r   r   c                     U R                   $ r   )r   r   s    r   
get_boundsQuery.get_bounds   s    zzr   c                     U R                   $ r   r   r   s    r   __str__Query.__str__        r   c                     U R                   $ r   r"   r   s    r   __repr__Query.__repr__#   r%   r   )__bnd__comp_type__component__predr   N)__name__
__module____qualname____firstlineno__strr   r   r   r   r   r#   r'   __static_attributes__ r   r   r   r      s,    %3 %  r   r   N)#pyreason.scripts.utils.query_parserr   r   r3   r   r   <module>r5      s    ;   r   