use of com.b2international.snowowl.core.uri.ResourceURIPathResolver.PathWithVersion in project snow-owl by b2ihealthcare.
the class TerminologyResourceContentRequest method execute.
@Override
public R execute(TerminologyResourceContext context) {
final ResourceURI resourceURI = context.resourceURI();
final TerminologyResource resource = context.resource();
final PathWithVersion branchPathWithVersion = context.service(ResourceURIPathResolver.class).resolveWithVersion(context, resourceURI, resource);
final String path = branchPathWithVersion.getPath();
final ResourceURI versionResourceURI = branchPathWithVersion.getVersionResourceURI();
if (versionResourceURI != null) {
context = context.inject().bind(ResourceURI.class, versionResourceURI).bind(PathWithVersion.class, branchPathWithVersion).build();
}
return new RepositoryRequest<R>(resource.getToolingId(), new BranchRequest<R>(path, next())).execute(context);
}
Aggregations