Package thredds.server.opendap
Class NcSDStructure
- java.lang.Object
-
- opendap.dap.DAPNode
-
- opendap.dap.BaseType
-
- opendap.dap.DConstructor
-
- opendap.dap.DStructure
-
- thredds.server.opendap.servers.SDStructure
-
- thredds.server.opendap.NcSDStructure
-
- All Implemented Interfaces:
Serializable,Cloneable,opendap.dap.ClientIO,RelOps,ServerMethods
public class NcSDStructure extends SDStructure
Wraps a netcdf Structure, as an SDStructure.2- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<opendap.dap.BaseType>memberBTlistprotected NcSDStructureorgprotected ucar.ma2.StructureDatasdata
-
Constructor Summary
Constructors Constructor Description NcSDStructure(NcSDStructure org, ucar.ma2.StructureData sdata)NcSDStructure(ucar.nc2.Structure s, List<opendap.dap.BaseType> list)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ucar.nc2.VariablegetVariable()booleanread(String datasetName, Object specialO)Read a value from the named dataset for this variable.voidserialize(String dataset, DataOutputStream sink, CEEvaluator ce, Object specialO)Server-side serialization for OPeNDAP variables (sub-classes ofBaseType).voidsetData(ucar.ma2.StructureData sdata)-
Methods inherited from class thredds.server.opendap.servers.SDStructure
equal, greater, greater_eql, isRead, isSynthesized, less, less_eql, not_equal, printDecl, printVal, printXML, regexp, setProject, setRead, setSynthesized
-
Methods inherited from class opendap.dap.DStructure
addVariable, checkSemantics, cloneDAG, deserialize, elementCount, externalize, getTypeName, getVar, getVarCount, getVariable, getVariables
-
Methods inherited from class opendap.dap.BaseType
addAttributeAlias, addAttributeContainer, appendAttribute, appendAttribute, appendAttributeContainer, checkSemantics, delAttribute, delAttribute, elementCount, getAttribute, getAttribute, getAttributeNames, getAttributeTable, getLongName, hasAttributes, newPrimitiveVector, printAttributes, printAttributes, printAttributes, printAttributes, printConstraint, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printVal, printVal, printVal, printXML, printXML, printXML, printXML, setClearName
-
Methods inherited from class opendap.dap.DAPNode
clone, cloneDAG, getClearName, getEncodedName, getParent, isProject, setEncodedName, setParent, setProject, setProjected
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface thredds.server.opendap.servers.ServerMethods
isProject, setProject
-
-
-
-
Field Detail
-
memberBTlist
protected List<opendap.dap.BaseType> memberBTlist
-
org
protected NcSDStructure org
-
sdata
protected ucar.ma2.StructureData sdata
-
-
Constructor Detail
-
NcSDStructure
public NcSDStructure(ucar.nc2.Structure s, List<opendap.dap.BaseType> list)Constructor.- Parameters:
s- the netcdf Structurelist- of the member variables
-
NcSDStructure
public NcSDStructure(NcSDStructure org, ucar.ma2.StructureData sdata)
-
-
Method Detail
-
getVariable
public ucar.nc2.Variable getVariable()
-
read
public boolean read(String datasetName, Object specialO) throws opendap.dap.NoSuchVariableException, IOException
Description copied from class:SDStructureRead a value from the named dataset for this variable.- Specified by:
readin interfaceServerMethods- Specified by:
readin classSDStructure- Parameters:
datasetName- String identifying the file or other data store from which to read a vaue for this variable.specialO- ThisObjectis 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 anull.- Returns:
trueif more data remains to be read, otherwisefalse. This is an abtsract method that must be implemented as part of the installation/localization of a OPeNDAP server.- Throws:
opendap.dap.NoSuchVariableException- When a variable can't be found.IOException- When there is a problem reading data.
-
setData
public void setData(ucar.ma2.StructureData sdata)
-
serialize
public void serialize(String dataset, DataOutputStream sink, CEEvaluator ce, Object specialO) throws opendap.dap.NoSuchVariableException, DAP2ServerSideException, IOException
Description copied from class:SDStructureServer-side serialization for OPeNDAP variables (sub-classes ofBaseType). This does not send the entire class as the JavaSerializableinterface does, rather it sends only the binary data values. Other software is responsible for sending variable type information (seeDDS). Writes data to aDataOutputStream. This method is used on the server side of the OPeNDAP client/server connection, and possibly by GUI clients which need to download OPeNDAP data, manipulate it, and then re-save it as a binary file.- Specified by:
serializein interfaceServerMethods- Overrides:
serializein classSDStructure- Parameters:
dataset- aStringindicated which dataset to read from (Or something else if you so desire).sink- aDataOutputStreamto write to.ce- theCEEvaluatorto use in the parse process.specialO- ThisObjectis a goody that is used by a Server implementations to deliver important, and as yet unknown, stuff to the read method. If you don't need it, make it anull.- Throws:
opendap.dap.NoSuchVariableException- When a variable cannot be found.DAP2ServerSideException- When there is a server error.IOException- thrown on anyOutputStreamexception.- See Also:
BaseType,DDS,ServerDDS
-
-