in taverna-robundle/src/main/java/org/apache/taverna/robundle/validator/RoValidator.java [108:157]
public ValidationReport check(){
ValidationReport report = new ValidationReport();
for(PathMetadata pm : this.aggr){
// System.out.println("Path metedata " + pm);
//If aggregates listed in manifest are not found in bundle...
if(!this.items.contains(pm.toString())){
/*
* Here it can be a external url or the file is missing
* */
//If the aggregate is a external URL...
if(pm.toString().contains("http://") || pm.toString().contains(".com")){
this.warning.add(pm.toString());
}else{
this.errorList.add(pm.toString());
}
}
}
/*
* There could be files in the bundle, which are not included as aggregates.
* There are default files: mimetype and LICENSE
* */
//FIX ME : performance ???
Set<String> set = new HashSet<>();
for(PathMetadata p : this.aggr){
set.add(p.toString());
}
for(String s : this.items){
if(s.contains("mimetype")||s.toLowerCase().contains("license")||s.contains(".ro")){
//This is ok and skip
}else{
if(!set.contains(s)){
this.infoWarningList.add(path.toString());
}
}
}
report.setErrorList(this.errorList);
report.setInfoWarnings(this.infoWarningList);
report.setWarnings(this.warning);
return report;
}