Using ODS-Briefcase to mediate access to data stored in Dropbox
Dropbox is a free service that lets you bring all your photos, docs, and videos anywhere.
Any file you save to your Dropbox will automatically be copied to all your computers, phones, and even the Dropbox website.
ODS Briefcase offers a new "Dropbox" folder type which provides several additional features, once the ODS system is configured with a registered Dropbox API key and secret pair:
- Specify credentials for authentication against Dropbox, enabling retrieval of any or all of your folders and files, including any associated metadata
- Specify which Sponger Extractor Cartridges and Sponger Meta Cartridges should be run against your Dropbox data
- Save fetched data, metadata, and Sponger output, into a newly created Dropbox-specific RDF Graph in the Virtuoso RDF Quad Store
- Specify other ODS Users or WebID-based ACLs which should be granted access to your Dropbox data through ODS Briefcase
Here is a sample scenario showing the whole process, from setting the Dropbox API key and secret pair in ODS, to retrieving all Dropbox content to ODS Briefcase.
1 - Get a Dropbox API key and secret pair for use with ODS-Briefcase
Note that at present, each Virtuoso + ODS instance can only be configured with a single Dropbox API key, which will then be used by all ODS-Briefcase users when targeting Dropbox from that instance.
By default, Dropbox limits each application to 5 users (Dropbox accounts).
This means that 5 different Dropbox account holders can create Dropbox type folders at your Virtuoso ODS instance.
This limitation is outside the scope of OpenLink or Virtuoso control.
If you'll have more than 5 Dropbox users working through your ODS instance, you will need to apply to Dropbox for production status.
- Browse to <https://www.dropbox.com/developers/apps>, and log in with your existing Dropbox user credentials:
- Agree to the Dropbox Developer Terms and Conditions:
- Click Create an App:
- Enter a name for your Dropbox client application (i.e., your ODS-Briefcase instance) to be known by, e.g., "MyODSDropbox".
A description is also required; put as much or as little as you like.
Tick the Full Dropbox check-box, and click Create:
- You will be shown the "Options" page for your new application, including the App key and App secret pair.
(You can copy these now, or come back for them later.
Do be aware that you will need these strings for the steps that follow.) Optionally, add the URI of your ODS host Virtuoso instance as the Website.
If you make any changes on this form, click Update; otherwise, click Cancel to end the application creation process.
- Your new application will show up in the "My apps" list.
2 - Configure ODS to use your Dropbox API key and secret
- Browse to your Virtuoso + ODS instance,
http://<cname>[:<port>]/ods, e.g., <http://example.com/ods/>, and click Sign In.
- Log in as a Virtuoso+ODS user with Administrator privileges, e.g.,
- Click on Site Settings:
- Click on Login Authentication Keys:
- Select Dropbox API in the API Name menu, provide the App key and App secret you got when you registered the application with Dropbox, and click Add.
- ODS-Briefcase is now configured to use the Dropbox API.
3 - Access files stored on Dropbox through ODS-Briefcase
- Browse to your Virtuoso + ODS instance,
http://<cname>[:<port>]/ods, e.g., <http://example.com/ods/>.
- Log in as a Virtuoso+ODS user with normal privileges, e.g.,
- Click to the ODS-Briefcase application:
- Click New Folder from the main Briefcase control strip:
- In the New Folder form, specify a Folder Name, e.g., MyDropboxFolder, and set the Folder type to Dropbox:
- Click to the newly visible Dropbox tab:
- All RDF data extracted from and otherwise collected about your Dropbox files will be saved to a named graph, where the default name is constructed from the host ODS instance, the ODS username, and the Briefcase folder name --
http://<host>[:<port>]/DAV/home/<user-name>/<folder-name>#this -- so, in this example, the default graph would be named <http://example.com/ods/demo/MyDropboxFolder#this>.
Expert users may wish to change this graph name, but the default is suitable for most users.
- You can also turn on the Virtuoso Sponger, to process your Dropbox files more comprehensively.
When the Sponger is enabled for your folder, you can specify which "Sponger Extractor Cartridges" and "Sponger Meta Cartridges" will be run over the files in your Dropbox.
You can enable all cartridges, but this will introduce some processing overhead.
It's generally best to enable only those cartridges which will be applicable to your files and their content.
For instance, you may know that you'll only be storing Microsoft and Open Office documents here.
Then, click "Authenticate", to connect your new folder to your Dropbox:
- You'll be prompted to enter your Dropbox user's credentials.
Note that this Dropbox user need not be the application owner/"developer" who got the API key earlier.
- Dropbox will prompt for confirmation that you intend to let your application ("MyODSDropbox?") have access to your Dropbox content.
- Your Dropbox user name and associated email address will now be displayed.
Click Create to finish the folder creation process.
- Your new Dropbox-linked folder should now be displayed in your Briefcase resources list:
- Click the folder name to see the resources ODS-Briefcase has found in your Dropbox Dataspace: