|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgsfc.nssdc.cdf.Entry
public class Entry
This class describes a CDF global or variable attribute entry.
Note: In the Java CDF API there is no concept of an rEntry since r variables are not supported. Only z variables are supported since it is far superior and efficient than r variables.
Attribute
Field Summary |
---|
Method Summary | |
---|---|
static Entry |
create(Attribute myAttribute,
long id,
long dataType,
java.lang.Object data)
Creates a new global or variable attribute entry. |
void |
delete()
Deletes this entry. |
java.lang.Object |
getData()
Gets the data for this entry. |
long |
getDataType()
Gets the CDF data type of this entry. |
long |
getID()
Gets the ID of this entry. |
java.lang.String |
getName()
Gets the name of this entry. |
long |
getNumElements()
Gets the number of elements in this entry. |
void |
putData(long dataType,
java.lang.Object data)
Put the entry data into the CDF. |
void |
rename(java.lang.String name)
This method is here as a placeholder since the Entry class implements the CDFObject interface that includes "rename". |
void |
updateDataSpec(long dataType,
long numElements)
Update the data specification (data type and number of elements) of the entry. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Entry create(Attribute myAttribute, long id, long dataType, java.lang.Object data) throws CDFException
Attribute project = Attribute.create(cdf, "Project", GLOBAL_SCOPE); Entry.create(project, 0, CDF_CHAR, "Project name: IMAGE"); Entry.create(project, 1, CDF_CHAR, "Description 1"); Entry.create(project, 2, CDF_CHAR, "Description 2");The following example creates a variable attribute entry for the variable "Longitude" associated with the attribute "VALIDMIN":
Variable longitude = cdf.getVariable("Longitude"); Attribute validMin = Attribute.create(cdf, "VALIDMIN", VARIABLE_SCOPE); Entry.create(validMin, longitude.getID(), CDF_INT2, new Short((short)10));OR
longitude.putEntry(validMin, CDF_INT2, new Short((short)180));
myAttribute
- the attribute to which this entry belongs id
- the entry id dataType
- the CDF data type for this entry that should be one
of the following:
data
- the entry data to be added
CDFException
- if there is a problem creating an entrypublic void delete() throws CDFException
delete
in interface CDFObject
CDFException
- if there is a problem deleting this entrypublic long getDataType()
public long getNumElements()
Entry data Number of elements ---------- ------------------ 10 1 20.8 1 10 20 30 3 20.8 20.9 2 "Upper Limits" 12
public java.lang.Object getData()
public long getID()
public java.lang.String getName()
This method overrides the getName() method defined in the Java Object class. If this method is called explicitly or implicitly (i.e. just the entry name by itself), it returns the string representation of the entry ID.
getName
in interface CDFObject
public void rename(java.lang.String name) throws CDFException
rename
in interface CDFObject
name
- - not applicable
CDFException
- - not applicablepublic void updateDataSpec(long dataType, long numElements) throws CDFException
CDFException
public void putData(long dataType, java.lang.Object data) throws CDFException
CDFException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |