Validate_Compare_Compare_List
Created: 2013-04-15 09:45:54
QA for file migrated to wav. The QA steps include File Format Validation, Significant Property Comparison and xcorrSound waveform-compare file content comparison (all CLI). Input the migrated wav and a "compare-to-wav" file.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Bolette Ammitzbøll Jurik, The SCAPE Project, The State and University Library, Aarhus, Denmark |
Titles (1)
Validate_Compare_Compare_List |
Descriptions (1)
QA for file migrated to wav. The QA steps include File Format Validation, Significant Property Comparison and xcorrSound waveform-compare file content comparison (all CLI). Input the migrated wav and a "compare-to-wav" file. |
Dependencies (0)
Inputs (3)
Name |
Description |
comparetowav_list |
Fileurl as Value with list of MP3 input files
|
output_files |
|
migratedwav_list |
|
Processors (12)
Name |
Type |
Description |
Validate_Compare_Compare |
workflow |
|
Input_file_to_file_list |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = "\n";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
if (!result[i].startsWith("#")) {
split.add(result[i]);
}
}
}
|
regex_value |
stringconstant |
Value\n |
Read_Text_File |
localworker |
ScriptBufferedReader getReader (String fileUrl, String encoding) throws IOException {
InputStreamReader reader;
try {
if (encoding == null) {
reader = new FileReader(fileUrl);
} else {
reader = new InputStreamReader(new FileInputStream(fileUrl),encoding);
}
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
if (encoding == null) {
reader = new InputStreamReader (url.openStream());
} else {
reader = new InputStreamReader (url.openStream(), encoding);
}
}
return new BufferedReader(reader);
}
StringBuffer sb = new StringBuffer(4000);
if (encoding == void) {
encoding = null;
}
BufferedReader in = getReader(fileurl, encoding);
String str;
String lineEnding = System.getProperty("line.separator");
while ((str = in.readLine()) != null) {
sb.append(str);
sb.append(lineEnding);
}
in.close();
filecontents = sb.toString();
|
encoding_value |
stringconstant |
Valueutf8 |
outputToLogs |
localworker |
Scriptif (!outputdir.endsWith("/")) {
outputdir += "/";
}
output = outputdir + "logs";
dirFile = new File(output);
File dirFile = new File(output+"/1");
dirFile.mkdirs(); |
Write_Output |
externaltool |
|
Beanshell |
beanshell |
|
Write_Output_2 |
externaltool |
|
Beanshell_2 |
beanshell |
|
Read_Text_File_2 |
localworker |
ScriptBufferedReader getReader (String fileUrl, String encoding) throws IOException {
InputStreamReader reader;
try {
if (encoding == null) {
reader = new FileReader(fileUrl);
} else {
reader = new InputStreamReader(new FileInputStream(fileUrl),encoding);
}
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
if (encoding == null) {
reader = new InputStreamReader (url.openStream());
} else {
reader = new InputStreamReader (url.openStream(), encoding);
}
}
return new BufferedReader(reader);
}
StringBuffer sb = new StringBuffer(4000);
if (encoding == void) {
encoding = null;
}
BufferedReader in = getReader(fileurl, encoding);
String str;
String lineEnding = System.getProperty("line.separator");
while ((str = in.readLine()) != null) {
sb.append(str);
sb.append(lineEnding);
}
in.close();
filecontents = sb.toString();
|
Input_file_to_file_list_2 |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = "\n";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
if (!result[i].startsWith("#")) {
split.add(result[i]);
}
}
}
|
Beanshells (12)
Name |
Description |
Inputs |
Outputs |
Beanshell |
|
passThru
wait
|
passed
|
Beanshell_2 |
|
passThru
wait
|
passed
|
and_2 |
|
inputvaerdier
|
and
|
ExtractFromFFprobe |
|
ffprobe_output
|
duration
hz
channels
bitsPerSample
bitrate
|
ExtractFromFFprobe_2 |
|
ffprobe_output
|
duration
hz
channels
bitsPerSample
bitrate
|
compareBitsPerSample |
|
first
second
|
equals
|
compareHz |
|
first
second
|
equals
|
compareDuration |
|
first
second
maxDiff
|
similar
firstLong
secondLong
|
compareChannels |
|
first
second
|
equals
|
and |
|
inputvaerdier
|
and
|
BeanshellIfElse |
|
nodelist
|
trueOut
falseOut
|
BeanshellCopy |
|
run
filename
|
fileout
|
Outputs (1)
Name |
Description |
Validate_Compare_Compare_Success |
|
Datalinks (21)
Source |
Sink |
Beanshell_2:passed |
Validate_Compare_Compare:output_files |
Input_file_to_file_list_2:split |
Validate_Compare_Compare:migratedwav_inputfile |
Input_file_to_file_list:split |
Validate_Compare_Compare:comparetowav_inputfile |
regex_value:value |
Input_file_to_file_list:regex |
Read_Text_File:filecontents |
Input_file_to_file_list:string |
comparetowav_list |
Read_Text_File:fileurl |
encoding_value:value |
Read_Text_File:encoding |
output_files |
outputToLogs:outputdir |
output_files |
Write_Output:outputdir |
Validate_Compare_Compare:Success |
Write_Output:success |
Input_file_to_file_list_2:split |
Write_Output:wav |
Write_Output:STDOUT |
Beanshell:wait |
Validate_Compare_Compare:Success |
Beanshell:passThru |
output_files |
Write_Output_2:outputdir |
Write_Output_2:STDOUT |
Beanshell_2:wait |
outputToLogs:output |
Beanshell_2:passThru |
migratedwav_list |
Read_Text_File_2:fileurl |
encoding_value:value |
Read_Text_File_2:encoding |
Read_Text_File_2:filecontents |
Input_file_to_file_list_2:string |
regex_value:value |
Input_file_to_file_list_2:regex |
Beanshell:passed |
Validate_Compare_Compare_Success |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
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