[Nodal-cvs] nodal/j-src/storage/memory memContent.java,1.32,1.33
Status: Pre-Alpha
Brought to you by:
leei
From: Lee I. <le...@us...> - 2004-11-15 18:51:12
|
Update of /cvsroot/nodal/nodal/j-src/storage/memory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30232/storage/memory Modified Files: memContent.java Log Message: Update a global backlink index whenever a Node.property assignment is changed. Index: memContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memContent.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** memContent.java 14 May 2004 17:31:28 -0000 1.32 --- memContent.java 15 Nov 2004 18:51:03 -0000 1.33 *************** *** 32,35 **** --- 32,37 ---- import org.nodal.util.Name; import org.nodal.util.PropertyConstraintFailure; + + import storage.framework.EdgeIndex; import storage.framework.RepoServices; *************** *** 45,48 **** --- 47,52 ---- protected final CacheMap nodeContents; protected final Set allContents; + // NEXT Should this be Repo-based? + private static final EdgeIndex globalIndex = EdgeIndex.create (); protected memContent() { *************** *** 332,336 **** protected Node assignNode(NodeContent.Editor c, Object property, Node node) { node = seatNode(c, node); ! // NEXT Update indices to reflect new c.property = node relation. return node; } --- 336,340 ---- protected Node assignNode(NodeContent.Editor c, Object property, Node node) { node = seatNode(c, node); ! globalIndex.add (c.content(), property, node.bareNode()); return node; } |