protected Representation runPipeline(String id) { PipelineConfiguration pipeconfig = getPipelines().get(id); XPipeline pipeline = pipeconfig.pipeline; try { pipeline.run(); pipeconfig.ran = true; for (String port : pipeline.getOutputs()) { Vector<XdmNode> nodes = new Vector<XdmNode> (); ReadablePipe rpipe = pipeline.readFrom(port); while (rpipe.moreDocuments()) { nodes.add(rpipe.read()); } pipeconfig.outputs.put(port, nodes); } } catch (Exception e) { throw new XProcException(e); } if (pipeconfig.defoutput != null) { return getOutput(pipeconfig, pipeconfig.defoutput); } else { setStatus(Status.SUCCESS_OK); return new EmptyRepresentation(); } }
protected Representation runPipeline(String id) { PipelineConfiguration pipeconfig = getPipelines().get(id); XPipeline pipeline = pipeconfig.pipeline; try { pipeline.run(); pipeconfig.ran = true; for (String port : pipeline.getOutputs()) { Vector<XdmNode> nodes = new Vector<XdmNode> (); ReadablePipe rpipe = pipeline.readFrom(port); while (rpipe.moreDocuments()) { nodes.add(rpipe.read()); } pipeconfig.outputs.put(port, nodes); } } catch (Exception e) { throw new XProcException(e); } if (pipeconfig.defoutput != null) { return getOutput(pipeconfig, pipeconfig.defoutput); } else { setStatus(Status.SUCCESS_OK); return new EmptyRepresentation(); } }
xpipeline.run(); } catch (XProcException e) { logger.debug(e.getMessage(), e);
xpipeline.run(); } catch (XProcException e) { logger.debug(e.getMessage(), e);
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(); }
newstep.run(); runtime.finish(this);
newstep.run(); } catch (Throwable e) { throw handleException(e);
pipeline.xpipe.run();
pipeline.run();
pipeline.run();
loader.run(); ReadablePipe xformed = loader.readFrom("result"); pipeDoc = xformed.read();
loader.run(); ReadablePipe xformed = loader.readFrom("result"); pipeDoc = xformed.read();
pipeline.run();
pipeline.run();