Package nux.xom.pool

Examples of nux.xom.pool.XQueryPool


          return docPool.getDocument(URI.create(systemID));
        }
      };

      // prepare XQuery pool
      XQueryPool queryPool = new XQueryPool(
          new PoolConfig(), new XQueryFactory(null, resolver));
     
      ResultSequenceSerializer serializer = new ResultSequenceSerializer();
      serializer.setAlgorithm(algorithm);
      serializer.setEncoding(encoding);
      serializer.setIndent(indent);
     
      // now do the real work
      long runsStart = System.currentTimeMillis();
      for (int run=0; run < runs; run++) {
        if (isBench) {
          System.out.println("\n\n******************************************");
          System.out.println("run = " + run + ":");
        }
        for (int i=0; i < queries.size(); i++) {
          long start = System.currentTimeMillis();
          long serializationTime = 0;
          Object query = queries.get(i);
          XQuery xquery;
          if (query instanceof String) {
            xquery = queryPool.getXQuery((String)query, baseURI);
          } else if (query instanceof File) {
            xquery = queryPool.getXQuery((File)query, baseURI);
          } else {
            xquery = null; // disable XQuery for benchmarking
          }
         
          if (isBench) {
            System.out.println("query = " +query);
          }
          if (explain && run == 0 && xquery != null) {
            System.out.println("explain = \n" + xquery.explain());
          }
         
          XQuery morpher;
          if (update instanceof String) {
            morpher = queryPool.getXQuery((String)update, null);
          } else if (update instanceof File) {
            morpher = queryPool.getXQuery((File)update, null);
          } else {
            morpher = null;
          }
         
          int numSerials = 0;
View Full Code Here

TOP

Related Classes of nux.xom.pool.XQueryPool

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.