Created
December 3, 2009 16:25
-
-
Save ayal/248298 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn-log match-rep-loc | |
"in this context rep-op is the incoming rep-op, rep-loc is what is for comparison from the rep-class from rep-rules" | |
[rep-op rep-class] | |
(for [rep-loc rep-class | |
:when | |
(cond | |
(and (:blip-id rep-loc) | |
(= (:rep-loc rep-op) rep-loc)) | |
false | |
(and (:subcontent rep-loc) ; replication is by subcontent | |
(and | |
(= (dissoc (:rep-loc rep-op) :blip-id) (dissoc rep-loc :blip-id :subcontent)) | |
(.contains (:content rep-op) (:subcontent rep-loc)))) | |
false | |
(and (:annotation-name rep-loc) ; replication is by annotation | |
(has-annotation rep-op (:annotation-name rep-loc) (:annotation-value rep-loc))) | |
false | |
:else | |
true | |
)] | |
rep-loc)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment