private void loadPipeline(String uri, String id, int seconds) { Calendar expires = GregorianCalendar.getInstance(); if (seconds >= 0) { long millis = seconds; long extime = expires.getTimeInMillis() + (millis*1000); expires.setTimeInMillis(extime); } else { expires.setTimeInMillis(Long.MAX_VALUE); } XProcRuntime runtime = new XProcRuntime(getConfiguration()); try { XdmNode doc = runtime.parse(uri, runtime.getStaticBaseURI().toASCIIString()); XPipeline pipeline = runtime.use(doc); getPipelines().put(id, new PipelineConfiguration(runtime, pipeline, expires)); } catch (Exception e) { throw new XProcException(e); } } }
protected void setUp() throws Exception { super.setUp(); XProcConfiguration config = new XProcConfiguration(); runtime = new XProcRuntime(config); }
XProcRuntime runtime = new XProcRuntime(config);
XProcRuntime runtime = new XProcRuntime(config);
private void loadPipeline(String uri, String id, int seconds) { Calendar expires = GregorianCalendar.getInstance(); if (seconds >= 0) { long millis = seconds; long extime = expires.getTimeInMillis() + (millis*1000); expires.setTimeInMillis(extime); } else { expires.setTimeInMillis(Long.MAX_VALUE); } XProcRuntime runtime = new XProcRuntime(getConfiguration()); try { XdmNode doc = runtime.parse(uri, runtime.getStaticBaseURI().toASCIIString()); XPipeline pipeline = runtime.use(doc); getPipelines().put(id, new PipelineConfiguration(runtime, pipeline, expires)); } catch (Exception e) { throw new XProcException(e); } } }
runtime = new XProcRuntime(config); debug = config.debug;
runtime = new XProcRuntime(config); debug = config.debug;
public void runMethod(String[] args) throws IOException, SaxonApiException, URISyntaxException { UserArgs userArgs = new ParseArgs().parse(args); XProcConfiguration config = userArgs.createConfiguration(); runtime = new XProcRuntime(config); debug = config.debug; try { run(userArgs, config); } finally { // Here all memory should be freed by the next gc, right? if (runtime != null) { runtime.close(); } } }
public void runMethod(String[] args) throws IOException, SaxonApiException, URISyntaxException { UserArgs userArgs = new ParseArgs().parse(args); XProcConfiguration config = userArgs.createConfiguration(); runtime = new XProcRuntime(config); debug = config.debug; try { run(userArgs, config); } finally { // Here all memory should be freed by the next gc, right? if (runtime != null) { runtime.close(); } } }
public void run() throws SaxonApiException { Processor saxon = new Processor(false); XProcConfiguration config = new XProcConfiguration(saxon); XProcRuntime runtime = new XProcRuntime(config); InputStream stream = new ByteArrayInputStream(pipeline_xml.getBytes()); DocumentBuilder builder = saxon.newDocumentBuilder(); XdmNode pipeline_doc = builder.build(new SAXSource(new InputSource(stream))); XPipeline pipeline = runtime.use(pipeline_doc); pipeline.run(); }
runtime = new XProcRuntime(config); } catch (SaxonApiException e) { System.err.println(e.getMessage());
runtime = new XProcRuntime(config); } catch (SaxonApiException e) { System.err.println(e.getMessage());
XProcRuntime runtime = new XProcRuntime(getConfiguration());
XProcRuntime runtime = new XProcRuntime(getConfiguration());
runtime = new XProcRuntime(config);
public PipelineInstance get() { XProcConfiguration config = configFactory.newConfiguration(); XProcRuntime runtime = new XProcRuntime(config); runtime.setMessageListener(new slf4jXProcMessageListener()); if (uriResolver != null) {
XdmNode piperoot = S9apiUtils.getDocumentElement(pipedoc); XProcRuntime innerRuntime = new XProcRuntime(runtime);
XdmNode piperoot = S9apiUtils.getDocumentElement(pipedoc); XProcRuntime innerRuntime = new XProcRuntime(runtime);