Changeset 319 for branches/new-datamodel
- Timestamp:
- 10/02/10 09:20:25 (15 years ago)
- Location:
- branches/new-datamodel/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/new-datamodel/src/model/changes.lisp ¶
r318 r319 152 152 'Changed' can mean: 153 153 * newly created 154 * deletion of an element 154 155 * modified through the addition or removal of identifiers 155 156 * (for associations) modified through the addition or removal of … … 211 212 212 213 214 (defgeneric end-revision-p (construct revision) 215 (:documentation "A helper function for changed-p. It returns the latest 216 version-info if the passed versioned-construct was 217 marked-as-deleted in the version that is given.") 218 (:method ((construct VersionedConstructC) (revision integer)) 219 (let ((version-info (find revision (versions construct) 220 :key #'end-revision :test #'=))) 221 (when (and version-info 222 (not 223 (find-if 224 #'(lambda(vi) 225 (or (> (end-revision vi) (end-revision version-info)) 226 (= (end-revision vi) 0))) 227 (versions construct)))) 228 version-info)))) 229 230 213 231 (defmethod changed-p ((construct ReifiableConstructC) (revision integer)) 214 232 "Returns t if a ReifiableConstructC changed in the given version, i.e. 215 233 an item-identifier or reifier was added to the construct itself." 216 (some #'(lambda(vc) 217 (changed-p vc revision)) 218 (union (item-identifiers construct :revision revision) 219 (let ((reifier-top (reifier construct :revision revision))) 220 (when reifier-top 221 (list reifier-top)))))) 234 (or (some #'(lambda(vc) 235 (changed-p vc revision)) 236 (union (item-identifiers construct :revision revision) 237 (let ((reifier-top (reifier construct :revision revision))) 238 (when reifier-top 239 (list reifier-top))))) 240 (some #'(lambda(vc) 241 (end-revision-p vc revision)) 242 (union (slot-p construct 'item-identifiers) 243 (slot-p construct 'reifier))))) 222 244 223 245 … … 228 250 (some #'(lambda(var) 229 251 (changed-p var revision)) 230 (variants construct :revision revision)))) 252 (variants construct :revision revision)) 253 (some #'(lambda(vc) 254 (end-revision-p vc revision)) 255 (slot-p construct 'variants)))) 231 256 232 257 … … 255 280 (eql (reifiable-construct reifier-assoc) rc)) 256 281 (slot-p construct 'reified-construct)))) 257 (changed-p ra revision)))))) 282 (changed-p ra revision)))) 283 (some #'(lambda(vc) 284 (end-revision-p vc revision)) 285 (union (union (union (slot-p construct 'psis) 286 (slot-p construct 'locators)) 287 (union (slot-p construct 'names) 288 (slot-p construct 'occurrences))) 289 (slot-p construct 'reified-construct))))) 290 258 291 259 292 … … 264 297 (some #'(lambda(role) 265 298 (changed-p role revision)) 266 (roles construct :revision revision)))) 299 (roles construct :revision revision)) 300 (some #'(lambda(vc) 301 (end-revision-p vc revision)) 302 (slot-p construct 'roles)))) 267 303 268 304 -
TabularUnified branches/new-datamodel/src/unit_tests/versions_test.lisp ¶
r318 r319 332 332 (is-true (changed-p norwegian-curriculum-assoc fixtures::revision1)) 333 333 (is-true (changed-p norwegian-curriculum-assoc fixtures::revision2)) 334 ))) 335 ;(is-true (changed-p norwegian-curriculum-assoc fixtures::revision3))))) 334 (is-true (changed-p norwegian-curriculum-assoc fixtures::revision3)) 335 (delete-name service-topic service-name :revision fixtures::revision3) 336 (is-true (changed-p service-topic fixtures::revision3))))) 336 337 337 338 -
TabularUnified branches/new-datamodel/src/xml/rdf/exporter.lisp ¶
r240 r319 61 61 62 62 (defun init-*ns-map* () 63 "Initializes the variable *ns-map* w oith some prefixes and corresponding63 "Initializes the variable *ns-map* with some prefixes and corresponding 64 64 namepsaces. So the predifend namespaces are not contain ed twice." 65 65 (setf *ns-map* (list
Note: See TracChangeset
for help on using the changeset viewer.