Package org.exist.xquery.functions.fn

Examples of org.exist.xquery.functions.fn.ExtNear


        if (p1.getLength() == 0) {
            throw new XPathException(ast.getLine(), ast.getColumn(),
                "Second argument of near() is empty");
        }
        final Expression e1 = p1.getExpression(0);
        final ExtNear near = new ExtNear(context);
        near.setLocation(ast.getLine(), ast.getColumn());
        near.addTerm(e1);
        near.setPath((PathExpr) params.get(0));
        if (params.size() > 2) {
            p1 = (PathExpr) params.get(2);
            if (p1.getLength() == 0) {
                throw new XPathException(ast.getLine(), ast.getColumn(),
                    "Max distance argument of near() is empty");
            }
            near.setMaxDistance(p1);
            if (params.size() == 4) {
                p1 = (PathExpr) params.get(3);
                if(p1.getLength() == 0) {
                    throw new XPathException(ast.getLine(), ast.getColumn(),
                        "Min distance argument of near() is empty");
                }
                near.setMinDistance(p1);
            }
        }
        return near;
    }
View Full Code Here

TOP

Related Classes of org.exist.xquery.functions.fn.ExtNear

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.