|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopendap.dap.DAPNode
opendap.dap.DArrayDimension
public final class DArrayDimension
This class holds information about each dimension in a DArray
.
Each array dimension carries with it its own projection information, as
well as it's name and size.
The projection information takes the form of three integers: the start,
stop, and stride values. This is clearest with an example. Consider a
one-dimensional array 10 elements long. If the start value of the
dimension constraint is 3, then the constrained array appears to be seven
elements long. If the stop value is changed to 7, then the array appears
to be five elements long. If the stride is changed to two, the array will
appear to be 3 elements long. Array constraints are written as
[start:stride:stop]
.
DArray
,
Serialized FormNested Class Summary | |
---|---|
static class |
DArrayDimension.Slice
|
Nested classes/interfaces inherited from class opendap.dap.DAPNode |
---|
DAPNode.CloneMap |
Field Summary |
---|
Fields inherited from class opendap.dap.DAPNode |
---|
_name, _nameEncoded |
Constructor Summary | |
---|---|
DArrayDimension(int size,
String name)
Construct a new DArrayDimension. |
Method Summary | |
---|---|
DAPNode |
cloneDAG(DAPNode.CloneMap map)
Returns a clone of this Array . |
DArray |
getContainer()
|
int |
getSize()
Get the dimension size. |
int |
getStart()
Get the projection start point for this dimension. |
int |
getStop()
Get the projection stop point for this dimension. |
int |
getStride()
Get the projection stride size for this dimension. |
void |
printConstraint(PrintWriter os)
|
void |
setContainer(DArray da)
|
void |
setProjection(int start,
int stride,
int stop)
Set the projection information for this dimension. |
void |
setSize(int size)
Set the dimension size. |
Methods inherited from class opendap.dap.DAPNode |
---|
clone, cloneDAG, getClearName, getEncodedName, getParent, isProject, setClearName, setEncodedName, setParent, setProject, setProject, setProjected |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DArrayDimension(int size, String name)
size
- The size of the dimension.name
- The dimension's name, or null if no name.Method Detail |
---|
public int getSize()
public void setSize(int size)
public int getStart()
public int getStride()
public int getStop()
public void setContainer(DArray da)
public DArray getContainer()
public void printConstraint(PrintWriter os)
public void setProjection(int start, int stride, int stop) throws InvalidDimensionException
start
stride
and stop
are checked to verify that they make sense relative to each other and to
the size of this dimension. If not an Invalid ParameterException is thrown.
The general rule is: 0<=start<size, 0<stride, 0<=stop<size, start<=stop.
start
- The starting point for the projection of this DArrayDimension
.stride
- The size of the stride for the projection of this DArrayDimension
.stop
- The stopping point for the projection of this DArrayDimension
.
InvalidDimensionException
public DAPNode cloneDAG(DAPNode.CloneMap map) throws CloneNotSupportedException
Array
.
See DAPNode.cloneDag()
cloneDAG
in class DAPNode
map
- track previously cloned nodes
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |