Esempio n. 1
0
 public XQueryExecutor(TraceExtension traceExtension) {
   this.traceExtension = traceExtension;
   Configuration configuration = Configuration.newConfiguration();
   if (!traceExtension.allowsOptimization()) {
     configuration.setConfigurationProperty(OPTIMIZATION_LEVEL, String.valueOf(NO_OPTIMIZATION));
   }
   configuration.setModuleURIResolver(new ClasspathModuleUriResolver());
   Processor processor = new Processor(configuration);
   xQueryCompiler = processor.newXQueryCompiler();
   StaticQueryContext staticQueryContext = xQueryCompiler.getUnderlyingStaticContext();
   staticQueryContext.setCodeInjector(traceExtension.getTraceCodeInjector());
 }
 public DocumentBuilderFactoryImpl() {
   this(Configuration.newConfiguration());
 }