|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ebi.adfconverter.common.data.tabulardata.DataRow
Object representing collection of data items contained within one line of the data file
| Constructor Summary | |
DataRow()
Creates a new DataRow instance.
|
|
DataRow(int initialCapacity)
Creates a new DataRow instance.
|
|
DataRow(java.text.NumberFormat format)
Creates a new DataRow instance.
|
|
| Method Summary | |
void |
add(DataBuffer datum)
Adds a DataBuffer datum to the next location in the row |
void |
add(DataBuffer datum,
int position)
Adds a databuffer datum at a given position in the current row |
void |
add(java.lang.String datum)
Adds a String datum to the next location in the Row |
void |
add(java.lang.StringBuffer datum)
Adds a StringBuffer datum to the next location in the row |
void |
add(java.lang.StringBuffer datum,
int position)
Adds a StringBuffer datum at a given position in the current row stores as DataBuffer |
void |
add(java.lang.String datum,
int position)
Adds a String datum at a given position in the current row stores as DataBuffer |
void |
addEmpty()
Adds an empty item (spacer) |
void |
clear()
Remove the content of DataRow. |
boolean |
equals(java.lang.Object row)
checks if the current object is equal to another one (which is supposed to be a DataRow object) |
DataBuffer |
getDataBuffer(int location)
Retrieves the DataBuffer value contained in the specified location. |
DataBuffer |
getDataBuffer(int location,
java.lang.String defaultVal)
Retrieves the String value contained in the specified location or defaultVal if it
does not. |
DataBuffer |
getDataBuffer(java.lang.String label)
Retrieves the DataBuffer value located
under specified column label. |
DataBuffer |
getDataBuffer(java.lang.String label,
java.lang.String defaultVal)
Retrieves the String value contained
under the specified column label. |
java.util.Date |
getDate(int location,
java.lang.String pattern)
Retrieves the date using the specified pattern to parse the date. |
java.util.Date |
getDate(java.lang.String label,
java.lang.String pattern)
Retrieves the date corresponding to the specified column label. |
double |
getDouble(int location)
Retrieves the double value of the datum contained in the specified location. |
double |
getDouble(int location,
java.text.DecimalFormat format,
double defaultVal)
Retrieves the double value at specified
location parsed using format.
|
double |
getDouble(int location,
double defaultVal)
Retrieves the double value of the datum contained in the specified location. |
double |
getDouble(java.lang.String label)
Retrieve the double value contained
in data cell corresponding to the specified column
label |
double |
getDouble(java.lang.String label,
double defaultVal)
Retrieve the double value contained
in data cell corresponding to the specified column
label. |
DataTableHeader |
getHeaderIndex()
Method for DataFile to get the shared
instance of a Hashtable that contains
column label to index reference. |
int |
getInt(int location)
Retrieves the int value of the datum contained in the specified location. |
int |
getInt(int location,
java.text.DecimalFormat format,
int defaultVal)
Retrieves the int value at specified
location parsed using format.
|
int |
getInt(int location,
int defaultVal)
Retrieves the int value of the datum contained in the specified location. |
int |
getInt(java.lang.String label)
Retrieves the int value of the datum contained under specified column label. |
int |
getInt(java.lang.String label,
int defaultVal)
Retrieves the int value under the specified
column label. |
int |
getLineNumber()
Retrieve dataRow Line number in the data file |
java.lang.String |
getString(int location)
Retrieves the String value contained in the specified location. |
java.lang.String |
getString(int location,
java.lang.String defaultVal)
Retrieves the String value contained in the specified location or defaultVal if it
does not. |
java.lang.String |
getString(java.lang.String label)
Retrieves the String value located
under specified column label. |
java.lang.String |
getString(java.lang.String label,
java.lang.String defaultVal)
Retrieves the String value contained
under the specified column label. |
java.lang.StringBuffer |
getStringBuffer(int location)
Retrieves the StringBuffer value contained in the specified location. |
java.lang.StringBuffer |
getStringBuffer(int location,
java.lang.StringBuffer defaultVal)
Retrieves the String value contained in the specified location or defaultVal if it
does not. |
java.lang.StringBuffer |
getStringBuffer(java.lang.String label)
Retrieves the StringBuffer value located
under specified column label. |
java.lang.StringBuffer |
getStringBuffer(java.lang.String label,
java.lang.StringBuffer defaultVal)
Retrieves the String value contained
under the specified column label. |
int |
getStringChecking()
Retrieves the stringChecking attribut |
boolean |
isEmpty()
Tests if this row has no elements. |
void |
setHeaderIndex(DataTableHeader index)
Method for DataFile to set the shared
instance of a Hashtable that contains
column label to index reference. |
void |
setLineNumber(int lineNumber)
sets dataRow Line number in the data file |
int |
size()
Retrieves the number of location in row. |
java.util.ArrayList |
toArrayList()
Converts the row of data into an arrayList |
java.lang.String |
toString()
For debugging purpose. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DataRow()
DataRow instance.
Uses JVM's locale for formatting numbers.
public DataRow(int initialCapacity)
DataRow instance.
Uses JVM's locale for formatting numbers.
initialCapacity - the initial capacity of the row.public DataRow(java.text.NumberFormat format)
DataRow instance.
Uses specified NumberFormat object to read
or write numbers.
format - a NumberFormat object| Method Detail |
public void add(DataBuffer datum)
datum - String datum item
public void add(DataBuffer datum,
int position)
datum - databuffer datum itemposition - the position to add the Objectpublic void add(java.lang.String datum)
datum - String datum itempublic void add(java.lang.StringBuffer datum)
datum - String datum item
public void add(java.lang.StringBuffer datum,
int position)
datum - StringBuffer datum itemposition - the position to add the Object
public void add(java.lang.String datum,
int position)
datum - String datum itemposition - the position to add the Objectpublic void addEmpty()
public void clear()
public boolean equals(java.lang.Object row)
row - the datarow to compare with
public DataBuffer getDataBuffer(int location)
location - an int value
String value or emty String
if specified location does not exist. (never
returns null)
public DataBuffer getDataBuffer(int location,
java.lang.String defaultVal)
defaultVal if it
does not.
location - location of the item (starts at zero)defaultVal - default value to use when the
does not contain a value.
String value at specified
location. If the value does not
exist, defaultVal is returned.public DataBuffer getDataBuffer(java.lang.String label)
DataBuffer value located
under specified column label.
label - column label
String value corresponding
to specified column label. If the column
does not exist, empty String is returned.
public DataBuffer getDataBuffer(java.lang.String label,
java.lang.String defaultVal)
String value contained
under the specified column label.
label - column labeldefaultVal - default value to return when value does not
exist or label fails to match
any of the column names in header row.
String value corresponding to specified
column label. If no such column exists
or the value is empty, devaultVal is
returned.
public java.util.Date getDate(int location,
java.lang.String pattern)
java.text.SimpleDateFormat
documentation valid date format patterns.
location - locationg of the itempattern - date format pattern (i.e. "yyyy.MM.dd" for 2002.10.20")
public java.util.Date getDate(java.lang.String label,
java.lang.String pattern)
label.
label - column labelpattern - see SimpleDateFormat for
further description on pattern syntax.
Date value under specified column label.
public double getDouble(int location)
throws java.lang.NumberFormatException
location - location of the item
double value
java.lang.NumberFormatException - if the item cannot be parsed using normal
number parser.
public double getDouble(int location,
java.text.DecimalFormat format,
double defaultVal)
double value at specified
location parsed using format.
If the value does not exist or fails to parse into
double, defaultVal is returned.
location - location of double valueformat - double value parser to be used in extracting
item.defaultVal - default value to use in case of missing data or
parse error.
location
or defaultVal
public double getDouble(int location,
double defaultVal)
location - location of the item.defaultVal - default value to use when value does not
exist or fails to parse correctly.
double value
public double getDouble(java.lang.String label)
throws java.lang.NumberFormatException
double value contained
in data cell corresponding to the specified column
label
label - column label
double value
java.lang.NumberFormatException - if the value cannot be parsed
correctly.
public double getDouble(java.lang.String label,
double defaultVal)
double value contained
in data cell corresponding to the specified column
label.
label - column labeldefaultVal - default value to use when value does not
exist or does not parse correctly.
double value corresponding to the
specified column label. If the
specified column label does not
exist or the value cannot parsed into a
double, defaultValu.public DataTableHeader getHeaderIndex()
DataFile to get the shared
instance of a Hashtable that contains
column label to index reference.
public int getInt(int location)
throws java.lang.NumberFormatException
location - location of the item.
int at the specified location.
java.lang.NumberFormatException - if the value at specified location
cannot parsed into an int
public int getInt(int location,
java.text.DecimalFormat format,
int defaultVal)
int value at specified
location parsed using format.
If the value does not exist or fails to parse into
int, defaultVal is returned.
location - location of int valueformat - int value parser to be used in extracting
item.defaultVal - default value to use in case of missing data or
parse error.
int value at specified location
or the defaultVal
public int getInt(int location,
int defaultVal)
location - location of the item.defaultVal - default value to use when value does not exist.
int value
public int getInt(java.lang.String label)
throws java.lang.NumberFormatException
label.
label - column label
int value
java.lang.NumberFormatException - if specified column label
does not exist or the value cannot parsed into an
int
public int getInt(java.lang.String label,
int defaultVal)
int value under the specified
column label.
label - column label (header)defaultVal - default value to use when value does not exist.
int value corresponding to the
specified column label.
If the specified column label
does not exist or cannot be convert into an
int default value is returned.public int getLineNumber()
public java.lang.String getString(int location)
location - an int value
String value or emty String
if specified location does not exist. (never
returns null)
public java.lang.String getString(int location,
java.lang.String defaultVal)
defaultVal if it
does not.
location - location of the item (starts at zero)defaultVal - default value to use when the
does not contain a value.
String value at specified
location. If the value does not
exist, defaultVal is returned.public java.lang.String getString(java.lang.String label)
String value located
under specified column label.
label - column label
String value corresponding
to specified column label. If the column
does not exist, empty String is returned.
public java.lang.String getString(java.lang.String label,
java.lang.String defaultVal)
String value contained
under the specified column label.
label - column labeldefaultVal - default value to return when value does not
exist or label fails to match
any of the column names in header row.
String value corresponding to specified
column label. If no such column exists
or the value is empty, devaultVal is
returned.public java.lang.StringBuffer getStringBuffer(int location)
location - an int value
String value or emty String
if specified location does not exist. (never
returns null)
public java.lang.StringBuffer getStringBuffer(int location,
java.lang.StringBuffer defaultVal)
defaultVal if it
does not.
location - location of the item (starts at zero)defaultVal - default value to use when the
does not contain a value.
String value at specified
location. If the value does not
exist, defaultVal is returned.public java.lang.StringBuffer getStringBuffer(java.lang.String label)
StringBuffer value located
under specified column label.
label - column label
String value corresponding
to specified column label. If the column
does not exist, empty String is returned.
public java.lang.StringBuffer getStringBuffer(java.lang.String label,
java.lang.StringBuffer defaultVal)
String value contained
under the specified column label.
label - column labeldefaultVal - default value to return when value does not
exist or label fails to match
any of the column names in header row.
String value corresponding to specified
column label. If no such column exists
or the value is empty, devaultVal is
returned.public int getStringChecking()
public boolean isEmpty()
public void setHeaderIndex(DataTableHeader index)
DataFile to set the shared
instance of a Hashtable that contains
column label to index reference.
index - column label to index reference table.public void setLineNumber(int lineNumber)
lineNumber - the line number of the row in the filepublic int size()
DataRowpublic java.util.ArrayList toArrayList()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||