Examples of XPathQueryServiceImpl


Examples of org.exist.xmldb.XPathQueryServiceImpl

        try {
            org.xmldb.api.base.Collection testCollection =
                    DatabaseManager.getCollection("xmldb:exist://" + TestConstants.TEST_COLLECTION_URI.toString(), "admin", null);
            if (testCollection == null)
                return;
            XPathQueryServiceImpl service = (XPathQueryServiceImpl)
                    testCollection.getService("XQueryService", "1.0");
            ResourceSet result = service.query(QUERY1);
            assertEquals(expected, result.getSize());

            result = service.query(QUERY2);
            assertEquals(expected, result.getSize());
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

Examples of org.exist.xmldb.XPathQueryServiceImpl

        }

        public void run() {
            try {
                Collection collection = DatabaseManager.getCollection("xmldb:exist:///db/test", "admin", null);
                XPathQueryServiceImpl service = (XPathQueryServiceImpl) collection.getService("XQueryService", "1.0");
                service.beginProtected();
                try {
                    if (start > 0)
                        service.declareVariable("start", new Integer(start));
                    service.query(query);
                } finally {
                    service.endProtected();
                }
            } catch (Exception e) {
                e.printStackTrace();
                fail(e.getMessage());
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.