String list difference - yielding empty list
Created: 2010-10-29 16:17:15
The string list difference service takes in ['a','b','c'] and ['a','c','b'] and returns the empty list [].
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (3)
String list difference - yielding empty list |
String list difference - yielding empty list |
String list difference - yielding empty list |
Descriptions (1)
The string list difference service takes in ['a','b','c'] and ['a','c','b'] and returns the empty list []. |
Dependencies (0)
Processors (5)
Name |
Type |
Description |
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]);
}
}
|
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]);
}
}
|
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);
}
}
|
another_string_list |
stringconstant |
Valuea,c,b |
a_string_list |
stringconstant |
Valuea,b,c |
Outputs (1)
Name |
Description |
difference |
|
Datalinks (5)
Source |
Sink |
another_string_list:value |
list2:string |
a_string_list:value |
list1:string |
list2:split |
String_list_difference:list2 |
list1:split |
String_list_difference:list1 |
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