/** * Say whether the query should be compiled and evaluated to use streaming. * This affects subsequent calls on the compile() methods. This option requires * Saxon-EE. * * @param option if true, the compiler will attempt to compile a query to be * capable of executing in streaming mode. If the query cannot be streamed, * a compile-time exception is reported. In streaming mode, the source * document is supplied as a stream, and no tree is built in memory. The default * is false. * <p> * <p>When setStreaming(true) is specified, this has the additional side-effect of setting the required * context item type to "document-node()" * @since 9.6 */ public void setStreaming(boolean option) { env.setStreaming(option); // We check this again more securely, but it's good to give the error as soon as possible if (option && !processor.getUnderlyingConfiguration().isLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XQUERY)) { throw new UnsupportedOperationException("Streaming requires a Saxon-EE license"); } if (option) { setRequiredContextItemType(new ConstructedItemType(NodeKindTest.DOCUMENT, getProcessor())); } }
/** * Say whether the query should be compiled and evaluated to use streaming. * This affects subsequent calls on the compile() methods. This option requires * Saxon-EE. * * @param option if true, the compiler will attempt to compile a query to be * capable of executing in streaming mode. If the query cannot be streamed, * a compile-time exception is reported. In streaming mode, the source * document is supplied as a stream, and no tree is built in memory. The default * is false. * <p> * <p>When setStreaming(true) is specified, this has the additional side-effect of setting the required * context item type to "document-node()" * @since 9.6 */ public void setStreaming(boolean option) { env.setStreaming(option); // We check this again more securely, but it's good to give the error as soon as possible if (option && !processor.getUnderlyingConfiguration().isLicensedFeature(Configuration.LicenseFeature.ENTERPRISE_XQUERY)) { throw new UnsupportedOperationException("Streaming requires a Saxon-EE license"); } if (option) { setRequiredContextItemType(new ConstructedItemType(NodeKindTest.DOCUMENT, getProcessor())); } }
/** * Request fast compilation. Fast compilation will generally be achieved at the expense of run-time performance * and quality of diagnostics. Fast compilation is a good trade-off if (a) the expression is known to be correct, * and (b) once compiled, the expression is only executed once against a document of modest size. * <p><i>The current implementation is equivalent to switching off all optimizations. Setting this option, however, * indicates an intent rather than a mechanism, and the implementation details may change in future to reflect * the intent.</i></p> * * @param fast set to true to request fast compilation; set to false to revert to the optimization options * defined in the Configuration. * @since 9.9 */ public void setFastCompilation(boolean fast) { if (fast) { env.setOptimizerOptions(new OptimizerOptions(0)); } else { env.setOptimizerOptions(getProcessor().getUnderlyingConfiguration().getOptimizerOptions()); } }
/** * Request fast compilation. Fast compilation will generally be achieved at the expense of run-time performance * and quality of diagnostics. Fast compilation is a good trade-off if (a) the expression is known to be correct, * and (b) once compiled, the expression is only executed once against a document of modest size. * <p><i>The current implementation is equivalent to switching off all optimizations. Setting this option, however, * indicates an intent rather than a mechanism, and the implementation details may change in future to reflect * the intent.</i></p> * * @param fast set to true to request fast compilation; set to false to revert to the optimization options * defined in the Configuration. * @since 9.9 */ public void setFastCompilation(boolean fast) { if (fast) { env.setOptimizerOptions(new OptimizerOptions(0)); } else { env.setOptimizerOptions(getProcessor().getUnderlyingConfiguration().getOptimizerOptions()); } }
xqcomp.getProcessor().getUnderlyingConfiguration().isLicensedFeature( Configuration.LicenseFeature.ENTERPRISE_XQUERY));
xqcomp.getProcessor().getUnderlyingConfiguration().isLicensedFeature( Configuration.LicenseFeature.ENTERPRISE_XQUERY));