[Nodal-cvs] nodal/j-src/storage/memory AbstractNodeContent.java,NONE,1.1 AbstractContent.java,NONE,1
Status: Pre-Alpha
Brought to you by:
leei
Update of /cvsroot/nodal/nodal/j-src/storage/memory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv969/storage/memory Modified Files: OpReplaceRange.java OpInsertAfter.java BareSet.java OpAnchor.java memNodeMapContent.java memLiteralSetContent.java OpRemoveRange.java memLiteralMapContent.java OpAdd.java memNodeSetContent.java memByteSequenceContent.java memSetContent.java memIntSequenceContent.java OpInsertBefore.java memDoubleSequenceContent.java OpCreate.java OpRemove.java OpSetField.java memShortSequenceContent.java BareSequence.java memGenericSequenceContent.java memBoolSequenceContent.java memRecordContent.java MemContentI.java memMapContent.java memStringContent.java AbstractOperator.java OpClone.java BareMap.java memFloatSequenceContent.java memSequenceContent.java memLongSequenceContent.java OpSetValue.java BareRecord.java Added Files: AbstractNodeContent.java AbstractContent.java Removed Files: memContent.java BareContent.java Log Message: Major refactoring around AbstractNode.Backend interface. Index: memLiteralMapContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memLiteralMapContent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** memLiteralMapContent.java 16 Nov 2004 20:46:18 -0000 1.2 --- memLiteralMapContent.java 8 Jan 2005 00:51:07 -0000 1.3 *************** *** 69,73 **** } ! void opSetValue(Object key, Object val, BareContent.Editor c) throws ConstraintFailure { // Check types and convert if necessary --- 69,73 ---- } ! void opSetValue(Object key, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { // Check types and convert if necessary Index: BareMap.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/BareMap.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** BareMap.java 16 Nov 2004 19:25:35 -0000 1.16 --- BareMap.java 8 Jan 2005 00:51:08 -0000 1.17 *************** *** 13,28 **** import org.nodal.model.MapNode; - import org.nodal.model.Node; import org.nodal.model.NodeContent; import org.nodal.security.Capability; import storage.framework.AbstractRepository; ! public abstract class BareMap extends BareContent implements MapNode { protected memMapContent map; protected MapNode.Editor editMap; ! BareMap(Node n, memMapContent m, Capability cap, AbstractRepository.Backend f) { ! super(n, m, cap, f); map = m; editMap = null; --- 13,28 ---- import org.nodal.model.MapNode; import org.nodal.model.NodeContent; import org.nodal.security.Capability; + import storage.framework.AbstractNode; import storage.framework.AbstractRepository; ! public abstract class BareMap extends AbstractNodeContent implements MapNode { protected memMapContent map; protected MapNode.Editor editMap; ! BareMap(AbstractNode.Backend backend, memMapContent m, Capability cap, AbstractRepository.Backend f) { ! super(backend, m, cap, f); map = m; editMap = null; Index: memDoubleSequenceContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memDoubleSequenceContent.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** memDoubleSequenceContent.java 16 Nov 2004 20:46:19 -0000 1.20 --- memDoubleSequenceContent.java 8 Jan 2005 00:51:08 -0000 1.21 *************** *** 146,150 **** // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, BareContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new DoubleSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); --- 146,150 ---- // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new DoubleSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); *************** *** 153,160 **** private class IndexSetter implements DoubleSetterUtil.DoubleSetter { private int idx; ! private BareContent.Editor content; private NodeManager mgr; ! IndexSetter(int i, BareContent.Editor c, NodeManager mgr) { idx = i; this.content = c; --- 153,160 ---- private class IndexSetter implements DoubleSetterUtil.DoubleSetter { private int idx; ! private AbstractNodeContent.Editor content; private NodeManager mgr; ! IndexSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) { idx = i; this.content = c; *************** *** 186,190 **** * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, BareContent.Editor c) throws ConstraintFailure { // Convert to something close to Double --- 186,190 ---- * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, AbstractNodeContent.Editor c) throws ConstraintFailure { // Convert to something close to Double *************** *** 200,204 **** * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, double v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); --- 200,204 ---- * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, double v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); *************** *** 214,218 **** * must have already been done. */ ! private synchronized void opSetItemUnchecked(int i, double v, BareContent.Editor c) throws ConstraintFailure { if (i < 0) { --- 214,218 ---- * must have already been done. */ ! private synchronized void opSetItemUnchecked(int i, double v, AbstractNodeContent.Editor c) throws ConstraintFailure { if (i < 0) { *************** *** 224,228 **** synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! BareContent.Editor c) throws ConstraintFailure { DoubleSeq seq = (val == null ? null : DoubleSeqUtil.create(val)); if (seq != null) { --- 224,228 ---- synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! AbstractNodeContent.Editor c) throws ConstraintFailure { DoubleSeq seq = (val == null ? null : DoubleSeqUtil.create(val)); if (seq != null) { *************** *** 256,260 **** } ! synchronized void opInsertBefore(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 256,260 ---- } ! synchronized void opInsertBefore(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { *************** *** 266,270 **** } ! synchronized void opInsertAfter(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 266,270 ---- } ! synchronized void opInsertAfter(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { Index: memSetContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memSetContent.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** memSetContent.java 16 Nov 2004 20:46:18 -0000 1.8 --- memSetContent.java 8 Jan 2005 00:51:08 -0000 1.9 *************** *** 13,17 **** import org.nodal.model.Getter; - import org.nodal.model.Node; import org.nodal.model.NodeContent; import org.nodal.model.SetContent; --- 13,16 ---- *************** *** 34,37 **** --- 33,38 ---- import org.nodal.util.SetterUtil; import org.nodal.util.TypeConstraintFailure; + + import storage.framework.AbstractNode; import storage.framework.AbstractRepository; *************** *** 39,45 **** * The canonical implementation of a SetContent object in memory. This * implementation also contains subclasses for implementing Set and SetEditor ! * given a Node that is using this class as its memContent. */ ! public abstract class memSetContent extends memContent { protected final SetType setType; protected final CacheMap getters; --- 40,46 ---- * The canonical implementation of a SetContent object in memory. This * implementation also contains subclasses for implementing Set and SetEditor ! * given a Node that is using this class as its AbstractContent. */ ! public abstract class memSetContent extends AbstractContent { protected final SetType setType; protected final CacheMap getters; *************** *** 70,74 **** private SetNode.Editor editor; ! MyNodeContent(Node n, Capability cap, AbstractRepository.Backend f) { super(n, memSetContent.this, cap, f); editor = null; --- 71,75 ---- private SetNode.Editor editor; ! MyNodeContent(AbstractNode.Backend n, Capability cap, AbstractRepository.Backend f) { super(n, memSetContent.this, cap, f); editor = null; *************** *** 77,81 **** public SetNode.Editor editSet() { if (editor == null && cap.allowEdit()) { ! editor = new MyNodeEditor(this, backend); } return editor; --- 78,82 ---- public SetNode.Editor editSet() { if (editor == null && cap.allowEdit()) { ! editor = new MyNodeEditor(this, repoBackend); } return editor; *************** *** 227,231 **** } ! private final class MyNodeEditor extends BareContent.Editor implements SetNode.Editor { --- 228,232 ---- } ! private final class MyNodeEditor extends AbstractNodeContent.Editor implements SetNode.Editor { *************** *** 317,321 **** } ! protected NodeContent createNodeContent(Node n, Capability cap, AbstractRepository.Backend s) { return new MyNodeContent(n, cap, s); } --- 318,322 ---- } ! protected NodeContent createNodeContent(AbstractNode.Backend n, Capability cap, AbstractRepository.Backend s) { return new MyNodeContent(n, cap, s); } *************** *** 324,331 **** public abstract Set asSet(); ! abstract boolean opAdd(Object v, BareContent.Editor c) throws ConstraintFailure; ! abstract boolean opRemove(Object k, BareContent.Editor c); ! final void opSetValue(Object key, Object val, BareContent.Editor c) throws ConstraintFailure { // Check types and convert if necessary key = checkItemType(key); --- 325,332 ---- public abstract Set asSet(); ! abstract boolean opAdd(Object v, AbstractNodeContent.Editor c) throws ConstraintFailure; ! abstract boolean opRemove(Object k, AbstractNodeContent.Editor c); ! final void opSetValue(Object key, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { // Check types and convert if necessary key = checkItemType(key); Index: BareSequence.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/BareSequence.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** BareSequence.java 16 Nov 2004 19:25:36 -0000 1.24 --- BareSequence.java 8 Jan 2005 00:51:08 -0000 1.25 *************** *** 10,14 **** import org.nodal.model.Getter; - import org.nodal.model.Node; import org.nodal.model.NodeContent; import org.nodal.model.Seq; --- 10,13 ---- *************** *** 17,28 **** import org.nodal.util.IndexBoundsException; import org.nodal.util.PropertyConstraintFailure; import storage.framework.AbstractRepository; //import java.util.Enumeration; ! public abstract class BareSequence extends BareContent implements SequenceNode { protected final MemSequenceContentI seq; ! BareSequence(Node n, memSequenceContent s, Capability cap, AbstractRepository.Backend f) { ! super(n, s, cap, f); seq = s; } --- 16,29 ---- import org.nodal.util.IndexBoundsException; import org.nodal.util.PropertyConstraintFailure; + + import storage.framework.AbstractNode; import storage.framework.AbstractRepository; //import java.util.Enumeration; ! public abstract class BareSequence extends AbstractNodeContent implements SequenceNode { protected final MemSequenceContentI seq; ! BareSequence(AbstractNode.Backend backend, memSequenceContent s, Capability cap, AbstractRepository.Backend f) { ! super(backend, s, cap, f); seq = s; } Index: MemContentI.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/MemContentI.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MemContentI.java 16 Nov 2004 20:46:18 -0000 1.4 --- MemContentI.java 8 Jan 2005 00:51:08 -0000 1.5 *************** *** 95,99 **** * applyTo method of the memOperator. */ ! void modify(AbstractOperator op, BareContent.Editor c) throws InvalidOperator, ConstraintFailure; } \ No newline at end of file --- 95,99 ---- * applyTo method of the memOperator. */ ! void modify(AbstractOperator op, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure; } \ No newline at end of file Index: memFloatSequenceContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memFloatSequenceContent.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** memFloatSequenceContent.java 16 Nov 2004 20:46:18 -0000 1.20 --- memFloatSequenceContent.java 8 Jan 2005 00:51:08 -0000 1.21 *************** *** 146,150 **** // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, BareContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new FloatSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); --- 146,150 ---- // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new FloatSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); *************** *** 153,160 **** private final class IndexSetter implements FloatSetterUtil.FloatSetter { private final int idx; ! private final BareContent.Editor content; private final NodeManager mgr; ! IndexSetter(int i, BareContent.Editor c, NodeManager mgr) { this.idx = i; this.content = c; --- 153,160 ---- private final class IndexSetter implements FloatSetterUtil.FloatSetter { private final int idx; ! private final AbstractNodeContent.Editor content; private final NodeManager mgr; ! IndexSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) { this.idx = i; this.content = c; *************** *** 186,190 **** * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, BareContent.Editor c) throws ConstraintFailure { // Convert to something close to Double --- 186,190 ---- * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, AbstractNodeContent.Editor c) throws ConstraintFailure { // Convert to something close to Double *************** *** 200,204 **** * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, float v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); --- 200,204 ---- * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, float v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); *************** *** 213,217 **** * must have already been done. */ ! private synchronized void opSetItemUnchecked(int i, float v, BareContent.Editor c) throws ConstraintFailure { if (i < 0) { --- 213,217 ---- * must have already been done. */ ! private synchronized void opSetItemUnchecked(int i, float v, AbstractNodeContent.Editor c) throws ConstraintFailure { if (i < 0) { *************** *** 223,227 **** synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! BareContent.Editor c) throws ConstraintFailure { FloatSeq seq = (val == null ? null : FloatSeqUtil.create(val)); if (seq != null) { --- 223,227 ---- synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! AbstractNodeContent.Editor c) throws ConstraintFailure { FloatSeq seq = (val == null ? null : FloatSeqUtil.create(val)); if (seq != null) { *************** *** 255,259 **** } ! synchronized void opInsertBefore(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 255,259 ---- } ! synchronized void opInsertBefore(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { *************** *** 265,269 **** } ! synchronized void opInsertAfter(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 265,269 ---- } ! synchronized void opInsertAfter(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { Index: OpAnchor.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpAnchor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpAnchor.java 16 Nov 2004 20:46:18 -0000 1.2 --- OpAnchor.java 8 Jan 2005 00:51:07 -0000 1.3 *************** *** 105,114 **** } ! void applyTo(memContent content, BareContent.Editor c) throws InvalidOperator, ConstraintFailure { throw new InvalidOperator("invalid OpAnchor on " + content); } ! AbstractOperator invertOn(memContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return this; --- 105,114 ---- } ! void applyTo(AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure { throw new InvalidOperator("invalid OpAnchor on " + content); } ! AbstractOperator invertOn(AbstractContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return this; Index: OpAdd.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpAdd.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpAdd.java 16 Nov 2004 20:46:18 -0000 1.2 --- OpAdd.java 8 Jan 2005 00:51:08 -0000 1.3 *************** *** 23,31 **** public Object value () { return val; } ! void applyTo (memContent content, BareContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opAdd (val, c); } ! AbstractOperator invertOn (memContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertAdd (val, c); --- 23,31 ---- public Object value () { return val; } ! void applyTo (AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opAdd (val, c); } ! AbstractOperator invertOn (AbstractContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertAdd (val, c); Index: OpSetField.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpSetField.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpSetField.java 16 Nov 2004 20:46:19 -0000 1.2 --- OpSetField.java 8 Jan 2005 00:51:08 -0000 1.3 *************** *** 40,48 **** } ! void applyTo(memContent content, BareContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opSetField(field, newValue, c); } ! AbstractOperator invertOn(memContent content, NodeContent node) throws InvalidOperator, PropertyConstraintFailure { return content.invertSetField(field, node); --- 40,48 ---- } ! void applyTo(AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opSetField(field, newValue, c); } ! AbstractOperator invertOn(AbstractContent content, NodeContent node) throws InvalidOperator, PropertyConstraintFailure { return content.invertSetField(field, node); Index: OpInsertAfter.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpInsertAfter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpInsertAfter.java 16 Nov 2004 20:46:18 -0000 1.2 --- OpInsertAfter.java 8 Jan 2005 00:51:07 -0000 1.3 *************** *** 26,34 **** public Object value () { return newValue; } ! void applyTo (memContent content, BareContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opInsertAfter (index, newValue, c); } ! AbstractOperator invertOn (memContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertInsertAfter (index, newValue, c); --- 26,34 ---- public Object value () { return newValue; } ! void applyTo (AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opInsertAfter (index, newValue, c); } ! AbstractOperator invertOn (AbstractContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertInsertAfter (index, newValue, c); Index: OpRemove.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpRemove.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OpRemove.java 16 Nov 2004 20:46:19 -0000 1.3 --- OpRemove.java 8 Jan 2005 00:51:08 -0000 1.4 *************** *** 24,32 **** public Object key () { return key; } ! void applyTo (memContent content, BareContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opRemove (key, c); } ! AbstractOperator invertOn (memContent content, NodeContent c) throws InvalidOperator, PropertyConstraintFailure { return content.invertRemoveKey (key, c); --- 24,32 ---- public Object key () { return key; } ! void applyTo (AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opRemove (key, c); } ! AbstractOperator invertOn (AbstractContent content, NodeContent c) throws InvalidOperator, PropertyConstraintFailure { return content.invertRemoveKey (key, c); Index: memLiteralSetContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memLiteralSetContent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** memLiteralSetContent.java 16 Nov 2004 20:46:18 -0000 1.2 --- memLiteralSetContent.java 8 Jan 2005 00:51:07 -0000 1.3 *************** *** 73,77 **** } ! boolean opRemove (Object key, BareContent.Editor c) { key = checkItemType(key); // Notify interested parties --- 73,77 ---- } ! boolean opRemove (Object key, AbstractNodeContent.Editor c) { key = checkItemType(key); // Notify interested parties *************** *** 81,85 **** } ! boolean opAdd(Object val, BareContent.Editor c) throws ConstraintFailure { val = checkValue(val); // Notify any interested values --- 81,85 ---- } ! boolean opAdd(Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { val = checkValue(val); // Notify any interested values Index: memShortSequenceContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memShortSequenceContent.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** memShortSequenceContent.java 16 Nov 2004 20:46:19 -0000 1.21 --- memShortSequenceContent.java 8 Jan 2005 00:51:08 -0000 1.22 *************** *** 145,149 **** // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, BareContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new ShortSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); --- 145,149 ---- // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new ShortSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); *************** *** 152,159 **** private final class IndexSetter implements ShortSetterUtil.ShortSetter { private final int idx; ! private final BareContent.Editor content; private final NodeManager mgr; ! IndexSetter(int i, BareContent.Editor c, NodeManager mgr) { this.idx = i; this.content = c; --- 152,159 ---- private final class IndexSetter implements ShortSetterUtil.ShortSetter { private final int idx; ! private final AbstractNodeContent.Editor content; private final NodeManager mgr; ! IndexSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) { this.idx = i; this.content = c; *************** *** 182,186 **** * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); --- 182,186 ---- * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); *************** *** 197,201 **** * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, short v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); --- 197,201 ---- * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, short v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); *************** *** 220,224 **** synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! BareContent.Editor c) throws ConstraintFailure { ShortSeq seq = (val == null ? null : ShortSeqUtil.create(val)); if (seq != null) { --- 220,224 ---- synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! AbstractNodeContent.Editor c) throws ConstraintFailure { ShortSeq seq = (val == null ? null : ShortSeqUtil.create(val)); if (seq != null) { *************** *** 250,254 **** } ! synchronized void opInsertBefore(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 250,254 ---- } ! synchronized void opInsertBefore(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { *************** *** 260,264 **** } ! synchronized void opInsertAfter(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 260,264 ---- } ! synchronized void opInsertAfter(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { Index: OpInsertBefore.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpInsertBefore.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpInsertBefore.java 16 Nov 2004 20:46:19 -0000 1.2 --- OpInsertBefore.java 8 Jan 2005 00:51:08 -0000 1.3 *************** *** 26,34 **** public Object value () { return newValue; } ! void applyTo (memContent content, BareContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opInsertBefore (index, newValue, c); } ! AbstractOperator invertOn (memContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertInsertBefore (index, content, c); --- 26,34 ---- public Object value () { return newValue; } ! void applyTo (AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opInsertBefore (index, newValue, c); } ! AbstractOperator invertOn (AbstractContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertInsertBefore (index, content, c); Index: OpRemoveRange.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpRemoveRange.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpRemoveRange.java 16 Nov 2004 20:46:18 -0000 1.2 --- OpRemoveRange.java 8 Jan 2005 00:51:07 -0000 1.3 *************** *** 26,34 **** public int endIndex () { return endIndex; } ! void applyTo (memContent content, BareContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opRemoveRange (startIndex, endIndex, c); } ! AbstractOperator invertOn (memContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertRemoveRange (startIndex, endIndex, c); --- 26,34 ---- public int endIndex () { return endIndex; } ! void applyTo (AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opRemoveRange (startIndex, endIndex, c); } ! AbstractOperator invertOn (AbstractContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertRemoveRange (startIndex, endIndex, c); Index: BareRecord.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/BareRecord.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** BareRecord.java 16 Nov 2004 19:25:36 -0000 1.22 --- BareRecord.java 8 Jan 2005 00:51:08 -0000 1.23 *************** *** 11,15 **** import org.nodal.model.Getter; - import org.nodal.model.Node; import org.nodal.model.NodeContent; import org.nodal.model.RecordNode; --- 11,14 ---- *************** *** 19,31 **** import org.nodal.util.PropertyConstraintFailure; import storage.framework.AbstractRepository; //import java.util.Enumeration; ! public abstract class BareRecord extends BareContent implements RecordNode { protected final MemRecordContentI record; ! BareRecord(Node n, memRecordContent r, Capability cap, AbstractRepository.Backend f) { ! super(n, r, cap, f); record = r; } --- 18,31 ---- import org.nodal.util.PropertyConstraintFailure; + import storage.framework.AbstractNode; import storage.framework.AbstractRepository; //import java.util.Enumeration; ! public abstract class BareRecord extends AbstractNodeContent implements RecordNode { protected final MemRecordContentI record; ! BareRecord(AbstractNode.Backend backend, memRecordContent r, Capability cap, AbstractRepository.Backend f) { ! super(backend, r, cap, f); record = r; } Index: OpClone.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpClone.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpClone.java 16 Nov 2004 20:46:18 -0000 1.2 --- OpClone.java 8 Jan 2005 00:51:08 -0000 1.3 *************** *** 29,38 **** public Node source () { return source; } ! void applyTo (memContent content, BareContent.Editor c) throws InvalidOperator { throw new InvalidOperator ("invalid OpClone on "+content); } // The inverse of a creation Operator is itself. ! AbstractOperator invertOn (memContent content, NodeContent c) { return this; } --- 29,38 ---- public Node source () { return source; } ! void applyTo (AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator { throw new InvalidOperator ("invalid OpClone on "+content); } // The inverse of a creation Operator is itself. ! AbstractOperator invertOn (AbstractContent content, NodeContent c) { return this; } Index: memNodeSetContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memNodeSetContent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** memNodeSetContent.java 16 Nov 2004 20:46:18 -0000 1.2 --- memNodeSetContent.java 8 Jan 2005 00:51:08 -0000 1.3 *************** *** 77,81 **** } ! boolean opRemove (Object key, BareContent.Editor c) { key = checkItemType(key); // Notify interested parties --- 77,81 ---- } ! boolean opRemove (Object key, AbstractNodeContent.Editor c) { key = checkItemType(key); // Notify interested parties *************** *** 89,93 **** } ! boolean opAdd(Object val, BareContent.Editor c) throws ConstraintFailure { val = checkValue(val); val = c.assignNode(val, (Node) val); --- 89,93 ---- } ! boolean opAdd(Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { val = checkValue(val); val = c.assignNode(val, (Node) val); Index: memIntSequenceContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memIntSequenceContent.java,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** memIntSequenceContent.java 16 Nov 2004 20:46:19 -0000 1.47 --- memIntSequenceContent.java 8 Jan 2005 00:51:08 -0000 1.48 *************** *** 144,148 **** // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, BareContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new IntSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); --- 144,148 ---- // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new IntSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); *************** *** 151,158 **** private class IndexSetter implements IntSetterUtil.IntSetter { private int idx; ! private final BareContent.Editor content; private final NodeManager mgr; ! IndexSetter(int i, BareContent.Editor c, NodeManager mgr) { idx = i; this.content = c; --- 151,158 ---- private class IndexSetter implements IntSetterUtil.IntSetter { private int idx; ! private final AbstractNodeContent.Editor content; private final NodeManager mgr; ! IndexSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) { idx = i; this.content = c; *************** *** 181,185 **** * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); --- 181,185 ---- * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); *************** *** 196,200 **** * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, int v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); --- 196,200 ---- * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, int v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); *************** *** 219,223 **** synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! BareContent.Editor c) throws ConstraintFailure { IntSeq seq = (val == null ? null : IntSeqUtil.create(val)); if (seq != null) { --- 219,223 ---- synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! AbstractNodeContent.Editor c) throws ConstraintFailure { IntSeq seq = (val == null ? null : IntSeqUtil.create(val)); if (seq != null) { *************** *** 249,253 **** } ! synchronized void opInsertBefore(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 249,253 ---- } ! synchronized void opInsertBefore(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { *************** *** 259,263 **** } ! synchronized void opInsertAfter(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 259,263 ---- } ! synchronized void opInsertAfter(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { Index: memNodeMapContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memNodeMapContent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** memNodeMapContent.java 16 Nov 2004 20:46:18 -0000 1.2 --- memNodeMapContent.java 8 Jan 2005 00:51:07 -0000 1.3 *************** *** 62,66 **** } ! void opRemoveKey(Object key, BareContent.Editor c) throws PropertyConstraintFailure { key = checkKeyType(key); --- 62,66 ---- } ! void opRemoveKey(Object key, AbstractNodeContent.Editor c) throws PropertyConstraintFailure { key = checkKeyType(key); *************** *** 74,78 **** } ! void opSetValue(Object key, Object val, BareContent.Editor c) throws ConstraintFailure { // Check types and convert if necessary --- 74,78 ---- } ! void opSetValue(Object key, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { // Check types and convert if necessary --- BareContent.java DELETED --- --- memContent.java DELETED --- Index: memBoolSequenceContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memBoolSequenceContent.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** memBoolSequenceContent.java 16 Nov 2004 20:46:18 -0000 1.22 --- memBoolSequenceContent.java 8 Jan 2005 00:51:08 -0000 1.23 *************** *** 145,149 **** // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, BareContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new BooleanSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); --- 145,149 ---- // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new BooleanSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); *************** *** 153,159 **** private int idx; private NodeManager mgr; ! private BareContent.Editor content; ! IndexSetter(int i, BareContent.Editor c, NodeManager mgr) { this.idx = i; this.mgr = mgr; --- 153,159 ---- private int idx; private NodeManager mgr; ! private AbstractNodeContent.Editor content; ! IndexSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) { this.idx = i; this.mgr = mgr; *************** *** 181,185 **** } ! void opSetItem(int i, Object v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); --- 181,185 ---- } ! void opSetItem(int i, Object v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); *************** *** 196,200 **** * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, boolean v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); --- 196,200 ---- * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, boolean v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); *************** *** 210,214 **** * must have already been done. */ ! private synchronized void opSetItemUnchecked(int i, boolean v, BareContent.Editor c) { if (i < 0) { i = normalizeIndex(i); --- 210,214 ---- * must have already been done. */ ! private synchronized void opSetItemUnchecked(int i, boolean v, AbstractNodeContent.Editor c) { if (i < 0) { i = normalizeIndex(i); *************** *** 219,223 **** synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! BareContent.Editor c) throws ConstraintFailure { BooleanSeq seq = (val == null ? null : BooleanSeqUtil.create(val)); if (seq != null) { --- 219,223 ---- synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! AbstractNodeContent.Editor c) throws ConstraintFailure { BooleanSeq seq = (val == null ? null : BooleanSeqUtil.create(val)); if (seq != null) { *************** *** 251,255 **** } ! synchronized void opInsertBefore(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 251,255 ---- } ! synchronized void opInsertBefore(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { *************** *** 261,265 **** } ! synchronized void opInsertAfter(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 261,265 ---- } ! synchronized void opInsertAfter(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { Index: memStringContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memStringContent.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** memStringContent.java 16 Nov 2004 20:46:18 -0000 1.40 --- memStringContent.java 8 Jan 2005 00:51:08 -0000 1.41 *************** *** 161,165 **** } ! protected Setter itemSetter(int i, BareContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new CharSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); --- 161,165 ---- } ! protected Setter itemSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new CharSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); *************** *** 169,175 **** private final int idx; private final NodeManager mgr; ! private final BareContent.Editor content; ! IndexSetter(int i, BareContent.Editor c, NodeManager mgr) { this.idx = i; this.content = c; --- 169,175 ---- private final int idx; private final NodeManager mgr; ! private final AbstractNodeContent.Editor content; ! IndexSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) { this.idx = i; this.content = c; *************** *** 199,203 **** * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); --- 199,203 ---- * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); *************** *** 214,218 **** * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, char ch, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); --- 214,218 ---- * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, char ch, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); *************** *** 249,253 **** */ synchronized void opReplaceRange(int start, int end, Object val, ! BareContent.Editor c) throws ConstraintFailure { CharSeq seq = CharSeqUtil.create(val); checkSeq(seq); --- 249,253 ---- */ synchronized void opReplaceRange(int start, int end, Object val, ! AbstractNodeContent.Editor c) throws ConstraintFailure { CharSeq seq = CharSeqUtil.create(val); checkSeq(seq); *************** *** 284,288 **** } ! synchronized void opInsertBefore(int index, Object val, BareContent.Editor c) throws ConstraintFailure { CharSeq seq = CharSeqUtil.create(val); --- 284,288 ---- } ! synchronized void opInsertBefore(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { CharSeq seq = CharSeqUtil.create(val); *************** *** 295,299 **** } ! synchronized void opInsertAfter(int index, Object val, BareContent.Editor c) throws ConstraintFailure { CharSeq seq = CharSeqUtil.create(val); --- 295,299 ---- } ! synchronized void opInsertAfter(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { CharSeq seq = CharSeqUtil.create(val); Index: memSequenceContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memSequenceContent.java,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** memSequenceContent.java 16 Nov 2004 20:46:18 -0000 1.71 --- memSequenceContent.java 8 Jan 2005 00:51:08 -0000 1.72 *************** *** 14,18 **** import org.nodal.model.Getter; import org.nodal.model.InvalidOperator; - import org.nodal.model.Node; import org.nodal.model.NodeContent; import org.nodal.model.Operator; --- 14,17 ---- *************** *** 50,54 **** * @author Lee Iverson <le...@ec...> */ ! abstract class memSequenceContent extends memContent implements MemSequenceContentI { --- 49,53 ---- * @author Lee Iverson <le...@ec...> */ ! abstract class memSequenceContent extends AbstractContent implements MemSequenceContentI { *************** *** 102,106 **** * Called by BareNode to create a NodeContent object. */ ! protected NodeContent createNodeContent(Node n, Capability cap, AbstractRepository.Backend f) { return new MyNodeContent(n, cap, f); --- 101,105 ---- * Called by BareNode to create a NodeContent object. */ ! protected NodeContent createNodeContent(AbstractNode.Backend n, Capability cap, AbstractRepository.Backend f) { return new MyNodeContent(n, cap, f); *************** *** 110,114 **** private SequenceNode.Editor editor; ! MyNodeContent(Node n, Capability cap, AbstractRepository.Backend f) { super(n, memSequenceContent.this, cap, f); editor = null; --- 109,113 ---- private SequenceNode.Editor editor; ! MyNodeContent(AbstractNode.Backend n, Capability cap, AbstractRepository.Backend f) { super(n, memSequenceContent.this, cap, f); editor = null; *************** *** 253,258 **** } ! // Implementation of opSetValue from memContent ! void opSetValue(Object k, Object value, BareContent.Editor c) throws ConstraintFailure { if (k instanceof Byte || k instanceof Short || k instanceof Integer) { --- 252,257 ---- } ! // Implementation of opSetValue from AbstractContent ! void opSetValue(Object k, Object value, AbstractNodeContent.Editor c) throws ConstraintFailure { if (k instanceof Byte || k instanceof Short || k instanceof Integer) { *************** *** 266,285 **** throws IndexBoundsException; ! protected abstract Setter itemSetter(int i, BareContent.Editor c, NodeManager mgr) throws IndexBoundsException; ! abstract void opSetItem(int i, Object val, BareContent.Editor c) throws ConstraintFailure; abstract void opReplaceRange(int startIndex, int endIndex, Object val, ! BareContent.Editor c) throws ConstraintFailure; ! abstract void opInsertBefore(int index, Object val, BareContent.Editor c) throws ConstraintFailure; ! abstract void opInsertAfter(int index, Object val, BareContent.Editor c) throws ConstraintFailure; ! final void opRemoveRange(int startIndex, int endIndex, BareContent.Editor c) throws ConstraintFailure { checkRange(startIndex, endIndex); --- 265,284 ---- throws IndexBoundsException; ! protected abstract Setter itemSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) throws IndexBoundsException; ! abstract void opSetItem(int i, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure; abstract void opReplaceRange(int startIndex, int endIndex, Object val, ! AbstractNodeContent.Editor c) throws ConstraintFailure; ! abstract void opInsertBefore(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure; ! abstract void opInsertAfter(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure; ! final void opRemoveRange(int startIndex, int endIndex, AbstractNodeContent.Editor c) throws ConstraintFailure { checkRange(startIndex, endIndex); *************** *** 348,352 **** } ! protected final class MyNodeEditor extends BareContent.Editor implements SequenceNode.Editor { --- 347,351 ---- } ! protected final class MyNodeEditor extends AbstractNodeContent.Editor implements SequenceNode.Editor { *************** *** 443,449 **** private final int end; private final NodeManager nodeMgr; ! private final BareContent.Editor node; ! ReplaceRangeSetter(int s, int e, BareContent.Editor c, NodeManager mgr) { start = s; end = e; --- 442,448 ---- private final int end; private final NodeManager nodeMgr; ! private final AbstractNodeContent.Editor node; ! ReplaceRangeSetter(int s, int e, AbstractNodeContent.Editor c, NodeManager mgr) { start = s; end = e; *************** *** 736,740 **** } ! public void modify(AbstractOperator op, BareContent.Editor c) throws InvalidOperator, ConstraintFailure { // NEXT Hmmm... This is troublesome. Do I have to pull these apart? --- 735,739 ---- } ! public void modify(AbstractOperator op, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure { // NEXT Hmmm... This is troublesome. Do I have to pull these apart? Index: OpReplaceRange.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpReplaceRange.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpReplaceRange.java 16 Nov 2004 20:46:18 -0000 1.2 --- OpReplaceRange.java 8 Jan 2005 00:51:07 -0000 1.3 *************** *** 29,37 **** public Object value () { return newValue; } ! void applyTo (memContent content, BareContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opReplaceRange (startIndex, endIndex, newValue, c); } ! AbstractOperator invertOn (memContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertReplaceRange (startIndex, endIndex, content, c); --- 29,37 ---- public Object value () { return newValue; } ! void applyTo (AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator, ConstraintFailure { content.opReplaceRange (startIndex, endIndex, newValue, c); } ! AbstractOperator invertOn (AbstractContent content, NodeContent c) throws InvalidOperator, ConstraintFailure { return content.invertReplaceRange (startIndex, endIndex, content, c); Index: OpCreate.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/OpCreate.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpCreate.java 16 Nov 2004 20:46:19 -0000 1.2 --- OpCreate.java 8 Jan 2005 00:51:08 -0000 1.3 *************** *** 31,40 **** public NodeType type () { return type; } ! void applyTo (memContent content, BareContent.Editor c) throws InvalidOperator { throw new InvalidOperator ("invalid OpCreate on "+content); } // The inverse of a creation Operator is itself. ! AbstractOperator invertOn (memContent content, NodeContent c) { return this; } --- 31,40 ---- public NodeType type () { return type; } ! void applyTo (AbstractContent content, AbstractNodeContent.Editor c) throws InvalidOperator { throw new InvalidOperator ("invalid OpCreate on "+content); } // The inverse of a creation Operator is itself. ! AbstractOperator invertOn (AbstractContent content, NodeContent c) { return this; } Index: BareSet.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/BareSet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BareSet.java 16 Nov 2004 19:25:35 -0000 1.3 --- BareSet.java 8 Jan 2005 00:51:07 -0000 1.4 *************** *** 11,26 **** import java.util.Set; - import org.nodal.model.Node; import org.nodal.model.NodeContent; import org.nodal.model.SetNode; import org.nodal.security.Capability; import storage.framework.AbstractRepository; ! public abstract class BareSet extends BareContent implements SetNode { protected memSetContent set; protected SetNode.Editor editSet; ! BareSet(Node n, memSetContent s, Capability cap, AbstractRepository.Backend f) { ! super(n, s, cap, f); set = s; editSet = null; --- 11,27 ---- import java.util.Set; import org.nodal.model.NodeContent; import org.nodal.model.SetNode; import org.nodal.security.Capability; + + import storage.framework.AbstractNode; import storage.framework.AbstractRepository; ! public abstract class BareSet extends AbstractNodeContent implements SetNode { protected memSetContent set; protected SetNode.Editor editSet; ! BareSet(AbstractNode.Backend backend, memSetContent s, Capability cap, AbstractRepository.Backend f) { ! super(backend, s, cap, f); set = s; editSet = null; Index: memByteSequenceContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memByteSequenceContent.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** memByteSequenceContent.java 16 Nov 2004 20:46:18 -0000 1.20 --- memByteSequenceContent.java 8 Jan 2005 00:51:08 -0000 1.21 *************** *** 147,151 **** // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, BareContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new ByteSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); --- 147,151 ---- // Implementation of StSequenceEditor methods ! protected Setter itemSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) throws IndexBoundsException { return new ByteSetterUtil(itemGetter(i, c), new IndexSetter(i, c, mgr)); *************** *** 155,161 **** private int idx; private NodeManager mgr; ! private final BareContent.Editor content; ! IndexSetter(int i, BareContent.Editor c, NodeManager mgr) { this.idx = i; this.content = c; --- 155,161 ---- private int idx; private NodeManager mgr; ! private final AbstractNodeContent.Editor content; ! IndexSetter(int i, AbstractNodeContent.Editor c, NodeManager mgr) { this.idx = i; this.content = c; *************** *** 187,191 **** * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); --- 187,191 ---- * Automatically converts to a valid value if necessary. */ ! void opSetItem(int i, Object v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); *************** *** 202,206 **** * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, byte v, BareContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); --- 202,206 ---- * Set an item value with full checking of validity of value or index. */ ! void opSetItem(int i, byte v, AbstractNodeContent.Editor c) throws ConstraintFailure { checkIndex(i); Type itemType = type.itemType(); *************** *** 215,219 **** * must have already been done. */ ! private synchronized void opSetItemUnchecked(int i, byte v, BareContent.Editor c) throws ConstraintFailure { if (i < 0) { --- 215,219 ---- * must have already been done. */ ! private synchronized void opSetItemUnchecked(int i, byte v, AbstractNodeContent.Editor c) throws ConstraintFailure { if (i < 0) { *************** *** 225,229 **** synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! BareContent.Editor c) throws ConstraintFailure { ByteSeq seq = (val == null ? null : ByteSeqUtil.create(val)); if (seq != null) { --- 225,229 ---- synchronized void opReplaceRange(int startIndex, int endIndex, Object val, ! AbstractNodeContent.Editor c) throws ConstraintFailure { ByteSeq seq = (val == null ? null : ByteSeqUtil.create(val)); if (seq != null) { *************** *** 257,261 **** } ! synchronized void opInsertBefore(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 257,261 ---- } ! synchronized void opInsertBefore(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { *************** *** 267,271 **** } ! synchronized void opInsertAfter(int index, Object val, BareContent.Editor c) throws ConstraintFailure { if (val == null) { --- 267,271 ---- } ! synchronized void opInsertAfter(int index, Object val, AbstractNodeContent.Editor c) throws ConstraintFailure { if (val == null) { Index: memRecordContent.java =================================================================== RCS file: /cvsroot/nodal/nodal/j-src/storage/memory/memRecordContent.java,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** memRecordContent.java 16 Nov 2004 20:46:18 -0000 1.66 --- memRecordContent.java 8 Jan 2005 00:51:08 -0000 1.67 *************** *** 35,38 **** --- 35,40 ---- import org.nodal.util.SetterUtil; import org.nodal.util.TypeConstraintFailure; + + import storage.framework.AbstractNode; import storage.framework.AbstractRepository; *************** *** 43,47 **** * @author leei */ ! final class memRecordContent extends memContent implements MemRecordContentI { protected final RecordType recordType; protected final Rec... [truncated message content] |