gzz.impl
Class SimpleVStreamTexter

gzz.Space gzz.impl.AbstractSpace gzz.CellTexter gzz.VStreamCellTexter gzz.impl.SimpleVStreamTexter gzz.impl.ModularSpace gzz.ObsTrigger gzz.impl.SimpleObsTrigger gzz.IdentityManager gzz.impl.DummyIdentityManager gzz.CellManager gzz.impl.AbstractCellManager gzz.impl.PlainCellManager gzz.DimManager gzz.impl.AbstractDimManager SimpleDim.Manager gzz.diff.DeltaSpace gzz.impl.ModularDeltaSpace gzz.diff.DeltaDimManager gzz.diff.DeltaCellTexter gzz.impl.AbstractDeltaDimManager gzz.impl.SimpleDeltaVStreamTexter ../../../Gzz_Backend.gen.html#modularspace modularspace_small
java.lang.Object
  |
  +--gzz.impl.SimpleVStreamTexter
All Implemented Interfaces:
CellTexter, IndexedVStreamCellTexter, ModularCellTexter, SearchableCellTexter, VStreamCellTexter
Direct Known Subclasses:
SimpleDeltaVStreamTexter

public class SimpleVStreamTexter
extends java.lang.Object
implements VStreamCellTexter, SearchableCellTexter, ModularCellTexter, IndexedVStreamCellTexter

A simple referential CellTexter.


Field Summary
protected  java.util.Map contents
           
 
Constructor Summary
SimpleVStreamTexter(SpanMaker spanMaker, Enfilade1D.Maker enfMaker)
          Create a new object with given new span maker.
SimpleVStreamTexter(SpanMaker spanMaker, Enfilade1D.Maker enfMaker, EnfiladeAligner enfAligner)
          Deprecated. EnfiladeAligner should not be provided by Space: it's too complicated and ill-defined for that.
 
Method Summary
 void copyText(Cell to, int ind, Cell from, int begin, int end)
          Copy some text from one cell to another.
 void deleteText(Cell c, int begin, int end)
          Delete a piece of text from a cell.
 java.util.Set getCellsWithContent()
          The innermost routine that uses the actual map.
 Enfilade1D getEnfilade(Cell c, Obs o)
          Get the vstream in this cell.
 Index getEnfiladeOverlap()
          Get an Index that, passed an enfilade or span, returns all cells whose span content overlaps with the passed enfilade or span.
protected  Enfilade1D getFromMap(Cell c)
          The innermost routine that uses the actual map.
 StringSearcher getStringSearcher()
          Get a StringSearcher that maps cells' texts to cells.
 java.lang.String getText(Cell c, Obs o)
          Return the vstream in this cell, merged into a single String.
 XuIndexer getXuIndexer()
          XXX WRONG IMPLEMENTATION!!!!!!!
 void insertText(Cell c, int ind, java.lang.String s)
          Insert the given string into the text in the cell C.
 void moveText(Cell to, int ind, Cell from, int begin, int end)
          Move some text from one cell to another.
 void setEnfilade(Cell c, Enfilade1D vstream)
          Set the vstream in this cell.
protected  void setMap(Cell c, Enfilade1D enf)
          The innermost routine that uses the actual map.
 void setSpace(ModularSpace space)
          Set the modularspace that this celltexter is part of.
 void setText(Cell c, java.lang.String s)
          Create a new text span and make it the vstream of this Cell.
 EnfiladeAligner.Instance startEnfiladeAligner(Cell c)
          Create an enfilade aligner instance for the enfilade in a given cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contents

protected java.util.Map contents
Constructor Detail

SimpleVStreamTexter

public SimpleVStreamTexter(SpanMaker spanMaker,
                           Enfilade1D.Maker enfMaker,
                           EnfiladeAligner enfAligner)
Deprecated. EnfiladeAligner should not be provided by Space: it's too complicated and ill-defined for that.

Create a new object with given new span maker.

Parameters:
spanMaker - In order to perform setText() and insertText(), this object needs to create new spans. The spanMaker interface allows us to polymorphize that.

SimpleVStreamTexter

public SimpleVStreamTexter(SpanMaker spanMaker,
                           Enfilade1D.Maker enfMaker)
Create a new object with given new span maker.

Parameters:
spanMaker - In order to perform setText() and insertText(), this object needs to create new spans. The spanMaker interface allows us to polymorphize that.
Method Detail

setSpace

public void setSpace(ModularSpace space)
Description copied from interface: ModularCellTexter
Set the modularspace that this celltexter is part of.

Specified by:
setSpace in interface ModularCellTexter

getFromMap

protected Enfilade1D getFromMap(Cell c)
The innermost routine that uses the actual map. For keeping change lists etc, override this and setMap.


setMap

protected void setMap(Cell c,
                      Enfilade1D enf)
The innermost routine that uses the actual map. For keeping change lists etc, override this and getFromMap.


getCellsWithContent

public java.util.Set getCellsWithContent()
The innermost routine that uses the actual map. For keeping change lists etc, override this and set/getFromMap.

Specified by:
getCellsWithContent in interface CellTexter

getEnfilade

public final Enfilade1D getEnfilade(Cell c,
                                    Obs o)
Description copied from interface: VStreamCellTexter
Get the vstream in this cell. Never returns null.

Specified by:
getEnfilade in interface VStreamCellTexter

setEnfilade

public final void setEnfilade(Cell c,
                              Enfilade1D vstream)
Description copied from interface: VStreamCellTexter
Set the vstream in this cell.

Specified by:
setEnfilade in interface VStreamCellTexter

startEnfiladeAligner

public EnfiladeAligner.Instance startEnfiladeAligner(Cell c)
Description copied from interface: VStreamCellTexter
Create an enfilade aligner instance for the enfilade in a given cell. This can be used to externalize the content of a cell.

Specified by:
startEnfiladeAligner in interface VStreamCellTexter

getEnfiladeOverlap

public Index getEnfiladeOverlap()
Description copied from interface: IndexedVStreamCellTexter
Get an Index that, passed an enfilade or span, returns all cells whose span content overlaps with the passed enfilade or span.

Specified by:
getEnfiladeOverlap in interface IndexedVStreamCellTexter

getXuIndexer

public XuIndexer getXuIndexer()
XXX WRONG IMPLEMENTATION!!!!!!!

Specified by:
getXuIndexer in interface IndexedVStreamCellTexter

getText

public java.lang.String getText(Cell c,
                                Obs o)
Description copied from interface: VStreamCellTexter
Return the vstream in this cell, merged into a single String. This is the text of all TextSpans in this cell, in order. Cells and Span1Ds that are not TextSpans are ignored.

Specified by:
getText in interface VStreamCellTexter

setText

public void setText(Cell c,
                    java.lang.String s)
Description copied from interface: VStreamCellTexter
Create a new text span and make it the vstream of this Cell.

Specified by:
setText in interface VStreamCellTexter

insertText

public void insertText(Cell c,
                       int ind,
                       java.lang.String s)
Description copied from interface: CellTexter
Insert the given string into the text in the cell C. This can be a routine that preserves Xanadu-model permanence.

Specified by:
insertText in interface CellTexter

deleteText

public void deleteText(Cell c,
                       int begin,
                       int end)
Description copied from interface: CellTexter
Delete a piece of text from a cell.

Specified by:
deleteText in interface CellTexter
See Also:
Cell.deleteText

copyText

public void copyText(Cell to,
                     int ind,
                     Cell from,
                     int begin,
                     int end)
Description copied from interface: CellTexter
Copy some text from one cell to another.

Specified by:
copyText in interface CellTexter

moveText

public void moveText(Cell to,
                     int ind,
                     Cell from,
                     int begin,
                     int end)
Description copied from interface: CellTexter
Move some text from one cell to another.

Specified by:
moveText in interface CellTexter

getStringSearcher

public StringSearcher getStringSearcher()
Description copied from interface: SearchableCellTexter
Get a StringSearcher that maps cells' texts to cells.

Specified by:
getStringSearcher in interface SearchableCellTexter