String list difference - yielding non-empty list
Created: 2010-10-29 16:16:50
The string list difference service takes in ['a','b','c'] and ['a','e','c'] and returns the list ['b','e'].
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (3)
String list difference - yielding non-empty list |
String list difference - yielding non-empty list |
String list difference - yielding non-empty list |
Descriptions (1)
The string list difference service takes in ['a','b','c'] and ['a','e','c'] and returns the list ['b','e']. |
Dependencies (0)
Processors (5)
Name |
Type |
Description |
String_list_difference |
localworker |
ScriptList difference = new ArrayList();
for (Iterator i = list1.iterator(); i.hasNext();) {
Object o = i.next();
if (!list2.contains(o)) {
difference.add(o);
}
}
for (Iterator i = list2.iterator(); i.hasNext();) {
Object o = i.next();
if (!list1.contains(o)) {
difference.add(o);
}
}
|
list1 |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
list2 |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
a_string_list |
stringconstant |
Valuea,b,c |
another_string_list |
stringconstant |
Valuea,e,c |
Outputs (1)
Name |
Description |
difference |
|
Datalinks (5)
Source |
Sink |
list2:split |
String_list_difference:list2 |
list1:split |
String_list_difference:list1 |
a_string_list:value |
list1:string |
another_string_list:value |
list2:string |
String_list_difference:difference |
difference |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (0)
(People/Groups)
None
Attributions (0)
(Workflows/Files)
None
Shared with Groups (1)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment