-- -- --- Maintain your head and share it --- -- - http://blog.deepamehta.de - skype: einseinsnull - jabber: mre at newthinking.de - mail: mre at deepamehta.de - fax: 01803-663388-72229 - tel: 030-42800182 |
Its a special feeling to see and use the familiar content of my personal DM database in a completely different 3rd party user interface.
Great work!
On Sep 8, 2010, at 1:04, Malte Reißig wrote:
> one last question direclty to jiri cause i wonder: can we re-use your new synchronizing feature possibly to recursively introduce (and synchronize with all new) files (and folders) below of a given path e.g. ~/Music ? with being able to do so the personal music library of a user could be introduced to deepamehta with a fingersnip, aight ?
Good idea! We should do this.
However, the existing synchronization feature doesn't fit completely and could not be used directly.
(a) The sync feature is part of the deepamehta3-foldercanvas plugin and is bound to a special kind of topicmap, a "Folder Canvas".
(b) There is no recursive directory scanning and there is no file hierarchy represented.
Anyway, with some extra work we can realize your idea, and we could it make even more generic (not limited to music files).
Possible conception:
- Model: a file hierarchy (from the file system) is represented as File and Folder topics with directed relationships.
- Usage (1): dropping a folder on the DM canvas creates this topic hiearchy in the DB. The canvas would show just the dropped folder (and because it is related to the contained files and folders these would be displayed in the detail panel as usual, ready for navigation).
- Usage (2): each Folder topic could provide a "Synchronize with file system" command that recursively re-scans the underlying folder and updates the DB accordingly.
This conception could be realized in a separate plugin "deepamehta3-filesystemsync". This would use the services of the existing deepamehta3-files plugin, in particular (see FilesPlugin.java):
Topic createFileTopic(String path)
Topic createFolderTopic(String path)
(these calls are available via server-side Java-call and via REST API)
The actual synchronization behavoir could be adapted from the deepamehta3-foldercanvas plugin (see model class FolderCanvas.java):
SyncStats synchronize()
The "Synchronize with file system" user command could be attached to the Folder topic type (as defined by the deepamehta3-files plugin) by means of the new client-side command system. The actual synchronization would perform at server-side and could also be invoked via REST API.
The overall result would be a bridge between the file system and DM. While accessing your existing file hierarchies you would benefit from DM's working contexts and stable display. You could assemble files in working contexts and view files without obscuring the working context. Context on the left-side, detail (text, images, audio, video, PDF) on the right.
This is just the first sketch. Lets discuss it further.
Cheers,
Jörg