|
DJAVA | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectau.gov.aao.drama.SdsID
public class SdsID
This class implements an interface to the AAO's
DramaTask,
Arg| Field Summary | |
|---|---|
protected int |
id
The underlying SDS ID of the item. |
static String |
RCSID
The RCS (ACMM) ID. |
static int |
SDS_BYTE
SDS Type code value - Indicates a Byte (8 bit) type. |
static int |
SDS_CHAR
SDS Type code value - Indicates a Character type. |
static int |
SDS_DOUBLE
SDS Type code value - Indicates a double length floating point type. |
static int |
SDS_FLOAT
SDS Type code value - Indicates a floating point type. |
static int |
SDS_I64
SDS Type code value - Indicates a Long (64 bit) Integer type. |
static int |
SDS_INT
SDS Type code value - Indicates an Integer (32 bit) type. |
static int |
SDS_SHORT
SDS Type code value - Indicates a Short (16 bit) type. |
static int |
SDS_STRUCT
SDS Type code value - Indicates an Sds Structure type. |
static int |
SDS_UBYTE
SDS Type code value - Indicates an Unsigned Byte (8 bit) type. |
static int |
SDS_UI64
SDS Type code value - Indicates a Unsigned Long (64 bit) Integer type. |
static int |
SDS_UINT
SDS Type code value - Indicates an Unsigned Integer (32 bit) type. |
static int |
SDS_USHORT
SDS Type code value - Indicates an Unsigned Short (16 bit) type. |
| Constructor Summary | |
|---|---|
SdsID()
Create a SdsID containing a NULL Sds id. |
|
SdsID(int item)
Create a SdsID using a C ID type. |
|
SdsID(int item,
boolean free)
Create a SdsID using a C ID type, with free flag specified. |
|
SdsID(int item,
boolean free,
boolean delete)
Create a SdsID using a C ID type, with free and delete flags. |
|
SdsID(int item,
boolean free,
boolean del,
boolean readfree)
Create a SdsID using a C ID type, with all flags specifyable. |
|
SdsID(SdsID source)
Create a copy of an existing SDS item. |
|
SdsID(SdsID source,
int index)
Create an access to a existing SDS structure by index |
|
SdsID(SdsID array_id,
int[] dims)
Create an access to a cell of an existing SDS structure array. |
|
SdsID(SdsID source,
String name)
Create an access to an item in an SDS structure |
|
SdsID(SdsID parent_id,
String name,
int code)
Create a new child SDS item |
|
SdsID(SdsID parent_id,
String name,
int code,
int[] dims)
Create a new array child SDS item |
|
SdsID(String filename)
Create an SdsID, with the structure read from a file |
|
SdsID(String name,
int code)
Create a new top-level SDS item |
|
SdsID(String name,
int code,
int[] dims)
Create a new array top-level SDS item |
|
| Method Summary | |
|---|---|
void |
ClearDelete()
Clear DELETE flag. |
void |
ClearFree()
Clear FREE flag. |
static void |
ClearFreeIDWatch()
Clear watching of an ID. |
void |
ClearReadFree()
Clear READ-FREE flag. |
int |
Code()
Return the code of an item. |
void |
Debug()
Debugging routine - prints the SDS id and an integer to stdout. |
protected void |
Debug(String event)
|
protected void |
Debug(String event,
SdsID other,
String otherEvent)
|
void |
DeepCopy(SdsID source)
Make this object refer to a deep copy of the source object. |
void |
Delete()
Delete the item explictly. |
int |
Dims(int[] dims)
Returns the dims of an item, |
void |
EnableFreeIDWatch()
Enable watching of this SDS id by low level SDS debugging code. |
void |
Extract()
Extract the item from its top level structure This method makes the current item a top-level item in it's own right. |
void |
FillArray(SdsID filler)
Fill a structured array with copies of a specified structure. |
protected void |
finalize()
Finalizer for the SdsID class. |
String[] |
Get(boolean reverse)
Get a string array from the SDS item. |
String |
Get(int offset)
Return string DATA from the SDS item into a string. |
void |
Get(int offset,
byte[] data)
Get byte (8 bit) DATA from the SDS item. |
void |
Get(int offset,
double[] data)
Get double length floating point DATA from the SDS item. |
void |
Get(int offset,
float[] data)
Get float DATA from the SDS item. |
void |
Get(int offset,
int[] data)
Get int (32 bit) DATA from the SDS item. |
void |
Get(int offset,
long[] data)
Get long (64 bit) DATA from the SDS item. |
void |
Get(int offset,
short[] data)
Get short (16 bit) DATA from the SDS item. |
String |
GetContructorLocation()
Returns a string giving the location from which the constructor for this object was invoked. |
int |
ID()
Return the SdsID as an integer. |
void |
Insert(SdsID to_insert)
Insert a new object into our object. |
void |
Insert(SdsID to_insert,
int[] dims)
Insert a new object into a structured array item. |
void |
List()
List the SDS structure to stdiout. |
String |
Name()
Return the name of an item |
void |
Outlives()
Mark the SDS item as outliving the Java object. |
void |
Put(int offset,
byte[] data)
Put byte (8 bit) DATA to the SDS item. |
void |
Put(int offset,
double[] data)
Put double DATA to the SDS item. |
void |
Put(int offset,
float[] data)
Put float DATA to the SDS item. |
void |
Put(int offset,
int[] data)
Put int (32 bit) DATA to the SDS item. |
void |
Put(int offset,
long[] data)
Put long (64 bit) DATA to the SDS item. |
void |
Put(int offset,
short[] data)
Put short (16 bit) DATA to the SDS item. |
void |
Rename(String name)
Rename an SDS item. |
void |
Resize(int[] dims)
Resize an SDS array. |
static void |
SetDebugging(boolean flag)
Enable/Disable debugging (to stdout) of various SDS operations. |
void |
SetDelete()
Set DELETE flag. |
void |
SetFree()
Set FREE flag. |
void |
SetReadFree()
Set READ-FREE flag. |
void |
ShallowCopyNoOutlive(SdsID source)
Make this id refer to the same id as another object but don't outlive it. |
void |
ShallowCopyOutlive(SdsID source)
Make this id refer to the same id as another object and outlive it. |
void |
StuffUp()
Debugging test routine. |
String |
toString()
Convert an Sds structure to a string using the ArgToString C function. |
void |
Write(String filename)
Write the SDS structure to a specified file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String RCSID
public static final int SDS_STRUCT
public static final int SDS_CHAR
public static final int SDS_UBYTE
public static final int SDS_BYTE
public static final int SDS_USHORT
public static final int SDS_SHORT
public static final int SDS_UINT
public static final int SDS_INT
public static final int SDS_FLOAT
public static final int SDS_DOUBLE
public static final int SDS_I64
public static final int SDS_UI64
protected int id
| Constructor Detail |
|---|
public SdsID()
public SdsID(int item)
item - An integer representation of an SDS ID.
public SdsID(int item,
boolean free)
item - An integer representation of an SDS ID.free - Set true if SDS ID is to be freeed when the the Java object
is finalized, false if this is not to be done.
public SdsID(int item,
boolean free,
boolean delete)
item - An integer representation of an SDS ID.free - Set true if SDS ID is to be freeed when the the Java object
is finalized, false if this is not to be done.delete - Set true if underlying SDS structure is to be deleted
when the the Java object is finalized, false if this is
not to be done.
public SdsID(int item,
boolean free,
boolean del,
boolean readfree)
item - An integer representation of an SDS ID.free - Set true if SDS ID is to be freeed when the the Java object
is finalized, false if this is not to be done.del - Set true if underlying SDS structure is to be deleted
when the the Java object is finalized, false if this is
not to be done.readfree - Set true if SdsReadFree is to be invoked on the
SDS ID when the object is finalized - used if ID is of
an SDS structure which has been read from a file.
public SdsID(String filename)
throws DramaException
filename - The file to read the SDS structure from
DramaException - Thrown on errors in the DRAMA code.
public SdsID(SdsID parent_id,
String name,
int code)
throws DramaException
parent_id - The SDS structure to create this item within.name - The name of this new itemcode - The SDS Code for the item type.
DramaException - Thrown on errors in the DRAMA code.
public SdsID(String name,
int code)
throws DramaException
name - The name of this new itemcode - The SDS Code for the item type.
DramaException - Thrown on errors in the DRAMA code.
public SdsID(SdsID parent_id,
String name,
int code,
int[] dims)
throws DramaException
parent_id - The SDS structure to create this item within.name - The name of this new itemcode - The SDS Code for the item type.dims - The dimensions. Maximum of 7.
DramaException - Thrown on errors in the DRAMA code.
public SdsID(String name,
int code,
int[] dims)
throws DramaException
name - The name of this new itemcode - The SDS Code for the item type.dims - The dimensions. Maximum of 7.
DramaException - Thrown on errors in the DRAMA code.
public SdsID(SdsID array_id,
int[] dims)
throws DramaException
array_id - The SDS structure array we are accessing.dims - The dimensions of the element we are accessing
DramaException - Thrown on errors in the DRAMA code.
public SdsID(SdsID source)
throws DramaException
source - The structure we want to copy.
DramaException - Thrown on errors in the DRAMA code.
public SdsID(SdsID source,
String name)
throws DramaException
source - The SDS structure we are accessing.name - The name of the item to access.
DramaException - Thrown on errors in the DRAMA code.
public SdsID(SdsID source,
int index)
throws DramaException
source - The SDS structure we are accessingindex - The index to the item we want to access.
DramaException - Thrown on errors in the DRAMA code.| Method Detail |
|---|
protected void finalize()
throws DramaException,
Throwable
finalize in class ObjectDramaException - Thrown on errors in the DRAMA code.
Throwable - As per .public void SetFree()
public void ClearFree()
public void SetDelete()
public void ClearDelete()
public void SetReadFree()
public void ClearReadFree()
public void Outlives()
public void Delete()
throws DramaException
DramaException - Thrown on errors in the DRAMA code.
public void Extract()
throws DramaException
DramaException - Thrown on errors in the DRAMA code.
public void Get(int offset,
long[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array to fetch the data into. The size of this
array indicates how much data to fetch.
DramaException - Thrown on errors in the DRAMA code
in particular, Status code DJAVA__INSUFDATA if there
is not sufficent data to fill the array.
public void Get(int offset,
int[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array to fetch the data into. The size of this
array indicates how much data to fetch.
DramaException - Thrown on errors in the DRAMA code
in particular, Status code DJAVA__INSUFDATA if there
is not sufficent data to fill the array.
public void Get(int offset,
short[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array to fetch the data into. The size of this
array indicates how much data to fetch.
DramaException - Thrown on errors in the DRAMA code
in particular, Status code DJAVA__INSUFDATA if there
is not sufficent data to fill the array.
public void Get(int offset,
byte[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array to fetch the data into. The size of this
array indicates how much data to fetch.
DramaException - Thrown on errors in the DRAMA code
in particular, Status code DJAVA__INSUFDATA if there
is not sufficent data to fill the array.
public String Get(int offset)
throws DramaException
offset - The offset into the item to fetch
DramaException - Thrown on errors in the DRAMA code.
public String[] Get(boolean reverse)
throws DramaException
reverse - If false, then the first SDS array index is the
maximum size of each string and the second is the
number of items in the string array. If true, then
this representation is reversed.
DramaException - Thrown on errors in the DRAMA code.
public void Get(int offset,
float[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array to fetch the data into. The size of this
array indicates how much data to fetch.
DramaException - Thrown on errors in the DRAMA code
. * in particular, Status code DJAVA__INSUFDATA if there
is not sufficent data to fill the array.
public void Get(int offset,
double[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array to fetch the data into. The size of this
array indicates how much data to fetch.
DramaException - Thrown on errors in the DRAMA code
in particular, Status code DJAVA__INSUFDATA if there
is not sufficent data to fill the array.
public void Put(int offset,
long[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array of data to put. The size of this
array indicates how much data to put.
DramaException - Thrown on errors in the DRAMA code.
public void Put(int offset,
int[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array of data to put. The size of this
array indicates how much data to put.
DramaException - Thrown on errors in the DRAMA code.
public void Put(int offset,
short[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array of data to put. The size of this
array indicates how much data to put.
DramaException - Thrown on errors in the DRAMA code.
public void Put(int offset,
byte[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array of data to put. The size of this
array indicates how much data to put.
DramaException - Thrown on errors in the DRAMA code.
public void Put(int offset,
float[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array of data to put. The size of this
array indicates how much data to put.
DramaException - Thrown on errors in the DRAMA code.
public void Put(int offset,
double[] data)
throws DramaException
offset - The offset into the item to fetchdata - Array of data to put. The size of this
array indicates how much data to put.
DramaException - Thrown on errors in the DRAMA code.
public String Name()
throws DramaException
DramaException - Thrown on errors in the DRAMA code.
public int Code()
throws DramaException
DramaException - Thrown on errors in the DRAMA code.
public int Dims(int[] dims)
throws DramaException
dims - An array to contain the dimenions. If there are insufficent,
trailing dimensions are ignored (at the moment - we should
actually throw an exception).
DramaException - Thrown on errors in the DRAMA code.
public void Rename(String name)
throws DramaException
name - The name name for the item
DramaException - Thrown on errors in the DRAMA code.
public void Resize(int[] dims)
throws DramaException
dims - The new dimensions - maximum of 7 dimensions.
DramaException - Thrown on errors in the DRAMA code.
public void List()
throws DramaException
DramaException - Thrown on errors in the DRAMA code.
public void Write(String filename)
throws DramaException
filename - The name of the file.
DramaException - Thrown on errors in the DRAMA code.
public void Insert(SdsID to_insert)
throws DramaException
to_insert - The structure which inserted into this structure.
DramaException - Thrown on errors in the DRAMA code.
public void Insert(SdsID to_insert,
int[] dims)
throws DramaException
to_insert - The structure which inserted into this structure.dims - dims The dimensions at which to insert the structure.
DramaException - Thrown on errors in the DRAMA code.
public void FillArray(SdsID filler)
throws DramaException
filler - The structure to copy and fill the array with.
DramaException - Thrown on errors in the DRAMA code.
public void ShallowCopyOutlive(SdsID source)
throws DramaException
source - The item to shallow copy.
DramaException - Thrown on errors in the DRAMA code.
public void ShallowCopyNoOutlive(SdsID source)
throws DramaException
source - The item to shallow copy.
DramaException - Thrown on errors in the DRAMA code.public int ID()
public void DeepCopy(SdsID source)
throws DramaException
source - The item to deep copy.
DramaException - Thrown on errors in the DRAMA code.public void Debug()
public void StuffUp()
public String toString()
toString in class Object
public void EnableFreeIDWatch()
throws DramaException
DramaExceptionClearFreeIDWatch()
public static void ClearFreeIDWatch()
throws DramaException
DramaExceptionEnableFreeIDWatch()public static void SetDebugging(boolean flag)
flag - Set true to enable debugging, false to disable it.protected void Debug(String event)
protected void Debug(String event,
SdsID other,
String otherEvent)
public String GetContructorLocation()
|
DJAVA | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tjf@aaoepp.aao.gov.au.