gzz.impl
Class ModularSpace

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.AbstractSpace
        |
        +--gzz.impl.ModularSpace
All Implemented Interfaces:
SliceSpace, Space
Direct Known Subclasses:
ModularDeltaSpace

public class ModularSpace
extends AbstractSpace

An implementation of space that delegates calls to a CellManager and a DimManager.


Field Summary
protected  CellManager cellManager
           
protected  DimManager dimManager
           
protected  IdentityManager identityManager
           
static java.lang.String rcsid
           
 
Fields inherited from class gzz.impl.AbstractSpace
cellTexter, javaObjector, obsTrigger, slicer
 
Constructor Summary
ModularSpace(ModularCellTexter cellTexter, CellManager cellManager, DimManager dimManager, IdentityManager identityManager, Slicer slicer, ObsTrigger obsTrigger)
           
ModularSpace(SliceVersion version, ModularCellTexter cellTexter, CellManager cellManager, DimManager dimManager, IdentityManager identityManager, Slicer slicer, ObsTrigger obsTrigger)
          Create a new ModularSpace and initialize it from a SliceVersion.
 
Method Summary
 void delete(Cell c)
          Delete a given cell.
 boolean exists(java.lang.String id)
          Whether a cell with the given ID exists in this space.
 Cell getCell(java.lang.String id)
          Get a cell by its ID.
 Dim getCloneDim()
          Get the clone dimension of this space.
 Dim getDim(Cell name)
          Get a dimension by cell.
 java.util.Set getDims()
          Get the set of all dimensions in this space.
 Cell getHomeCell()
          Get the home cell of this space.
 Cell getIdentity(Cell c)
          Get the canonical cell representing a given cell's global identity.
 Cell getIdentity(java.lang.String s)
          Get the cell representing a given global identity.
 Mediaserver getMediaserver()
          Get the instance of mediaserver associated with this space.
 Cell getMSBlockCell(java.lang.String msid, Cell cell)
          Get the cell representing the given mediaserver block in the same slice as cell.
 Cell N(Cell inSlice)
          Create a new cell in the same slice as the given cell.
 Cell N(Cell inSlice, Dim dim, int dir, Obs o)
          Create a new cell in the same slice as the given cell, and connect it in the direction given.
 
Methods inherited from class gzz.impl.AbstractSpace
getCellTexter, getDim, getJavaObjector, getObsTrigger, getSlicer, N, N, zzclone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rcsid

public static final java.lang.String rcsid
See Also:
Constant Field Values

cellManager

protected CellManager cellManager

dimManager

protected DimManager dimManager

identityManager

protected IdentityManager identityManager
Constructor Detail

ModularSpace

public ModularSpace(ModularCellTexter cellTexter,
                    CellManager cellManager,
                    DimManager dimManager,
                    IdentityManager identityManager,
                    Slicer slicer,
                    ObsTrigger obsTrigger)

ModularSpace

public ModularSpace(SliceVersion version,
                    ModularCellTexter cellTexter,
                    CellManager cellManager,
                    DimManager dimManager,
                    IdentityManager identityManager,
                    Slicer slicer,
                    ObsTrigger obsTrigger)
Create a new ModularSpace and initialize it from a SliceVersion. XXX where would this fit well? Is it a Slicer responsibility? how to do it for slice.0?

The correct thing is to load slice versions by calling slicer.swapIn(sliceId, version). The point is that slice.0 should be always there, i.e. not only after swapIn() is called... maybe the ModularSpace constructor should simply call swapIn(getSlice0())...

Method Detail

getHomeCell

public Cell getHomeCell()
Description copied from interface: Space
Get the home cell of this space. The home cell is where everything begins.


getCell

public Cell getCell(java.lang.String id)
Description copied from interface: Space
Get a cell by its ID.


getDim

public Dim getDim(Cell name)
Description copied from interface: Space
Get a dimension by cell. The same Dim object should be returned when this is called with Cells that are clones of each other.


getDims

public java.util.Set getDims()
Description copied from interface: Space
Get the set of all dimensions in this space.

Returns:
A Set, containing Dim objects for the dimensions in this space.

getIdentity

public Cell getIdentity(java.lang.String s)
Description copied from interface: Space
Get the cell representing a given global identity.

Specified by:
getIdentity in interface Space
Overrides:
getIdentity in class AbstractSpace

getIdentity

public Cell getIdentity(Cell c)
Description copied from interface: Space
Get the canonical cell representing a given cell's global identity.

Specified by:
getIdentity in interface Space
Overrides:
getIdentity in class AbstractSpace

getCloneDim

public Dim getCloneDim()
Description copied from interface: Space
Get the clone dimension of this space.

Specified by:
getCloneDim in interface Space
Specified by:
getCloneDim in class AbstractSpace

N

public Cell N(Cell inSlice)
Description copied from interface: Space
Create a new cell in the same slice as the given cell.


N

public Cell N(Cell inSlice,
              Dim dim,
              int dir,
              Obs o)
Description copied from interface: Space
Create a new cell in the same slice as the given cell, and connect it in the direction given.

Parameters:
o - The observer to call when s(inSlice, dim, dir) would not return the cell created by this call any more.

delete

public void delete(Cell c)
Description copied from interface: Space
Delete a given cell.


exists

public boolean exists(java.lang.String id)
Description copied from interface: Space
Whether a cell with the given ID exists in this space.


getMediaserver

public Mediaserver getMediaserver()
Description copied from interface: Space
Get the instance of mediaserver associated with this space. May return null.

Specified by:
getMediaserver in interface Space
Overrides:
getMediaserver in class AbstractSpace

getMSBlockCell

public Cell getMSBlockCell(java.lang.String msid,
                           Cell cell)
Description copied from interface: Space
Get the cell representing the given mediaserver block in the same slice as cell. May return null.

Specified by:
getMSBlockCell in interface Space
Overrides:
getMSBlockCell in class AbstractSpace