Package org.exist.source

Examples of org.exist.source.ClassLoaderSource


          XQuery xquery = broker.getXQueryService();
         
          XQueryContext context = xquery.newContext(AccessContext.TEST);
          //context.setModuleLoadPath();
         
            Source query = new ClassLoaderSource(source);
           
            CompiledXQuery compiledQuery = xquery.compile(context, query);
           
      for(Iterator<UserDefinedFunction> i = context.localFunctions(); i.hasNext(); ) {
        UserDefinedFunction func = i.next();
View Full Code Here


                Resource resource = collection.createResource(file.getName(), "XMLResource");
                resource.setContent(file);
                collection.storeResource(resource);
            }
            XQueryService service = (XQueryService) collection.getService("XQueryService", "1.0");
            ResourceSet result = service.execute(new ClassLoaderSource("/org/exist/performance/log2html.xql"));

            if (directory == null)
                directory = new File(System.getProperty("user.dir"));
            File htmlFile = new File(directory, "results.html");
            FileUtils.writeStringToFile(htmlFile, result.getResource(0).getContent().toString(), "UTF-8");
View Full Code Here

           
            if(catalogPath!=null){
                context.declareVariable(CATALOG, catalogPath);
            }
           
            compiled = xquery.compile(context, new ClassLoaderSource(queryPath) );
           
            result = xquery.execute(compiled, null);
           
        } catch (final Exception ex) {
            logger.error("Problem executing xquery", ex);
View Full Code Here

TOP

Related Classes of org.exist.source.ClassLoaderSource

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.