-
1. Adding a mixin property to a node using sequencing
rhauch Jan 17, 2011 11:05 AM (in response to souvikonline)That's a really good use case, but unfortunately at this time sequencers can't add values to existing properties. Could you log a feature request in JIRA?
-
2. Adding a mixin property to a node using sequencing
souvikonline Jan 17, 2011 9:32 PM (in response to rhauch)Randall, thanks for your reply. I have logged a feature request (MODE-1075) as suggested.
I am building a workflow for publishing photos where the editors would tag the content and would upload it using the WebDAV interface. Assuming my sequencer takes it's input from content:photos:/files/A/B/photo.jpg and outputs the result to content:photos:/meta/A/B/photo.jpg/tfmi:taggable, I noticed that if I move the file to a location /files/A/C/photo.jpg the sequencer is triggered and it regenerates the metadata nodes at /meta/A/C/photo.jpg/tfmi:taggable. However, the stale output at /meta/A/B/photo.jpg/tfmi:taggable still remains in the repository and now correspond to ghost nodes. I fear, my queries based on tfmi:taggable will return results corresponding to these ghost nodes also.
If I could add the sequencing output as mixins to the source node, I would not need to worry since my metadata would move with the node and will always be bound to the source.
As an alternative approach, I think I will give the custom sequencer a skip and use listeners to extract the metadata and add it as mixins to the file node on the ADD_NODE event. However, I will have to keep a house-keeping thread running with a long lived JCR session for this.
Any reflections on this approach is highly appreciated.
-
3. Adding a mixin property to a node using sequencing
rhauch Jan 18, 2011 10:16 AM (in response to souvikonline)Thanks for logging that feature request. I'll target it to our next release (2.5).
You might want to try the latest release (2.4.0.Final, just released this past Friday). When you move a file that was sequenced, it should re-sequence the file at the new location and remove the previous (stale) output derived from the file at the old location.
However, I understand how having the metadata on the original file nodes would be much easier and better. So as much as I hate to say it, maybe using your own mechanism would be the easiest short-term solution. Our image sequencer is pretty simple, and you might be able to reuse the sequencer module by directly calling it, or copying what it's doing and customizing it for what you need.
Sorry I don't have a better solution.
-
4. Re: Adding a mixin property to a node using sequencing
souvikonline Jan 18, 2011 1:41 PM (in response to rhauch)Nice! The sequencing engine indeed moves the metadata to correspond to the moved file node. I guess I had missed this earlier.
I had been browsing the repository using the WebDAV interface in Nautilus which showed that the parent nodes for the stale metadata was not being deleted on move. Since Nautilus does not show the properties of the parent node, I had wrongly assumed that the stale sequenced output was left behind.
I have already upgraded to 2.4. I did actually customize the bundled image sequencer for my solution. Appreciate all the help Randall.