uk.ac.leeds.ccg.andyt.grids.core
Class AbstractGrid2DSquareCellFactory

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellFactory
Direct Known Subclasses:
Grid2DSquareCellDoubleFactory, Grid2DSquareCellIntFactory

public abstract class AbstractGrid2DSquareCellFactory
extends java.lang.Object

Abstract class to be extended by all AbstractGrid2DSquareCell factories.


Field Summary
protected  int _ChunkNCols
          The number of columns in a chunk.
protected  int _ChunkNRows
          The number of rows in a chunk.
protected  java.math.BigDecimal[] _Dimensions
          The Dimensions
protected  java.io.File _Directory
          A _Directory for swapping.
protected  Grids_Environment _Grids_Environment
           
protected  boolean _HandleOutOfMemoryError
          _HandleOutOfMemoryError
 
Constructor Summary
AbstractGrid2DSquareCellFactory()
           
 
Method Summary
 AbstractGrid2DSquareCell create()
           
 AbstractGrid2DSquareCell create(AbstractGrid2DSquareCell _Grid2DSquareCell)
           
 AbstractGrid2DSquareCell create(AbstractGrid2DSquareCell grid2DSquareCell, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex)
           
 AbstractGrid2DSquareCell create(java.io.File gridFile)
           
 AbstractGrid2DSquareCell create(java.io.File _Directory, AbstractGrid2DSquareCell grid2DSquareCell, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex)
           
abstract  AbstractGrid2DSquareCell create(java.io.File _Directory, AbstractGrid2DSquareCell grid2DSquareCell, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, Grids_Environment _Grids_Environment, boolean handleOutOfMemoryError)
           
 AbstractGrid2DSquareCell create(java.io.File _Directory, java.io.File gridFile, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex)
           
abstract  AbstractGrid2DSquareCell create(java.io.File _Directory, java.io.File gridFile, long startRowIndex, long startColIndex, long endRowIndex, long endColIndex, Grids_Environment _Grids_Environment, boolean handleOutOfMemoryError)
           
 AbstractGrid2DSquareCell create(java.io.File _Directory, java.io.File gridFile, java.io.ObjectInputStream ois)
           
abstract  AbstractGrid2DSquareCell create(java.io.File _Directory, java.io.File gridFile, java.io.ObjectInputStream ois, Grids_Environment _Grids_Environment, boolean handleOutOfMemoryError)
           
 AbstractGrid2DSquareCell create(java.io.File directory, long _NRows, long _NCols)
           
 AbstractGrid2DSquareCell create(java.io.File _Directory, long _NRows, long _NCols, java.math.BigDecimal[] _Dimensions)
           
abstract  AbstractGrid2DSquareCell create(java.io.File _Directory, long _NRows, long _NCols, java.math.BigDecimal[] dimensions, Grids_Environment _Grids_Environment, boolean handleOutOfMemoryError)
           
 AbstractGrid2DSquareCell create(long _NRows, long _NCols)
           
 AbstractGrid2DSquareCell create(long _NRows, long _NCols, java.math.BigDecimal[] _Dimensions)
           
 int get_ChunkNCols()
          Returns a copy of this._ChunkNCols.
 int get_ChunkNRows()
          Returns a copy of this._ChunkNRows.
 java.math.BigDecimal[] get_Dimensions()
          Returns this._Dimensions
protected  java.io.File get_Directory()
          Returns a copy of this._Directory.
 java.io.File get_Directory(boolean handleOutOfMemoryError)
          Returns a copy of this._Directory.
 AbstractGridStatistics get_GridStatistics()
          Returns this._GridStatistics
protected  boolean gethandleOutOfMemoryError()
          Returns this._HandleOutOfMemoryError
 void set_ChunkNCols(int _ChunkNCols)
          Sets this._ChunkNCols to _ChunkNCols
 void set_ChunkNRows(int _ChunkNRows)
          Sets this._ChunkNRows to _ChunkNRows
 void set_Dimensions(java.math.BigDecimal[] _Dimensions)
          Sets this._Dimensions to _Dimensions
 void set_Directory(java.io.File _Directory)
          Sets this._Directory to _Directory.
 void set_GridStatistics(AbstractGridStatistics _GridStatistics)
          Sets this._GridStatistics to _GridStatistics
 void sethandleOutOfMemoryError(boolean handleOutOfMemoryError)
          Sets this._HandleOutOfMemoryError to _HandleOutOfMemoryError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_Grids_Environment

protected Grids_Environment _Grids_Environment

_Directory

protected java.io.File _Directory
A _Directory for swapping.


_ChunkNRows

protected int _ChunkNRows
The number of rows in a chunk.


_ChunkNCols

protected int _ChunkNCols
The number of columns in a chunk.


_Dimensions

protected java.math.BigDecimal[] _Dimensions
The Dimensions


_HandleOutOfMemoryError

protected boolean _HandleOutOfMemoryError
_HandleOutOfMemoryError

Constructor Detail

AbstractGrid2DSquareCellFactory

public AbstractGrid2DSquareCellFactory()
Method Detail

get_Directory

protected java.io.File get_Directory()
Returns a copy of this._Directory.


get_Directory

public java.io.File get_Directory(boolean handleOutOfMemoryError)
Returns a copy of this._Directory.


set_Directory

public void set_Directory(java.io.File _Directory)
Sets this._Directory to _Directory.


get_ChunkNRows

public int get_ChunkNRows()
Returns a copy of this._ChunkNRows.


set_ChunkNRows

public void set_ChunkNRows(int _ChunkNRows)
Sets this._ChunkNRows to _ChunkNRows


get_ChunkNCols

public int get_ChunkNCols()
Returns a copy of this._ChunkNCols.


set_ChunkNCols

public void set_ChunkNCols(int _ChunkNCols)
Sets this._ChunkNCols to _ChunkNCols


get_Dimensions

public java.math.BigDecimal[] get_Dimensions()
Returns this._Dimensions


set_Dimensions

public void set_Dimensions(java.math.BigDecimal[] _Dimensions)
Sets this._Dimensions to _Dimensions


get_GridStatistics

public AbstractGridStatistics get_GridStatistics()
Returns this._GridStatistics


set_GridStatistics

public void set_GridStatistics(AbstractGridStatistics _GridStatistics)
Sets this._GridStatistics to _GridStatistics


gethandleOutOfMemoryError

protected boolean gethandleOutOfMemoryError()
Returns this._HandleOutOfMemoryError


sethandleOutOfMemoryError

public void sethandleOutOfMemoryError(boolean handleOutOfMemoryError)
Sets this._HandleOutOfMemoryError to _HandleOutOfMemoryError


create

public AbstractGrid2DSquareCell create()
Returns:
AbstractGrid2DSquareCell loaded from this._Directory.

create

public AbstractGrid2DSquareCell create(long _NRows,
                                       long _NCols)
Parameters:
_NRows - The _NRows for the construct.
_NCols - The _NCols for the construct.
Returns:
AbstractGrid2DSquareCell with all values as _NoDataValues.

create

public AbstractGrid2DSquareCell create(java.io.File directory,
                                       long _NRows,
                                       long _NCols)
Parameters:
_NRows - The _NRows for the construct.
_NCols - The _NCols for the construct.
Returns:
AbstractGrid2DSquareCell with all values as _NoDataValues.

create

public AbstractGrid2DSquareCell create(long _NRows,
                                       long _NCols,
                                       java.math.BigDecimal[] _Dimensions)
Parameters:
_NRows - The _NRows for the construct.
_NCols - The _NCols for the construct.
_Dimensions - The cellsize and bounding box details for the construct.
Returns:
AbstractGrid2DSquareCell with all values as _NoDataValues.

create

public AbstractGrid2DSquareCell create(java.io.File _Directory,
                                       long _NRows,
                                       long _NCols,
                                       java.math.BigDecimal[] _Dimensions)
Parameters:
_Directory - The _Directory for swapping to file.
_NRows - The _NRows for the construct.
_NCols - The _NCols for the construct.
_Dimensions - The cellsize and bounding box details for the construct.
Returns:
AbstractGrid2DSquareCell with all values as _NoDataValues.

create

public abstract AbstractGrid2DSquareCell create(java.io.File _Directory,
                                                long _NRows,
                                                long _NCols,
                                                java.math.BigDecimal[] dimensions,
                                                Grids_Environment _Grids_Environment,
                                                boolean handleOutOfMemoryError)
Parameters:
_Directory - The _Directory for swapping to file.
_NRows - The _NRows for the construct.
_NCols - The _NCols for the construct.
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappable AbstractGrid2DSquareCell instances.
_HandleOutOfMemoryError - If true then OutOfMemoryErrors are caught in this method then swap operations are initiated prior to retrying. If false then OutOfMemoryErrors are caught and thrown.
Returns:
AbstractGrid2DSquareCell grid with all values as _NoDataValues.

create

public AbstractGrid2DSquareCell create(AbstractGrid2DSquareCell _Grid2DSquareCell)
Parameters:
_Grid2DSquareCell - The AbstractGrid2DSquareCell from which values are obtained.
Returns:
AbstractGrid2DSquareCell with all values as int values from _Grid2DSquareCell.

create

public AbstractGrid2DSquareCell create(AbstractGrid2DSquareCell grid2DSquareCell,
                                       long startRowIndex,
                                       long startColIndex,
                                       long endRowIndex,
                                       long endColIndex)
Parameters:
grid2DSquareCell - The AbstractGrid2DSquareCell from which values are obtained.
startRowIndex - The topmost row index of grid2DSquareCell thats values are used.
startColIndex - The leftmost column index of grid2DSquareCell thats values are used.
endRowIndex - The bottom row index of the grid2DSquareCell thats values are used.
endColIndex - The rightmost column index of grid2DSquareCell thats values are used.
Returns:
AbstractGrid2DSquareCell with values obtained from grid2DSquareCell.

create

public AbstractGrid2DSquareCell create(java.io.File _Directory,
                                       AbstractGrid2DSquareCell grid2DSquareCell,
                                       long startRowIndex,
                                       long startColIndex,
                                       long endRowIndex,
                                       long endColIndex)
Parameters:
_Directory - The _Directory to be used for storing data in files. Grid2DSquareCellInt information.
grid2DSquareCell - The AbstractGrid2DSquareCell from which values are obtained.
startRowIndex - The topmost row index of grid2DSquareCell thats values are used.
startColIndex - The leftmost column index of grid2DSquareCell thats values are used.
endRowIndex - The bottom row index of the grid2DSquareCell thats values are used.
endColIndex - The rightmost column index of grid2DSquareCell thats values are used.
Returns:
AbstractGrid2DSquareCell with values obtained from grid2DSquareCell.

create

public abstract AbstractGrid2DSquareCell create(java.io.File _Directory,
                                                AbstractGrid2DSquareCell grid2DSquareCell,
                                                long startRowIndex,
                                                long startColIndex,
                                                long endRowIndex,
                                                long endColIndex,
                                                Grids_Environment _Grids_Environment,
                                                boolean handleOutOfMemoryError)
Parameters:
_Directory - The _Directory to be used for storing data in files.
grid2DSquareCell - The AbstractGrid2DSquareCell from which values are obtained.
startRowIndex - The topmost row index of grid2DSquareCell thats values are used.
startColIndex - The leftmost column index of grid2DSquareCell thats values are used.
endRowIndex - The bottom row index of the grid2DSquareCell thats values are used.
endColIndex - The rightmost column index of grid2DSquareCell thats values are used.
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappable AbstractGrid2DSquareCell instances.
_HandleOutOfMemoryError - If true then OutOfMemoryErrors are caught in this method then swap operations are initiated prior to retrying. If false then OutOfMemoryErrors are caught and thrown.
Returns:
AbstractGrid2DSquareCell with values obtained from grid2DSquareCell.

