protected function assertFilenameValid($filename)
    {
        $result = new ValidationResult();
        $this->validate($result, $filename);
        if (!$result->isValid()) {
            throw new ValidationException($result);
        }
    }