Package dap4.servlet
Class CDMData
- java.lang.Object
-
- dap4.servlet.CDMData
-
public class CDMData extends Object
Wrap a CDM Array and metadata to provide a DAP4 read API
-
-
Field Summary
Fields Modifier and Type Field Description protected ucar.ma2.Arrayarrayprotected CDMWrapcdmwrapprotected CDMDatacontainerprotected ucar.ma2.Indexindexprotected longrecordcountprotected longrecordindexprotected dap4.core.interfaces.ArraySchemeschemeprotected ucar.ma2.StructureDatastructdataprotected dap4.core.dmr.DapNodetemplate
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intfieldIndex(String name)ucar.ma2.ArraygetArray()CDMWrapgetCDMWrap()CDMDatagetContainer()protected CDMDatagetFieldCursor(CDMData container, int findex)ucar.ma2.IndexgetIndex()longgetRecordCount()longgetRecordIndex()dap4.core.interfaces.ArraySchemegetScheme()dap4.core.dmr.DapNodegetTemplate()booleanisAtomic()booleanisCompound()booleanisCompoundArray()booleanisField()booleanisScalar()Objectread(List<dap4.core.util.Slice> slices)Objectread(ucar.ma2.Index index)protected ObjectreadAtomic(List<dap4.core.util.Slice> slices)CDMDatareadField(int findex)CDMDatareadRecord(long i)protected CDMData[]readSequence(List<dap4.core.util.Slice> slices)protected CDMDatareadStructure(ucar.ma2.Index index)protected static dap4.core.interfaces.ArraySchemeschemeFor(dap4.core.dmr.DapVariable field)CDMDatasetArray(ucar.ma2.Array a)CDMDatasetIndex(ucar.ma2.Index count)CDMDatasetMember(ucar.ma2.StructureMembers.Member m)CDMDatasetRecordCount(long count)CDMDatasetRecordIndex(long index)CDMDatasetStructureData(ucar.ma2.StructureData sd)protected ObjectsliceAtomic(List<dap4.core.util.Slice> slices, ucar.ma2.Array array, dap4.core.dmr.DapVariable var)
-
-
-
Field Detail
-
scheme
protected dap4.core.interfaces.ArrayScheme scheme
-
cdmwrap
protected CDMWrap cdmwrap
-
template
protected dap4.core.dmr.DapNode template
-
container
protected CDMData container
-
array
protected ucar.ma2.Array array
-
structdata
protected ucar.ma2.StructureData structdata
-
recordindex
protected long recordindex
-
recordcount
protected long recordcount
-
index
protected ucar.ma2.Index index
-
-
Method Detail
-
getScheme
public dap4.core.interfaces.ArrayScheme getScheme()
-
getCDMWrap
public CDMWrap getCDMWrap()
-
getTemplate
public dap4.core.dmr.DapNode getTemplate()
-
getContainer
public CDMData getContainer()
-
getRecordIndex
public long getRecordIndex()
-
getRecordCount
public long getRecordCount()
-
getIndex
public ucar.ma2.Index getIndex()
-
setRecordIndex
public CDMData setRecordIndex(long index)
-
setRecordCount
public CDMData setRecordCount(long count)
-
setIndex
public CDMData setIndex(ucar.ma2.Index count)
-
read
public Object read(List<dap4.core.util.Slice> slices) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
read
public Object read(ucar.ma2.Index index) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
readField
public CDMData readField(int findex) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
getFieldCursor
protected CDMData getFieldCursor(CDMData container, int findex) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
isScalar
public boolean isScalar()
-
isField
public boolean isField()
-
isAtomic
public boolean isAtomic()
-
isCompound
public boolean isCompound()
-
isCompoundArray
public boolean isCompoundArray()
-
schemeFor
protected static dap4.core.interfaces.ArrayScheme schemeFor(dap4.core.dmr.DapVariable field)
-
readRecord
public CDMData readRecord(long i) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
fieldIndex
public int fieldIndex(String name) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
readAtomic
protected Object readAtomic(List<dap4.core.util.Slice> slices) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
sliceAtomic
protected Object sliceAtomic(List<dap4.core.util.Slice> slices, ucar.ma2.Array array, dap4.core.dmr.DapVariable var) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
readStructure
protected CDMData readStructure(ucar.ma2.Index index) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
readSequence
protected CDMData[] readSequence(List<dap4.core.util.Slice> slices) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
setArray
public CDMData setArray(ucar.ma2.Array a)
-
getArray
public ucar.ma2.Array getArray()
-
setStructureData
public CDMData setStructureData(ucar.ma2.StructureData sd)
-
setMember
public CDMData setMember(ucar.ma2.StructureMembers.Member m)
-
-