Search in sources :

Example 1 with QuerySpec

use of com.odysseusinc.arachne.storage.model.QuerySpec in project ArachneCentralAPI by OHDSI.

the class BaseSubmissionServiceImpl method getResultFiles.

@Override
public List<ArachneFileMeta> getResultFiles(IUser user, Long submissionId, ResultFileSearch resultFileSearch) throws PermissionDeniedException {
    Submission submission = submissionRepository.findById(submissionId, EntityUtils.fromAttributePaths("dataSource", "dataSource.dataNode"));
    checkSubmissionPermission(user, submission);
    String resultFilesPath = contentStorageHelper.getResultFilesDir(submission, resultFileSearch.getPath());
    QuerySpec querySpec = new QuerySpec();
    querySpec.setName(resultFileSearch.getRealName());
    querySpec.setPath(resultFilesPath);
    return contentStorageService.searchFiles(querySpec);
}
Also used : Submission(com.odysseusinc.arachne.portal.model.Submission) QuerySpec(com.odysseusinc.arachne.storage.model.QuerySpec)

Example 2 with QuerySpec

use of com.odysseusinc.arachne.storage.model.QuerySpec in project ArachneCentralAPI by OHDSI.

the class SubmissionHelper method searchFiles.

private List<ArachneFileMeta> searchFiles(Submission submission, String fileNameLike) {
    QuerySpec querySpec = new QuerySpec();
    querySpec.setPath(contentStorageHelper.getResultFilesDir(submission));
    querySpec.setName(fileNameLike);
    querySpec.setNameLike(true);
    querySpec.setSearchSubfolders(true);
    return contentStorageService.searchFiles(querySpec);
}
Also used : QuerySpec(com.odysseusinc.arachne.storage.model.QuerySpec)

Aggregations

QuerySpec (com.odysseusinc.arachne.storage.model.QuerySpec)2 Submission (com.odysseusinc.arachne.portal.model.Submission)1