|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopendap.dap.BaseType
opendap.dap.DConstructor
opendap.dap.DStructure
public class DStructure
A DStructure in OPeNDAP can hold N instances of any of
the other datatypes, including other structures.
BaseType,
DConstructor,
Serialized Form| Field Summary | |
|---|---|
protected java.util.Vector |
vars
The variables in this DStructure, stored in a
Vector of BaseType objects. |
| Constructor Summary | |
|---|---|
DStructure()
Constructs a new DStructure. |
|
DStructure(java.lang.String n)
Constructs a new DStructure with name n. |
|
| Method Summary | |
|---|---|
void |
addVariable(BaseType v,
int part)
Adds a variable to the container. |
void |
checkSemantics(boolean all)
Checks for internal consistency. |
java.lang.Object |
clone()
Returns a clone of this DSequence. |
void |
deserialize(java.io.DataInputStream source,
ServerVersion sv,
StatusUI statusUI)
Reads data from a DataInputStream. |
int |
elementCount(boolean leaves)
Returns the number of variables contained in this object. |
void |
externalize(java.io.DataOutputStream sink)
Writes data to a DataOutputStream. |
java.lang.String |
getTypeName()
Returns the OPeNDAP type name of the class instance as a String. |
BaseType |
getVar(int index)
Gets the indexed variable. |
BaseType |
getVariable(java.lang.String name)
Returns the named variable. |
java.util.Enumeration |
getVariables()
Return an Enumeration that can be used to iterate over the members of a Structure. |
void |
printDecl(java.io.PrintWriter os,
java.lang.String space,
boolean print_semi,
boolean constrained)
Write the variable's declaration in a C-style syntax. |
void |
printVal(java.io.PrintWriter os,
java.lang.String space,
boolean print_decl_p)
Prints the value of the variable, with its declaration. |
| Methods inherited from class opendap.dap.DConstructor |
|---|
addVariable, printXML, someChildHasAttributes |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector vars
DStructure, stored in a
Vector of BaseType objects.
| Constructor Detail |
|---|
public DStructure()
DStructure.
public DStructure(java.lang.String n)
DStructure with name n.
n - the name of the variable.| Method Detail |
|---|
public java.lang.Object clone()
DSequence. A deep copy is performed
on all data inside the variable.
clone in class BaseTypeDSequence.public java.lang.String getTypeName()
String.
getTypeName in class BaseTypeString.public int elementCount(boolean leaves)
leaves to true.
elementCount in class BaseTypeleaves - If true, count all the simple types in the `tree' of
variables rooted at this variable.
public void addVariable(BaseType v,
int part)
addVariable in class DConstructorv - the variable to add.part - ignored for DSequence.
public BaseType getVariable(java.lang.String name)
throws NoSuchVariableException
getVariable in class DConstructorname - the name of the variable.
NoSuchVariableException - if the named variable does not
exist in this container.
public BaseType getVar(int index)
throws NoSuchVariableException
BaseType from the indexth column from the
internal storage Vector.
getVar in class DConstructorindex - the index of the variable in the Vector Vars.
NoSuchVariableException - if the named variable does not
exist in this container.public java.util.Enumeration getVariables()
getVariables in class DConstructor
public void checkSemantics(boolean all)
throws BadSemanticsException
DStructure, verify
that the variables have unique names.
checkSemantics in class BaseTypeall - for complex constructor types, this flag indicates whether to
check the semantics of the member variables, too.
BadSemanticsException - if semantics are bad, explains why.BaseType.checkSemantics(boolean)
public void printDecl(java.io.PrintWriter os,
java.lang.String space,
boolean print_semi,
boolean constrained)
printDecl in class BaseTypeos - 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.constrained - a boolean value indicating whether to print
the declartion dependent on the projection information. This
is only used by Server side code.BaseType.printDecl(PrintWriter, String, boolean)
public void printVal(java.io.PrintWriter os,
java.lang.String space,
boolean print_decl_p)
printVal in class BaseTypeos - 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)
public void deserialize(java.io.DataInputStream source,
ServerVersion sv,
StatusUI statusUI)
throws java.io.IOException,
java.io.EOFException,
DataReadException
DataInputStream. This method is only used
on the client side of the OPeNDAP client/server connection.
deserialize in interface ClientIOsource - a DataInputStream to read from.sv - the ServerVersion returned by the server.statusUI - the StatusUI object to use for GUI updates
and user cancellation notification (may be null).
java.io.EOFException - if EOF is found before the variable is completely
deserialized.
java.io.IOException - thrown on any other InputStream exception.
DataReadException - if an unexpected value was read.ClientIO.deserialize(DataInputStream, ServerVersion, StatusUI)
public void externalize(java.io.DataOutputStream sink)
throws java.io.IOException
DataOutputStream. This method is used
primarily by GUI clients which need to download OPeNDAP data, manipulate
it, and then re-save it as a binary file.
externalize in interface ClientIOsink - a DataOutputStream to write to.
java.io.IOException - thrown on any OutputStream
exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||