|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dods.dap.BaseType dods.dap.DConstructor dods.dap.DGrid dods.dap.Server.SDGrid
public abstract class SDGrid
Holds a DODS Server Grid
value.
BaseType
Field Summary |
---|
Fields inherited from class dods.dap.DGrid |
---|
ARRAY, arrayVar, MAPS, mapVars |
Constructor Summary | |
---|---|
SDGrid()
Constructs a new SDGrid . |
|
SDGrid(String n)
Constructs a new SDGrid with name n . |
Method Summary | |
---|---|
void |
addVariable(dods.dap.BaseType v,
int part)
Adds a variable to the container. |
boolean |
equal(dods.dap.BaseType bt)
The RelOps interface defines how each type responds to relational operators. |
int |
getStart(int dimension)
Gets the start value for the projection of the dimension indicated. |
int |
getStop(int dimension)
Gets the stop value for the projection of the dimension indicated. |
int |
getStride(int dimension)
Gets the stride value for the projection of the dimension indicated. |
boolean |
greater_eql(dods.dap.BaseType bt)
The Operator class contains a generalized implementation
of this method. |
boolean |
greater(dods.dap.BaseType bt)
The Operator class contains a generalized implementation
of this method. |
boolean |
isProject()
Is the given variable marked as projected? |
boolean |
isRead()
Get the value of the Read property. |
boolean |
isSynthesized()
Get the value of the Synthesized property. |
boolean |
less_eql(dods.dap.BaseType bt)
The Operator class contains a generalized implementation
of this method. |
boolean |
less(dods.dap.BaseType bt)
The Operator class contains a generalized implementation
of this method. |
boolean |
not_equal(dods.dap.BaseType bt)
The Operator class contains a generalized implementation
of this method. |
void |
printDecl(PrintWriter os,
String space,
boolean print_semi,
boolean constrained)
Write the variable's declaration in a C-style syntax. |
void |
printVal(PrintWriter os,
String space,
boolean print_decl_p)
Prints the value of the variable, with its declaration. |
int |
projectedComponents(boolean constrained)
How many prohected components of this Grid object? |
boolean |
projectionYieldsGrid()
When projected (using whatever the current constraint provides in the way of a projection) am I still a Grid? |
abstract boolean |
read(String datasetName,
Object specialO)
Read a value from the named dataset for this variable. |
boolean |
regexp(dods.dap.BaseType bt)
The Operator class contains a generalized implementation
of this method. |
void |
serialize(String dataset,
DataOutputStream sink,
CEEvaluator ce,
Object specialO)
Server-side serialization for DODS variables (sub-classes of BaseType ). |
void |
setProject(boolean state)
Set the state of this variable's projection. |
void |
setProject(boolean state,
boolean all)
Set the state of this variable's projection. |
void |
setProjection(int dimension,
int start,
int stride,
int stop)
Set the projection information for this dimension. |
void |
setRead(boolean state)
Set the Read property. |
void |
setSynthesized(boolean state)
Set the Synthesized property. |
Methods inherited from class dods.dap.DGrid |
---|
checkSemantics, clone, deserialize, elementCount, externalize, getTypeName, getVar, getVariable, getVariables |
Methods inherited from class dods.dap.DConstructor |
---|
addVariable |
Methods inherited from class dods.dap.BaseType |
---|
checkSemantics, elementCount, getLongName, getName, getParent, newPrimitiveVector, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printVal, printVal, printVal, setName, setParent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SDGrid()
SDGrid
.
public SDGrid(String n)
SDGrid
with name n
.
n
- the name of the variable.Method Detail |
---|
public boolean projectionYieldsGrid()
public int projectedComponents(boolean constrained)
public void printDecl(PrintWriter os, String space, boolean print_semi, boolean constrained)
printDecl
in class dods.dap.DGrid
os
- The PrintWriter
on which to print the
declaration.space
- Each line of the declaration will begin with the
characters in this string. Usually used for leading spaces.print_semi
- a boolean value indicating whether to print a
semicolon at the end of the declaration.BaseType.printDecl(PrintWriter, String, boolean)
public void printVal(PrintWriter os, String space, boolean print_decl_p)
printVal()
for this type:
All the various versions of printVal() will only
print a value, or a value with declaration, if the variable is
in the projection.
isProject()
for a particular variable returns
true
then printVal()
will print a value
(or a declaration and a value).
isProject()
for a particular variable returns
false
then printVal()
is basically a No-Op.
printVal
in class dods.dap.DGrid
os
- the PrintWriter
on which to print the value.space
- this value is passed to the printDecl
method,
and controls the leading spaces of the output.print_decl_p
- a boolean value controlling whether the
variable declaration is printed as well as the value.BaseType.printVal(PrintWriter, String, boolean)
,
ServerMethods.isProject()
public void addVariable(dods.dap.BaseType v, int part)
DGrid
in order to add array projection
functionality.
addVariable
in class dods.dap.DGrid
v
- the variable to add.part
- the part of the DGrid
to be modified. Allowed
values are ARRAY
or MAPS
.
IllegalArgumentException
- if an invalid part was given.public void setProject(boolean state, boolean all)
true
means
that this variable is part of the current projection as defined by
the current constraint expression, otherwise the current projection
for this variable should be false
.
setProject
in interface ServerMethods
state
- true
if the variable is part of the current
projection, false
otherwise.all
- If true
, set the Project property of all the
members (and their children, and so on).CEEvaluator
public void setProject(boolean state)
true
means
that this variable is part of the current projection as defined by
the current constraint expression, otherwise the current projection
for this variable should be false
.
This is equivalent to setProjection(state
,
true
).
setProject
in interface ServerMethods
state
- true
if the variable is part of the current
projection, false
otherwise.CEEvaluator
public boolean isProject()
true
, otherwise it
should return false
.
isProject
in interface ServerMethods
true
if the variable is part of the current
projections, false
otherwise.CEEvaluator
,
setProject(boolean)
,
setProjection(int,int,int,int)
public boolean equal(dods.dap.BaseType bt) throws InvalidOperatorException, RegExpException, SBHException
equal
in interface RelOps
equal
in interface ServerMethods
InvalidOperatorException
RegExpException
SBHException
Operator
public boolean not_equal(dods.dap.BaseType bt) throws InvalidOperatorException, RegExpException, SBHException
ServerMethods
Operator
class contains a generalized implementation
of this method. It should be used unless a localized
architecture/implementation requires otherwise.
not_equal
in interface RelOps
not_equal
in interface ServerMethods
InvalidOperatorException
RegExpException
SBHException
Operator
public boolean greater(dods.dap.BaseType bt) throws InvalidOperatorException, RegExpException, SBHException
ServerMethods
Operator
class contains a generalized implementation
of this method. It should be used unless a localized
architecture/implementation requires otherwise.
greater
in interface RelOps
greater
in interface ServerMethods
InvalidOperatorException
RegExpException
SBHException
Operator
public boolean greater_eql(dods.dap.BaseType bt) throws InvalidOperatorException, RegExpException, SBHException
ServerMethods
Operator
class contains a generalized implementation
of this method. It should be used unless a localized
architecture/implementation requires otherwise.
greater_eql
in interface RelOps
greater_eql
in interface ServerMethods
InvalidOperatorException
RegExpException
SBHException
Operator
public boolean less(dods.dap.BaseType bt) throws InvalidOperatorException, RegExpException, SBHException
ServerMethods
Operator
class contains a generalized implementation
of this method. It should be used unless a localized
architecture/implementation requires otherwise.
less
in interface RelOps
less
in interface ServerMethods
InvalidOperatorException
RegExpException
SBHException
Operator
public boolean less_eql(dods.dap.BaseType bt) throws InvalidOperatorException, RegExpException, SBHException
ServerMethods
Operator
class contains a generalized implementation
of this method. It should be used unless a localized
architecture/implementation requires otherwise.
less_eql
in interface RelOps
less_eql
in interface ServerMethods
InvalidOperatorException
RegExpException
SBHException
Operator
public boolean regexp(dods.dap.BaseType bt) throws InvalidOperatorException, RegExpException, SBHException
ServerMethods
Operator
class contains a generalized implementation
of this method. It should be used unless a localized
architecture/implementation requires otherwise.
regexp
in interface RelOps
regexp
in interface ServerMethods
InvalidOperatorException
RegExpException
SBHException
Operator
public void setSynthesized(boolean state)
setSynthesized
in interface ServerMethods
state
- If true
then the variable is considered a
synthetic variable and no part of DODS will ever try to read it from a
file, otherwise if false
the variable is considered a
normal variable whose value should be read using the
read()
method. By default this property is false.isSynthesized()
,
read(String, Object)
public boolean isSynthesized()
isSynthesized
in interface ServerMethods
true
if this is a synthetic variable,
false
otherwise.public void setRead(boolean state)
read()
method. Once read the Read property is
true
. Use this function to manually set the property
value. By default this property is false.
setRead
in interface ServerMethods
state
- true
if the variable has been read,
false
otherwise.isRead()
,
read(String, Object)
public boolean isRead()
isRead
in interface ServerMethods
true
if the variable has been read,
false
otherwise.read(String, Object)
,
setRead(boolean)
public abstract boolean read(String datasetName, Object specialO) throws dods.dap.NoSuchVariableException, IOException, EOFException
read
in interface ServerMethods
datasetName
- String identifying the file or other data store
from which to read a vaue for this variable.specialO
- This Object
is a goody that is used by Server implementations
to deliver important, and as yet unknown, stuff to the read method. If you
don't need it, make it a null
.
true
if more data remains to be read, otherwise
false
. This is an abtsract method that must be implemented
as part of the installation/localization of a DODS server.
IOException
EOFException
dods.dap.NoSuchVariableException
public void serialize(String dataset, DataOutputStream sink, CEEvaluator ce, Object specialO) throws dods.dap.NoSuchVariableException, SDODSException, IOException
BaseType
).
This does not send the entire class as the Java Serializable
interface does, rather it sends only the binary data values. Other software
is responsible for sending variable type information (see DDS
).
Writes data to a DataOutputStream
. This method is used
on the server side of the DODS client/server connection, and possibly
by GUI clients which need to download DODS data, manipulate it, and
then re-save it as a binary file.
serialize
in interface ServerMethods
sink
- a DataOutputStream
to write to.dataset
- a String
indicated which dataset to read
from (Or something else if you so desire).ce
- the CEEvaluator
to use in the parse process.
IOException
- thrown on any OutputStream
exception.
dods.dap.NoSuchVariableException
SDODSException
BaseType
,
DDS
,
ServerDDS
public void setProjection(int dimension, int start, int stride, int stop) throws InvalidParameterException, SBHException
DArray
is
retrieved and then the DArrayDimension
associated with the dimension
specified is retrieved and the start
stride
and stop
parameters are passed to its
setProjection()
method.
setProjection
in interface ServerArrayMethods
dimension
- The dimension that is to be modified.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
.
InvalidParameterException
SBHException
DArray
,
DArrayDimension
public int getStart(int dimension) throws InvalidParameterException
dimension
indicated. The parameter
dimension
is checked against the instance of the
SDArray
for bounds violation.
getStart
in interface ServerArrayMethods
dimension
- The dimension from whose projection to retrieve the
start
value.
InvalidParameterException
public int getStride(int dimension) throws InvalidParameterException
dimension
indicated. The parameter
dimension
is checked against the instance of the
SDArray
for bounds violation.
getStride
in interface ServerArrayMethods
dimension
- The dimension from whose projection to retrieve the
stride
value.
InvalidParameterException
public int getStop(int dimension) throws InvalidParameterException
dimension
indicated. The parameter
dimension
is checked against the instance of the
SDArray
for bounds violation.
getStop
in interface ServerArrayMethods
dimension
- The dimension from whose projection to retrieve the
stop
value.
InvalidParameterException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |