query_parser.py revision 1100
3N/A# The contents of this file are subject to the terms of the 3N/A# Common Development and Distribution License (the "License"). 3N/A# You may not use this file except in compliance with the License. 3N/A# See the License for the specific language governing permissions 3N/A# and limitations under the License. 3N/A# When distributing Covered Code, include this CDDL HEADER in each 3N/A# If applicable, add the following below this CDDL HEADER, with the 3N/A# fields enclosed by brackets "[]" replaced with your own identifying 3N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2639N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 3N/A# Use is subject to license terms. 30N/A """This class exists so that the classes the parent class query parser 30N/A uses to build the AST are the ones defined in this module and not the 30N/A parent class's module. This is done so that a single query parser can 30N/A be shared between the client and server modules but will construct an 30N/A AST using the appropriate classes.""" 933N/A# Because many classes do not have client specific modifications, they 933N/A# simply subclass the parent module's classes. 526N/A """This class handles the client specific search logic for searching 526N/A for a specific query term.""" 526N/A """This function performs the specific steps needed to do 2639N/A The "restriction" parameter is a generator over results that 2639N/A another branch of the AST has already found. If it's not None, 2639N/A then it's treated as the domain for search. If it is None then 1698N/A the actions of all known packages is the domain for search. 3N/A The "fmris" parameter is a function which produces an object 1698N/A which iterates over all known fmris."""