|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--SDDS.java.SDDS.SDDSColumn
The SDDS Column object is used by the SDDS File object. It was not the intention of the author to use this object directly but it is still supported. After initializing the SDDS Column the setupColumn method must be used to give the column a name and a valid data type (long, short, float, double, string, character). The setValues method is used next to give the column values for different pages. The writeValues method or the writeElement method can be used to print the column values for a particular page.
| Constructor Summary | |
SDDSColumn()
Create a new SDDS column that can be used to store column information for SDDS files. |
|
| Method Summary | |
boolean |
deletePage(int page)
Delete a page at the specified index |
void |
deleteRow(int page,
int row)
Deletes the value of the column at a chosen page and at a chosen row |
java.lang.String |
getDescription()
Returns the description of the column |
int |
getField_Length()
Returns the field length of the column |
java.lang.String |
getFormat_String()
Returns the format string of the column |
java.lang.String |
getName()
Returns the name of the column |
int |
getPageCount()
Returns the number of pages that the column contains |
int |
getRowCount(int page)
Returns the number of rows a page contains |
java.lang.String |
getSymbol()
Returns the symbol of the column |
int |
getType()
Returns the type of the column |
java.lang.String |
getUnits()
Returns the units of the column |
java.lang.Object[] |
getValues(int page,
boolean string_quotes)
Get the values of the column for a chosen page |
boolean |
insertPage(int page)
Inserts a blank page at the specified index |
void |
makeBlankPages(int lastpage)
Create blank pages up to the last page specified |
void |
setDescription(java.lang.String description)
Set the description of the column |
void |
setField_Length(int field_length)
Set the field length of the column |
void |
setFormat_String(java.lang.String format_string)
Set the format string of the column |
void |
setName(java.lang.String name)
Set the name of the column |
void |
setSymbol(java.lang.String symbol)
Set the symbol of the column |
void |
setUnits(java.lang.String units)
Set the units of the column |
void |
setupColumn(java.lang.String name,
java.lang.String symbol,
java.lang.String units,
java.lang.String description,
java.lang.String format_string,
int type,
int field_length)
Set up the column information. |
void |
setValues(double[] v,
int page,
int startRow)
Set the values of the column at a chosen page starting at the chosen row |
void |
setValues(long[] v,
int page,
int startRow)
Set the values of the column at a chosen page starting at the chosen row |
void |
setValues(java.lang.String[] v,
int page,
int startRow)
Set the values of the column at a chosen page starting at the chosen row |
boolean |
writeColumn(java.io.DataOutputStream dos,
int page)
Write the values of the column for a chosen page |
boolean |
writeElement(java.io.DataOutputStream dos,
int page,
int row,
boolean ascii)
Write the value of the column for a chosen page and row |
boolean |
writeElement(SDDS.java.SDDS.LEDataOutputStream ledos,
int page,
int row)
Write the little endian binary value of the column for a chosen page and row |
boolean |
writeHeader(java.io.DataOutputStream dos)
Write the header to a file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SDDSColumn()
| Method Detail |
public void setupColumn(java.lang.String name,
java.lang.String symbol,
java.lang.String units,
java.lang.String description,
java.lang.String format_string,
int type,
int field_length)
name - should be a valid name as defined by
SDDSUtil.isValidNamesymbol - may be nullunits - may be nulldescription - may be nullformat_string - may be nulltype - valid values are:
1 for double2 for float3 for long4 for short5 for string6 for characterfield_length - has no effect currentlypublic java.lang.String getName()
String value of the column name.public void setName(java.lang.String name)
name - name of the columnpublic java.lang.String getSymbol()
String value of the column symbol.public void setSymbol(java.lang.String symbol)
symbol - symbol of the columnpublic java.lang.String getUnits()
String value of the column units.public void setUnits(java.lang.String units)
units - units of the columnpublic java.lang.String getDescription()
String value of the column description.public void setDescription(java.lang.String description)
description - description of the columnpublic java.lang.String getFormat_String()
String value of the column format string.public void setFormat_String(java.lang.String format_string)
format_string - format string of the columnpublic int getType()
int value of the column type.public int getField_Length()
int value of the column field length.public void setField_Length(int field_length)
field_length - field length of the columnpublic int getPageCount()
int value of the number of pages the column contains.public int getRowCount(int page)
int value of the number of pages the column contains.-1 if the page value is invalid.public boolean insertPage(int page)
page - index of page to create inserttrue on successfalse on error.public boolean deletePage(int page)
page - index of page to deletetrue on successfalse on error.public void makeBlankPages(int lastpage)
lastpage - last page to create blank page
public void deleteRow(int page,
int row)
page - the page of the column, must be greater then 0row - the row of the column, must be greater then 0
public void setValues(long[] v,
int page,
int startRow)
value - a long precision number arraypage - the page of the column, must be greater then 0startRow - the row of the column, must be greater then 0
public void setValues(double[] v,
int page,
int startRow)
value - a double precision floating-point number arraypage - the page of the column, must be greater then 0startRow - the row of the column, must be greater then 0
public void setValues(java.lang.String[] v,
int page,
int startRow)
value - a string value arraypage - the page of the column, must be greater then 0startRow - the row of the column, must be greater then 0public boolean writeHeader(java.io.DataOutputStream dos)
dos - a valid DataOutputStreamtrue if the header was successfully writtenfalse if an error occured
public boolean writeElement(java.io.DataOutputStream dos,
int page,
int row,
boolean ascii)
dos - a valid DataOutputStreampage - the page of the column, must be greater then 0row - the row of the column, must be greater then 0ascii - set true to write ascii column data,
false to write big endian binary column datatrue if the value was successfully writtenfalse if an invalid page or row was encountered or if
the column type is undefined.
public boolean writeElement(SDDS.java.SDDS.LEDataOutputStream ledos,
int page,
int row)
ledos - a valid LEDataOutputStreampage - the page of the column, must be greater then 0row - the row of the column, must be greater then 0true if the value was successfully writtenfalse if an invalid page or row was encountered or if
the column type is undefined.
public boolean writeColumn(java.io.DataOutputStream dos,
int page)
dos - a valid DataOutputStreampage - the page of the column, must be greater then 0true if the values were successfully writtenfalse if an invalid page was encountered or if
the column type is undefined.
public java.lang.Object[] getValues(int page,
boolean string_quotes)
page - the page of the column, must be greater then 0string_quotes - true if quotes are to be added around stringsfalse if raw strings are to be outputed.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||