Package org.xmldb.api.modules

Examples of org.xmldb.api.modules.XPathQueryService.query()


    Collection col = client.getCollection(TEST_COLLECTION_PATH);
    XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");
    try
    {
      ResourceSet resultSet = xpathservice.query(query);

      // when we do support it the following tests will be run
      assertEquals(2L, resultSet.getSize());
      assertEquals("true", resultSet.getResource(1L).getContent());
View Full Code Here


    Collection col = client.getCollection(TEST_COLLECTION_PATH);
    XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");
    try
    {
      ResourceSet resultSet = xpathservice.query(query);

      assertEquals(2L, resultSet.getSize());
    }
    catch (XMLDBException e)
    {
View Full Code Here

    Collection col = client.getCollection(TEST_COLLECTION_PATH);
    XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");
    try
    {
      ResourceSet resultSet = xpathservice.query(query);

      assertEquals(2L, resultSet.getSize());
    }
    catch (XMLDBException e)
    {
View Full Code Here

  {
    String query = "//person[first='John' and last='Smith']";

    Collection col = this.client.getCollection(TEST_COLLECTION_PATH);
    XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");
    ResourceSet resultSet = xpathservice.query(query);

    ResourceIterator results = resultSet.getIterator();

    List res = asList(results);
    assertEquals(1, res.size());
View Full Code Here

    Collection col = this.client.getCollection(TEST_COLLECTION_PATH);
    XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");
    xpathservice.setNamespace("h", "http://example.net/person");

    ResourceSet resultSet = xpathservice.query(query);

    ResourceIterator results = resultSet.getIterator();
    List res = asList(results);
    assertEquals(1, res.size());
View Full Code Here

    Collection col = this.client.getCollection(TEST_COLLECTION_PATH);
    XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");
    xpathservice.setNamespace("h", "http://example.net/person");

    ResourceSet resultSet = xpathservice.query(query);

    ResourceIterator results = resultSet.getIterator();
    List res = asList(results);
    assertEquals(1, res.size());
View Full Code Here

    try
    {
      Collection col = this.client.getCollection(TEST_COLLECTION_PATH);
      XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");
      ResourceSet resultSet = xpathservice.query(query);

      ResourceIterator results = resultSet.getIterator();

      List res = asList(results);
      assertEquals(1, res.size());
View Full Code Here

        public Result runQuery() throws Exception {
            Collection col = IndexedSearchTest.this.client.getCollection(IndexedSearchTest.INDEXED_SEARCH_TEST_COLLECTION_PATH);
            XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");

            org.apache.xindice.Stopwatch aStopwatch = new org.apache.xindice.Stopwatch("Non-indexed starts-with query", true);
            ResourceSet resultSet = xpathservice.query(itsTestQuery);
            aStopwatch.stop();
            return new Result(resultSet, aStopwatch.elapsed());
        }

        /**
 
View Full Code Here

            xpath = "/person[address/@type='home' and address/text() = '" + searchstring + "' ]" ;
         } else if ( searchtype.equals("workaddress")) {
            xpath = "/person[address/@type='work' and address/text() = '" + searchstring + "' ]" ;
         }
        
         ResourceSet resultSet = service.query(xpath);
         ResourceIterator results = resultSet.getIterator();
        
         Group group = (Group)session.getAttribute("group");
        
         // Clear out group object...
View Full Code Here

         XPathQueryService service = (XPathQueryService)col.getService("XPathQueryService",XMLDBAPIVERSION);
        
         // Get the seach parameters from the form
         String searchstring = request.getParameter("SEARCHSTRING");
        
         ResourceSet resultSet = service.query(searchstring);
         ResourceIterator results = resultSet.getIterator();
        
         Group group = (Group)session.getAttribute("group");
        
         // Clear out group object...
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.