create

public AbstractGrid2DSquareCell create(java.io.File gridFile)
Parameters:
gridFile - either a _Directory, or a formatted File with a specific extension containing the data and information about the AbstractGrid2DSquareCell to be returned.
Returns:
AbstractGrid2DSquareCell with values obtained from gridFile. If gridFile is a _Directory then it is assumed to contain a file called cache which can be opened into an object input stream and initailised as an instance of a class extending AbstractGrid2DSquareCell.

create

public AbstractGrid2DSquareCell create(java.io.File _Directory,
                                       java.io.File gridFile,
                                       long startRowIndex,
                                       long startColIndex,
                                       long endRowIndex,
                                       long endColIndex)
Parameters:
_Directory - The _Directory to be used for storing cached Grid2DSquareCellInt information.
gridFile - either a _Directory, or a formatted File with a specific extension containing the data and information about the AbstractGrid2DSquareCell to be returned.
startRowIndex - The topmost row index of the grid represented in gridFile thats values are used.
startColIndex - The leftmost column index of the grid represented in gridFile thats values are used.
endRowIndex - The bottom row index of the grid represented in gridFile thats values are used.
endColIndex - The rightmost column index of the grid represented in gridFile thats values are used. Default: _AbstractGrid2DSquareCell_HashSet to null; _HandleOutOfMemoryError to true.
Returns:
AbstractGrid2DSquareCell with values obtained from gridFile.

create

public abstract AbstractGrid2DSquareCell create(java.io.File _Directory,
                                                java.io.File gridFile,
                                                long startRowIndex,
                                                long startColIndex,
                                                long endRowIndex,
                                                long endColIndex,
                                                Grids_Environment _Grids_Environment,
                                                boolean handleOutOfMemoryError)
Parameters:
_Directory - The _Directory to be used for storing cached Grid2DSquareCellInt information.
gridFile - either a _Directory, or a formatted File with a specific extension containing the data and information about the AbstractGrid2DSquareCell to be returned.
startRowIndex - The topmost row index of the grid represented in gridFile thats values are used.
startColIndex - The leftmost column index of the grid represented in gridFile thats values are used.
endRowIndex - The bottom row index of the grid represented in gridFile thats values are used.
endColIndex - The rightmost column index of the grid represented in gridFile thats values are used.
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappable AbstractGrid2DSquareCell instances.
_HandleOutOfMemoryError - If true then OutOfMemoryErrors are caught in this method then swap operations are initiated prior to retrying. If false then OutOfMemoryErrors are caught and thrown.
Returns:
AbstractGrid2DSquareCell with values obtained from gridFile.

create

public AbstractGrid2DSquareCell create(java.io.File _Directory,
                                       java.io.File gridFile,
                                       java.io.ObjectInputStream ois)
Parameters:
_Directory - The _Directory for swapping to file.
gridFile - A file containing the data to be used in construction.
ois - The ObjectInputStream to construct from.
Returns:
AbstractGrid2DSquareCell with values obtained from gridFile.

create

public abstract AbstractGrid2DSquareCell create(java.io.File _Directory,
                                                java.io.File gridFile,
                                                java.io.ObjectInputStream ois,
                                                Grids_Environment _Grids_Environment,
                                                boolean handleOutOfMemoryError)
Parameters:
_Directory - The _Directory for swapping to file.
gridFile - A file containing the data to be used in construction.
ois - The ObjectInputStream to construct from.
_AbstractGrid2DSquareCell_HashSet - A HashSet of swappable AbstractGrid2DSquareCell instances.
_HandleOutOfMemoryError - If true then OutOfMemoryErrors are caught in this method then swap operations are initiated prior to retrying. If false then OutOfMemoryErrors are caught and thrown.
Returns:
AbstractGrid2DSquareCell with values obtained from gridFile.