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

        Element asc = order.getChild (Literals.ASCENDING, order.getNamespace());
        Element desc = order.getChild (Literals.DESCENDING, order.getNamespace());
        boolean result = true;

        if (asc != null && desc != null)
            throw new InvalidQueryException ("either ascending or descending may be supplied");

        if (desc != null)
            result = false;

        return result;
View Full Code Here

        List propList =
            orderElem.getChild (Literals.PROP, orderElem.getNamespace()).getChildren();

        if (propList.size() != 1)
            throw new InvalidQueryException
                ("Expected exactly 1 prop element, found " + propList.size());

        Element propElem = (Element)propList.get(0);

        return createProperty (propElem);
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

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.