Package org.apache.slide.search

Examples of org.apache.slide.search.InvalidQueryException


     *
     */
    protected String  getLiteral(Element e) throws InvalidQueryException {
        Element lit = e.getChild (Literals.LITERAL, NamespaceCache.DEFAULT_NAMESPACE);
        if (lit == null)
            throw new InvalidQueryException
                ("No literal element supplied");
       
        return lit.getText ();
    }
View Full Code Here


    protected BasicExpression (Element e) throws InvalidQueryException {
        this.expressionElement = e;
        List attrList = e.getAttributes();
        if (attrList.size() != 0) {
            Attribute attr = (Attribute) attrList.get(0);
            throw new InvalidQueryException (attr.getQualifiedName() +
                                                 " is an unprocessable entity");
        }
    }
View Full Code Here

     */
    MergeExpression (Element e, Collection expressionsToMerge) throws InvalidQueryException {
        super (e);
        this.expressionsToMerge = expressionsToMerge;
        if (expressionsToMerge.size() == 0) {
            throw new InvalidQueryException(getMustHaveMergeExpressionsMessage(e.getName()));
        }
    }
View Full Code Here

                else if (name.equals (Literals.OR))
                    result = new OrExpression (new Element(name, NamespaceCache.getNamespace(namespace)),
                                               expressionsToMerge);
            }
            if (result == null) {
                throw new InvalidQueryException
                    ("operator <" + NamespaceCache.DEFAULT_URI + ":" + name + "> is an unprocessable entity");
               
            }
        }
       
View Full Code Here

            }
            else if (namespace.equals (NamespaceCache.SLIDE_URI)) {
                result = createNonDAVExpression(element, namespace);
            }
            else {
                throw new InvalidQueryException
                    ("operator <" + namespace + ":" + name + "> is an unprocessable entity");
               
            }
        }
       
View Full Code Here

           
        else if (name.equals (Literals.NOT_ISDEFINED))
            result = new NotIsDefinedExpression (e, getRequestedResourcePool());
           
        else
            throw new InvalidQueryException
                ("operator <" + NamespaceCache.DEFAULT_URI + ":" + name + "> is an unprocessable entity");
       
        return result;
    }
View Full Code Here

            && name.equals (Literals.NOT_PROPCONTAINS))
           
            result = new NotPropContainsExpression (e, getRequestedResourcePool());
           
        else
            throw new InvalidQueryException
                ("operator <" + namespace + ":" + name + "> is an unprocessable entity");
       
        return result;
    }
View Full Code Here

            if (casesensAttr.equals ("1"))
                casesensitive = true;
            else if (casesensAttr.equals ("0"))
                casesensitive = false;
            else
                throw new InvalidQueryException ("casesensitive must be either \"0\" or \"1\"");
        }
       
        Element propListElement = e.getChild (Literals.PROP, NamespaceCache.DEFAULT_NAMESPACE);
        if (propListElement == null)
            throw new InvalidQueryException
                ("No property element supplied");
       
        List propList = propListElement.getChildren();
       
        if (propList.size() != 1)
            throw new InvalidQueryException
                ("Expected exactly 1 prop element, found " + propList.size());
       
        Element propElement = ((Element)propList.get(0));
        property = propElement.getName();
        propNamespace = propElement.getNamespace().getURI();
View Full Code Here

     *
     */
    private String  getLiteral(Element e) throws InvalidQueryException {
        Element lit = e.getChild (Literals.LITERAL, NamespaceCache.DEFAULT_NAMESPACE);
        if (lit == null)
            throw new InvalidQueryException
                ("No literal element supplied");
       
        return lit.getText ();
    }
View Full Code Here

        if ( Literals.NOT.equals(expressionElement.getName()) &&
            NamespaceCache.DEFAULT_URI.equals(expressionElement.getNamespaceURI()) ) {
           
            List children = expressionElement.getChildren();
            if (children.size() != 1) {
                throw new InvalidQueryException(BAD_NOT_EXPRESSION_EXCEPTION_MESSAGE);
            }
            return getProcessedElement((Element)children.get(0), ! negate);
        }
       
        if (negate) {
View Full Code Here

TOP

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

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.