You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(iterator-seq coll) does a good job of bridging RangeIterators with Clojure seqs, but going the other direction to persist a sequence in the repository will be tricky. The naive approach is to walk the subtree(s) represented by a seq, comparing and/or setting properties, removing nodes, etc. What we'd like instead is a way to selectively persist changes only.
The VersionManager merge methods might be worth checking out, but it looks like they'd reduce generality by requiring nt:versionable. Is there a preferred approach to these sorts of operations in the Jackrabbit world?
The text was updated successfully, but these errors were encountered:
I think the JCR concepts that come closes to this idea are the XML import operations.
Perhaps it would be useful to define a mapping between JCR nodes and properties to Clojure maps. This might give us a chance to use higher-level operations like map to define content transformations. Though I'm not sure if you're looking for something like this in here.
Right; I'm not sure there really is a direct equivalent. I've just been trying to think of how to apply the persistent data structure model to JCR Items, which is what's really required for map, filter, and such to be useful for transformations that go back into the repository.
With a Clojure data structure to represent subgraphs as you suggest, the operation might consist of removing the original root, then recursively adding the new graph in its place. This seems like serious overkill, though.
I am certainly interested in the types of content transformations this level of integration would allow, but I'm beginning to think it might be worthwhile to rely for now on the side-effect + transactional model that the JCR API provides already.
(iterator-seq coll)
does a good job of bridgingRangeIterator
s with Clojure seqs, but going the other direction to persist a sequence in the repository will be tricky. The naive approach is to walk the subtree(s) represented by a seq, comparing and/or setting properties, removing nodes, etc. What we'd like instead is a way to selectively persist changes only.The
VersionManager
merge methods might be worth checking out, but it looks like they'd reduce generality by requiringnt:versionable
. Is there a preferred approach to these sorts of operations in the Jackrabbit world?The text was updated successfully, but these errors were encountered: