use of org.knime.core.data.filestore.internal.FileStoreProxy in project knime-core by knime.
the class FileStorePortObject method retrieveFileStoreHandlerFrom.
/**
* @noreference This method is not intended to be referenced by clients.
*/
final void retrieveFileStoreHandlerFrom(final List<FileStoreKey> keys, final FileStoreHandlerRepository fileStoreHandlerRepository) throws IOException {
assert m_fileStoreProxies.isEmpty() : "FileStore list expected to be empty after construction: " + ConvenienceMethods.getShortStringFrom(m_fileStoreProxies, 3);
for (FileStoreKey key : keys) {
FileStoreProxy proxy = new FileStoreProxy();
proxy.retrieveFileStoreHandlerFrom(key, fileStoreHandlerRepository);
m_fileStoreProxies.add(proxy);
}
m_fileStoreProxies.trimToSize();
postConstruct();
}
use of org.knime.core.data.filestore.internal.FileStoreProxy in project knime-core by knime.
the class FileStoreUtil method retrieveFileStoreHandlers.
/**
* @noreference This method is not intended to be referenced by clients.
*/
public static void retrieveFileStoreHandlers(final FileStorePortObject sourceFSObj, final FileStorePortObject resultFSObj, final IWriteFileStoreHandler newHandler) throws IOException {
List<FileStoreProxy> sourceFSProxies = sourceFSObj.getFileStoreProxies();
List<FileStoreKey> sourceFSKeys = new ArrayList<FileStoreKey>(sourceFSProxies.size());
FileStoreHandlerRepository commonFSHandlerRepo = null;
for (FileStoreProxy proxy : sourceFSProxies) {
FileStoreKey newKey;
if (newHandler != null) {
newKey = newHandler.translateToLocal(proxy.getFileStore(), resultFSObj);
} else {
newKey = proxy.getFileStoreKey();
}
sourceFSKeys.add(newKey);
FileStoreHandlerRepository fsHandlerRepo = proxy.getFileStoreHandler().getFileStoreHandlerRepository();
if (commonFSHandlerRepo == null) {
commonFSHandlerRepo = fsHandlerRepo;
} else {
assert commonFSHandlerRepo == fsHandlerRepo : "File Stores in port object have different file " + "store handler repositories: " + commonFSHandlerRepo + " vs. " + fsHandlerRepo;
}
}
FileStoreHandlerRepository resultRepos = newHandler != null ? newHandler.getFileStoreHandlerRepository() : commonFSHandlerRepo;
resultFSObj.retrieveFileStoreHandlerFrom(sourceFSKeys, resultRepos);
}
Aggregations