Difference between revisions of "RemoteDataPlugin"

From user's Wiki!
Jump to: navigation, search
Line 44: Line 44:
* Local file is transferred to remote computer
* Local file is transferred to remote computer
* Temporal folder is removed
* Temporal folder is removed
<div style="font-size:100%">
[[Users#Plugins | '''Back to plugins page''']]

Revision as of 02:28, 25 May 2012

For Users

This plugin allows to retrieve and send data to a remote computer. Two new entries will be added to the File menu: Open Remote Data and Save Remote Data.

The supported protocols are:


Allow reading/writing data using SFTP protocol

cURL library is being used for transferring data using several protocols. cURL supports DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. Curl library has been integrated in GIMIAS and allows reading/writing remote data files. The introduced URL will be passed directly to Curl library.

Examples of URLs are:

For protocols that require authentication:

  • FTP with relative path: ftp://<user>:<password>@
  • FTP with absolute path: ftp://<user>:<password>@
  • SFTP with relative path: sftp://<user>:<password>@frs.sourceforge.net:22/~/SampleData/volumeCropped.vtk
  • SFTP with absolute path: sftp://<user>:<password>@frs.sourceforge.net:22/home/pfs/project/g/gi/gimias/SampleData/volumeCropped.vtk

For Developers

As an example, you can take a look at SendSpaceReader and SendSpaceWriter.

For each protocol, there is a DataEntity reader and a writer. Both should be configured to read/write any kind of data:

m_ValidExtensionsList.push_back( ".*" );
m_ValidTypesList.push_back( Core::DataEntityType( 0xFFFFFFFF ) );

When reading, there are three steps:

  • Remote file is transferred to local computer using a specific temporal local folder with a unique ID
  • Local file is loaded into memory
  • The output DataEntity is published
  • Temporal folder is removed

When writing a file, these are the steps:

  • DataEntity is saved in a temporal folder
  • Local file is transferred to remote computer
  • Temporal folder is removed

Back to plugins page