/** * Only handles {@link LocalServiceProcessor} based on {@link FlattenList} */ public boolean canHandle(Processor processor) { if (!(processor instanceof LocalServiceProcessor)) { return false; } LocalServiceProcessor proc = (LocalServiceProcessor) processor; return proc.getWorker() instanceof FlattenList; }
/** * Only handles {@link LocalServiceProcessor} based on {@link SliceList} */ public boolean canHandle(Processor processor) { if (!(processor instanceof LocalServiceProcessor)) { return false; } LocalServiceProcessor proc = (LocalServiceProcessor) processor; return proc.getWorker() instanceof SliceList; }
final SliceList slicer = (SliceList) proc.getWorker();
final FlattenList flattener = (FlattenList) proc.getWorker();
@Override protected XMLSplitterConfigurationBean createConfigType(Processor processor) throws ActivityTranslationException { XMLSplitterConfigurationBean bean = new XMLSplitterConfigurationBean(); populateConfigurationBeanPortDetails(processor, bean); //TODO: doing this with introspection would remove the dependency on taverna-java-processor LocalServiceProcessor localServiceProcessor = (LocalServiceProcessor)processor; Element element = ((XMLExtensible)localServiceProcessor.getWorker()).provideXML(); String xml = new XMLOutputter().outputString(element); bean.setWrappedTypeXML(xml); return bean; }
@Override protected XMLSplitterConfigurationBean createConfigType(Processor processor) throws ActivityTranslationException { XMLSplitterConfigurationBean bean = new XMLSplitterConfigurationBean(); populateConfigurationBeanPortDetails(processor, bean); LocalServiceProcessor localServiceProcessor = (LocalServiceProcessor)processor; //TODO: doing this with introspection would remove the dependency on taverna-java-processor Element element = ((XMLExtensible)localServiceProcessor.getWorker()).provideXML(); String xml = new XMLOutputter().outputString(element); bean.setWrappedTypeXML(xml); return bean; }
@Override protected XMLSplitterConfigurationBean createConfigType(Processor processor) throws ActivityTranslationException { XMLSplitterConfigurationBean bean = new XMLSplitterConfigurationBean(); populateConfigurationBeanPortDetails(processor, bean); LocalServiceProcessor localServiceProcessor = (LocalServiceProcessor)processor; //TODO: doing this with introspection would remove the dependency on taverna-java-processor Element element = ((XMLExtensible)localServiceProcessor.getWorker()).provideXML(); String xml = new XMLOutputter().outputString(element); bean.setWrappedTypeXML(xml); return bean; }
@Override protected XMLSplitterConfigurationBean createConfigType(Processor processor) throws ActivityTranslationException { XMLSplitterConfigurationBean bean = new XMLSplitterConfigurationBean(); populateConfigurationBeanPortDetails(processor, bean); //TODO: doing this with introspection would remove the dependency on taverna-java-processor LocalServiceProcessor localServiceProcessor = (LocalServiceProcessor)processor; Element element = ((XMLExtensible)localServiceProcessor.getWorker()).provideXML(); String xml = new XMLOutputter().outputString(element); bean.setWrappedTypeXML(xml); return bean; }
@Override protected XMLSplitterConfigurationBean createConfigType(Processor processor) throws ActivityTranslationException { XMLSplitterConfigurationBean bean = new XMLSplitterConfigurationBean(); populateConfigurationBeanPortDetails(processor, bean); LocalServiceProcessor localServiceProcessor = (LocalServiceProcessor)processor; //TODO: doing this with introspection would remove the dependency on taverna-java-processor Element element = ((XMLExtensible)localServiceProcessor.getWorker()).provideXML(); String xml = new XMLOutputter().outputString(element); bean.setWrappedTypeXML(xml); return bean; }
@Override protected XMLSplitterConfigurationBean createConfigType(Processor processor) throws ActivityTranslationException { XMLSplitterConfigurationBean bean = new XMLSplitterConfigurationBean(); populateConfigurationBeanPortDetails(processor, bean); //TODO: doing this with introspection would remove the dependency on taverna-java-processor LocalServiceProcessor localServiceProcessor = (LocalServiceProcessor)processor; Element element = ((XMLExtensible)localServiceProcessor.getWorker()).provideXML(); String xml = new XMLOutputter().outputString(element); bean.setWrappedTypeXML(xml); return bean; }
/** * Determines whether the given input port supports being splitted * * @param input * @return */ public static boolean isSplittable(InputPort input) { boolean result = false; if (input.getSyntacticType().equalsIgnoreCase("'text/xml'") || input.getSyntacticType().equalsIgnoreCase("l('text/xml')")) { if (input.getProcessor() instanceof WSDLBasedProcessor) { result = true; } else if (input.getProcessor() instanceof LocalServiceProcessor) { LocalServiceProcessor processor = (LocalServiceProcessor) input .getProcessor(); if (processor.getWorker() instanceof XMLInputSplitter) { result = true; } } } return result; }
/** * Determines whether the given output port supports being splitted * * @param input * @return */ public static boolean isSplittable(OutputPort output) { boolean result = false; if (output.getSyntacticType().equalsIgnoreCase("'text/xml'") || output.getSyntacticType().equalsIgnoreCase("l('text/xml')")) { if (output.getProcessor() instanceof WSDLBasedProcessor) { result = true; } else if (output.getProcessor() instanceof LocalServiceProcessor) { LocalServiceProcessor processor = (LocalServiceProcessor) output .getProcessor(); if (processor.getWorker() instanceof XMLOutputSplitter) { result = true; } } } return result; }
LocalServiceProcessor processor = (LocalServiceProcessor) portToSplit .getProcessor(); if (processor.getWorker() instanceof XMLOutputSplitter) { XMLOutputSplitter splitter = (XMLOutputSplitter) processor .getWorker(); TypeDescriptor workerDesc = splitter.typeDescriptor; if (workerDesc instanceof ComplexTypeDescriptor) {
LocalServiceProcessor processor = (LocalServiceProcessor) portToSplit .getProcessor(); if (processor.getWorker() instanceof XMLInputSplitter) { XMLInputSplitter splitter = (XMLInputSplitter) processor .getWorker(); TypeDescriptor workerDesc = splitter.typeDescriptor; if (workerDesc instanceof ComplexTypeDescriptor) {