Package org.apache.slide.search

Examples of org.apache.slide.search.QueryScope


     */
    public SearchQuery parseQuery (Element basicSearchElement, SearchToken token, PropertyProvider propertyProvider) throws BadQueryException {
        boolean useEnvelope = true;
       
       
        QueryScope scope = BasicQueryImpl.getScope (basicSearchElement);
        IBasicQuery query = null;
       
       
        if (useEnvelope) {
            query = new BasicQueryEnvelope (token, scope);
           
        }
        else {
       
//          Uri uri = new Uri (token.getNamespace(),   );
            Uri uri = token.getNamespace().getUri(token.getSlideToken(), token.getSlideContext().getSlidePath(scope.getHref()));
       
        AbstractStore store = (AbstractStore)uri.getStore();
        String className = (String)store.getParameter (BASIC_QUERY_CLASS);
       
        if (className != null) {
View Full Code Here


               
                requestedProperties = searchQuery.requestedProperties ();
               
                if (searchQuery instanceof IBasicQuery)
                {
                    QueryScope scope = ((IBasicQuery)searchQuery).getScope();
                    slidePath = ((IBasicQuery)searchQuery).getSlidePath();
                   
                    // check, if scope is accessible (ACL)
                    token.getContentHelper().retrieve(slideToken, slidePath);
                   
                    scope.setIsCollection (
                        WebdavUtils.isCollection (token, slideToken, slidePath));
                }
            }
            catch (JDOMException e) {
                resp.setStatus(WebdavStatus.SC_BAD_REQUEST);
View Full Code Here

    public boolean equals (Object o) {
       
        if (! (o instanceof QueryScope))
            return false;
       
        QueryScope other = (QueryScope)o;
        if (!href.equals (other.getHref()))
            return false;
       
        if (! (depth == other.getDepth()))
            return false;
       
        return true;
    }
View Full Code Here

        Set scopesToRemove = new HashSet ();
        while (it.hasNext()) {

            Scope scope = (Scope)it.next();
            // System.out.println ("parseQueryElement for scope " + scope);
            QueryScope subQueryScope = calculateSubQueryScope (scope);
            if (subQueryScope.getDepth() >= 0) {
                BasicQueryImpl query = (BasicQueryImpl)subQueries.get (scope);
                query.parseQueryElement (basicSearchElement, propertyProvider, subQueryScope);
            }
            else {
                scopesToRemove.add (scope);
View Full Code Here

       
       
        Set inclSet = topLevelQueryScope.getIncludeSet();
        Set exclSet = topLevelQueryScope.getExcludeSet();
       
        QueryScope queryScope = new BasicQueryScope
            (contextPath, subQueryDepth, inclSet, exclSet);
       
        return queryScope;
    }
View Full Code Here

    public boolean equals (Object o) {
       
        if (! (o instanceof QueryScope))
            return false;
       
        QueryScope other = (QueryScope)o;
        if (!href.equals (other.getHref()))
            return false;
       
        if (! (depth == other.getDepth()))
            return false;
       
        return true;
    }
View Full Code Here

     */
    public SearchQuery parseQuery (Element basicSearchElement, SearchToken token, PropertyProvider propertyProvider) throws BadQueryException {
        boolean useEnvelope = true;
       
       
        QueryScope scope = BasicQueryImpl.getScope (basicSearchElement);
        IBasicQuery query = null;
       
       
        if (useEnvelope) {
            query = new BasicQueryEnvelope (token, scope);
           
        }
        else {
       
//          Uri uri = new Uri (token.getNamespace(),   );
            Uri uri = token.getNamespace().getUri(token.getSlideToken(), token.getSlideContext().getSlidePath(scope.getHref()));
       
        AbstractStore store = (AbstractStore)uri.getStore();
        String className = (String)store.getParameter (BASIC_QUERY_CLASS);
       
        if (className != null) {
View Full Code Here

               
                requestedProperties = searchQuery.requestedProperties ();
               
                if (searchQuery instanceof IBasicQuery)
                {
                    QueryScope scope = ((IBasicQuery)searchQuery).getScope();
                    slidePath = ((IBasicQuery)searchQuery).getSlidePath();
                   
                    // check, if scope is accessible (ACL)
                    token.getContentHelper().retrieve(slideToken, slidePath);
                   
                    scope.setIsCollection (
                        WebdavUtils.isCollection (token, slideToken, slidePath));
                }
            }
            catch (JDOMException e) {
                resp.setStatus(WebdavStatus.SC_BAD_REQUEST);
View Full Code Here

        Set scopesToRemove = new HashSet ();
        while (it.hasNext()) {

            Scope scope = (Scope)it.next();
            // System.out.println ("parseQueryElement for scope " + scope);
            QueryScope subQueryScope = calculateSubQueryScope (scope);
            if (subQueryScope.getDepth() >= 0) {
                BasicQueryImpl query = (BasicQueryImpl)subQueries.get (scope);
                query.parseQueryElement (basicSearchElement, propertyProvider, subQueryScope);
            }
            else {
                scopesToRemove.add (scope);
View Full Code Here

       
       
        Set inclSet = topLevelQueryScope.getIncludeSet();
        Set exclSet = topLevelQueryScope.getExcludeSet();
       
        QueryScope queryScope = new BasicQueryScope
            (contextPath, subQueryDepth, inclSet, exclSet);
       
        return queryScope;
    }
View Full Code Here

TOP

Related Classes of org.apache.slide.search.QueryScope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.