|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.embl.ebi.escience.scuflworkers.java.XMLInputSplitter
public class XMLInputSplitter
A LocalWorker that takes a given input port for a complex type, and splits it to a single level generating an array of simple type inputs. Nested complex types remain as type/xml and can be split further by adding additional XMLInputSplitter processors.
| Field Summary |
|---|
| Fields inherited from interface org.embl.ebi.escience.scuflworkers.java.LocalWorker |
|---|
BINARY, BINARY_ARRAY, HTML, HTML_ARRAY, PNG_IMAGE, PNG_IMAGE_ARRAY, STRING, STRING_ARRAY, UNTYPED, UNTYPED_ARRAY |
| Constructor Summary | |
|---|---|
XMLInputSplitter()
|
|
| Method Summary | |
|---|---|
void |
consumeXML(org.jdom.Element element)
Generates the TypeDescriptor structure, and then the relevant inputs from the XML element provided. |
java.util.Map |
execute(java.util.Map inputMap)
Takes the inputs and generates an XML output based upon these inputs. |
java.lang.String[] |
inputNames()
Get an array of the names of input ports for this processor |
java.util.List<InputPort> |
inputPorts(LocalServiceProcessor processor)
The InputPorts for this localworker, to be used by LocalServiceProcessor |
java.lang.String[] |
inputTypes()
Get an array of the string types for the inputs defined by the inputNames() method, these should probably use the constants defined in this interface but may use any valid Baclava data type specifier. |
static boolean |
isSplittable(InputPort input)
Determines whether the given input port supports being splitted |
java.lang.String[] |
outputNames()
Names of the output ports |
java.util.List<OutputPort> |
outputPorts(LocalServiceProcessor processor)
The OutputPorts for this localworker, to be used by LocalServiceProcessor |
java.lang.String[] |
outputTypes()
Types of the output ports |
org.jdom.Element |
provideXML()
Generates the XML that describes the TypeDescriptor, and therefore the inputs for this worker, to allow it to be reconstructed using consumeXML. |
void |
setUpInputs(InputPort portToSplit)
Dynamically generates the inputNames and inputTypes according to the TypeDescriptor associated with the supplied InputPort. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLInputSplitter()
| Method Detail |
|---|
public java.lang.String[] inputNames()
LocalWorker
inputNames in interface LocalWorkerpublic java.lang.String[] inputTypes()
LocalWorker
inputTypes in interface LocalWorkerpublic java.lang.String[] outputNames()
LocalWorker
outputNames in interface LocalWorkerpublic java.lang.String[] outputTypes()
LocalWorker
outputTypes in interface LocalWorker
public java.util.Map execute(java.util.Map inputMap)
throws TaskExecutionException
execute in interface LocalWorkerTaskExecutionException - thrown if there is an error during invocation of the task.public static boolean isSplittable(InputPort input)
input -
public void setUpInputs(InputPort portToSplit)
portToSplit - public void consumeXML(org.jdom.Element element)
consumeXML in interface XMLExtensiblepublic org.jdom.Element provideXML()
provideXML in interface XMLExtensible
public java.util.List<InputPort> inputPorts(LocalServiceProcessor processor)
throws DuplicatePortNameException,
PortCreationException
LocalWorkerWithPorts
inputPorts in interface LocalWorkerWithPortsDuplicatePortNameException
PortCreationException
public java.util.List<OutputPort> outputPorts(LocalServiceProcessor processor)
throws DuplicatePortNameException,
PortCreationException
LocalWorkerWithPorts
outputPorts in interface LocalWorkerWithPortsDuplicatePortNameException
PortCreationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||