Defer validation of tensor URI for a little while.
@@ -63,15 +63,19 @@ public class RankingConstantsValidator extends Validator {
}
private void validateRankingConstant(RankingConstant rankingConstant, ApplicationPackage application) throws FileNotFoundException {
+ // TODO: Handle validation of URI soon too.
+ if (rankingConstant.getPathType() == RankingConstant.PathType.FILE) {
String constantFile = rankingConstant.getFileName();
if (application.getFileReference(Path.fromString("")).getAbsolutePath().endsWith(FilesApplicationPackage.preprocessed) &&
- constantFile.startsWith(FilesApplicationPackage.preprocessed))
+ constantFile.startsWith(FilesApplicationPackage.preprocessed)) {
constantFile = constantFile.substring(FilesApplicationPackage.preprocessed.length());
+ }
ApplicationFile tensorApplicationFile = application.getFile(Path.fromString(constantFile));
new ConstantTensorJsonValidator().validate(constantFile,
rankingConstant.getTensorType(),
tensorApplicationFile.createReader());
}
+ }
}
