public abstract class MetaData
extends java.lang.Object
Constructor and Description |
---|
MetaData() |
Modifier and Type | Method and Description |
---|---|
boolean |
existsVariable(java.lang.String varName)
Returns whether there is a variable with the given name.
|
java.lang.Object |
getAttribute(java.lang.String atr)
Returns value of the first entry for the named global attribute.
|
java.lang.Object |
getAttribute(java.lang.String varName,
java.lang.String aname)
Returns value of the named attribute for specified variable.For a character string attribute, a Vector of String is returned.For a numeric attribute, a Vector of size 1 is returned.The
single element of the Vector is a long[] if attribute's type is long;
For all other numeric types, the element is a double[].
|
java.util.Vector<AttributeEntry> |
getAttributeEntries(java.lang.String aname)
Returns list of
AttributeEntry objects for the
named global attribute. |
java.util.Vector<AttributeEntry> |
getAttributeEntries(java.lang.String varName,
java.lang.String aname)
Returns list of
AttributeEntry objects for
the named attribute for the named variable. |
int |
getBlockingFactor(java.lang.String varName)
Returns the blocking factor used to compress this variable.See the CDF User's Guide for details.
|
java.nio.ByteOrder |
getByteOrder()
Returns ByteOrder.LITTLE_ENDIAN, or ByteOrder.BIG_ENDIAN depending
the CDF encoding
|
int |
getDataItemSize(java.lang.String varName)
Returns size of a data item for the given variable.
|
int[] |
getDimensions(java.lang.String varName)
Returns dimensions the given variable.
|
int[] |
getEffectiveDimensions(java.lang.String varName)
Returns effective dimensions of the given variable.Dimensions for which dimVarys is false are ignored.
|
int |
getEffectiveRank(java.lang.String varName)
Returns effective rank of this variable.Dimensions for which dimVarys is false do not count.
|
java.util.Vector<java.lang.Integer> |
getElementCount(java.lang.String varName)
Return element count for this variable's dimensions.
|
GlobalAttribute |
getGlobalAttribute(java.lang.String atr)
Returns
GlobalAttribute object for
the named global attribute. |
int |
getLastLeapSecondId()
Identifies the leap second table used in creating this CDF.Returns the id of the last leap second in the leap second table.
|
int |
getNumber(java.lang.String varName)
Returns given variable's number property.
|
int |
getNumberOfElements(java.lang.String varName)
Returns given variable's 'number of elements' property.
|
int |
getNumberOfValues(java.lang.String varName)
Returns 'number of values' property of the given variable.
|
java.lang.Object |
getPadValue(java.lang.String varName)
Returns 'pad value' property of the given variable.
|
java.lang.Object |
getPadValue(java.lang.String varName,
boolean preservePrecision)
Returns 'pad value' property of the given variable subject to the given
precision preservation constraint.
|
int[] |
getRecordRange(java.lang.String varName)
Returns record range for this variable
|
java.lang.String |
getTimeVariableName(java.lang.String varName)
Returns the name of the time variable for the given variable.
|
int |
getType(java.lang.String varName)
Returns CDF type of the variable.
|
java.lang.String[] |
getVariableNames()
Returns names of variables in the CDF
|
java.lang.String[] |
getVariableNames(java.lang.String type)
returns variable names of a given VAR_TYPE in a String[]
|
boolean[] |
getVarys(java.lang.String varName)
Returns 'varys' property of the given variable.
|
int |
globalAttributeEntryCount(java.lang.String atr)
Returns number of entries for the named global attribute.
|
java.lang.String[] |
globalAttributeNames()
Returns names of global attributes.
|
boolean |
isCompatible(java.lang.String varName,
java.lang.Class cl)
returns whether conversion of this variable to type specified by
cl is supported while preserving precision.
|
boolean |
isCompatible(java.lang.String varName,
java.lang.Class cl,
boolean preserve)
Returns whether conversion of this variable to type specified by
cl is supported under the given precision preserving constraint.
|
boolean |
isCompressed(java.lang.String varName)
Returns whether the values of the variable are represented in a
compressed form in the CDF.For variables declared to be compressed, CDF specification allows
the values to be stored in uncompressed form if the latter results in
a smaller size.
|
boolean |
isMissingRecords(java.lang.String varName)
Shows whether one or more records (in the range returned by
getRecordRange()) are missing.
|
boolean |
isTimeType(java.lang.String varName)
Returns whether the given variable represents time.
|
boolean |
isTypeR(java.lang.String varName)
Returns whether a variable of type r-variable..See the CDF User's Guide for details.
|
boolean |
missingRecordValueIsPad(java.lang.String varName)
Return whether the missing record should be assigned the pad
value.
|
boolean |
missingRecordValueIsPrevious(java.lang.String varName)
Return whether the missing record should be assigned the last
seen value.If none has been seen, pad value is assigned.
|
boolean |
recordVariance(java.lang.String varName)
Returns an indication of the record varying property of a variable.
|
boolean |
rowMajority()
Returns whether the arrays are stored in row major order in the source
|
abstract java.lang.String |
userTimeVariableName(java.lang.String varName) |
java.lang.String[] |
variableAttributeNames(java.lang.String name)
Returns names of variable attributes.
|
public final java.nio.ByteOrder getByteOrder()
public final boolean rowMajority()
public final java.lang.String[] getVariableNames()
public final java.lang.String[] getVariableNames(java.lang.String type)
type
- public final java.lang.String[] globalAttributeNames()
public final java.lang.String[] variableAttributeNames(java.lang.String name)
name
- public final java.lang.Object getAttribute(java.lang.String atr)
For a character string attribute, a String[] is returned For a numeric attribute, a long[] is returned for long type; double[] is returned for all other numeric types.
This method is deprecated. Use getGlobalAttribute(String atr)
method to extract all entries.
atr
- public final int globalAttributeEntryCount(java.lang.String atr) throws CDFException.ReaderError
atr
- CDFException.ReaderError
public final java.lang.Object getAttribute(java.lang.String varName, java.lang.String aname) throws CDFException.ReaderError
varName
- aname
- CDFException.ReaderError
- if variable does not existpublic final java.util.Vector<AttributeEntry> getAttributeEntries(java.lang.String varName, java.lang.String aname) throws CDFException.ReaderError
AttributeEntry
objects for
the named attribute for the named variable.varName
- aname
- CDFException.ReaderError
- if variable does not existpublic final java.util.Vector<AttributeEntry> getAttributeEntries(java.lang.String aname) throws CDFException.ReaderError
AttributeEntry
objects for the
named global attribute.aname
- CDFException.ReaderError
public final GlobalAttribute getGlobalAttribute(java.lang.String atr) throws CDFException.ReaderError
GlobalAttribute
object for
the named global attribute.atr
- CDFException.ReaderError
public final boolean recordVariance(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final boolean isCompressed(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final int getType(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final int getDataItemSize(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final int getNumber(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final int getNumberOfElements(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final int getNumberOfValues(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final java.lang.Object getPadValue(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final java.lang.Object getPadValue(java.lang.String varName, boolean preservePrecision) throws CDFException.ReaderError
varName
- preservePrecision
- CDFException.ReaderError
- if variable does not existpublic final int[] getDimensions(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final boolean[] getVarys(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final int getEffectiveRank(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final boolean isMissingRecords(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final int[] getRecordRange(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final boolean isCompatible(java.lang.String varName, java.lang.Class cl) throws CDFException.ReaderError
varName
- cl
- CDFException.ReaderError
- if variable does not existpublic final boolean isCompatible(java.lang.String varName, java.lang.Class cl, boolean preserve) throws CDFException.ReaderError
varName
- preserve
- cl
- CDFException.ReaderError
- if variable does not existpublic final boolean missingRecordValueIsPrevious(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final boolean missingRecordValueIsPad(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final java.util.Vector<java.lang.Integer> getElementCount(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final int[] getEffectiveDimensions(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final boolean isTimeType(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
- if variable does not existpublic final boolean existsVariable(java.lang.String varName)
varName
- public abstract java.lang.String userTimeVariableName(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
public final java.lang.String getTimeVariableName(java.lang.String varName) throws java.lang.Throwable
varName
- variable nameCDFException.ReaderError
- if variable does not existjava.lang.Throwable
public final int getLastLeapSecondId()
public final int getBlockingFactor(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError
public final boolean isTypeR(java.lang.String varName) throws CDFException.ReaderError
varName
- CDFException.ReaderError