|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.afcs.warts.db.TableHighBitAnalysis
The TableHighBitAnalysis class is responsible for
compiling a report on the non-ascii characters (or "high bits") in an entire
table's worth of data. An instance is constructed via
findHighBits(DataSet) and essentially wraps the DataSet received,
providing access to the source data and table description, so that
references to the original DataSet are no longer needed.
LICENSE: This code is released to the public domain and may be used for any purpose whatsoever without permission or acknowledgment.
| Field Summary | |
static int |
PROP_2_BYTE_UTF_8_CHAR
Used to obtain a count of 2 byte UTF-8 characters or rows containing 2 byte UTF-8 characters in a specific column. |
static int |
PROP_3_BYTE_UTF_8_CHAR
Used to obtain a count of 3 byte UTF-8 characters or rows containing 3 byte UTF-8 characters in a specific column. |
static int |
PROP_AMBIGUOUS_BYTE
Used to obtain a count of ambiguous bytes or rows containing ambiguous bytes in a specific column. |
static int |
PROP_ILLEGAL_BYTE
Used to obtain a count of illegal bytes or rows containing illegal bytes in a specific column. |
static int |
PROP_LATIN_1_CHAR
Used to obtain a count of Latin-1 characters or rows containing Latin-1 characters in a specific column. |
static int |
PROP_OVERSIZED
Used to obtain a count the oversized rows in a specific column. |
| Method Summary | |
boolean |
containsNonAsciiBytes(int columnIndex)
Returns true if the specified column contains any non-ascii bytes. |
static TableHighBitAnalysis |
findHighBits(DataSet tableData)
Constructs a new instance containing the summataion of all any non-ascii character analysis objects contained in the specified data set. |
boolean |
foundNonAsciiBytes()
Returns true if non-ascii character analysis found any non-ascii bytes in the table. |
int |
getByteAnalysisProperty(int columnIndex,
int propertyIndex)
Returns the specified property of the byte-wise analysis of the specified column. |
int |
getNumRows()
Returns the number of rows in hte dataset analysed by this instance. |
int |
getRowAnalysisProperty(int columnIndex,
int propertyIndex)
Returns the specified property of the row-wise analysis of the specified column. |
TableDescription |
getTableDescription()
Returns the description of the table from which the dataset analysed by this instance was loaded. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value at the specified row and column from the dataset analysed by this instance. |
boolean |
isColumnAnalysed(int columnIndex)
Returns true if the specified column contains character data and is thus analysed. |
java.lang.String |
toString()
Returns a text description of the current instance that can be used for debugging purposes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int PROP_LATIN_1_CHAR
public static final int PROP_2_BYTE_UTF_8_CHAR
public static final int PROP_3_BYTE_UTF_8_CHAR
public static final int PROP_AMBIGUOUS_BYTE
DataHighBitAnalysis for a
definition of ambiguity in this case.
public static final int PROP_ILLEGAL_BYTE
DataHighBitAnalysis for a
definition of an illegal byte.
public static final int PROP_OVERSIZED
| Method Detail |
public static TableHighBitAnalysis findHighBits(DataSet tableData)
tableData - The data set to analyse.
java.lang.NullPointerException - If tableData is null.public boolean foundNonAsciiBytes()
public boolean containsNonAsciiBytes(int columnIndex)
columnIndex - The column to enquire about.
java.lang.IllegalArgumentException - If columnIndex is out of bounds.
public int getByteAnalysisProperty(int columnIndex,
int propertyIndex)
columnIndex - The column to return the property for.propertyIndex - The property index. This should be one of the
PROP_* constants defined in this class,
other than PROP_OVERSIZED, which
is a row-wise property only.
java.lang.IllegalArgumentException - If either argument is out of bounds.
public int getRowAnalysisProperty(int columnIndex,
int propertyIndex)
columnIndex - The column to return the property for.propertyIndex - The property index. This should be one of the
PROP_* constants defined in this class.
java.lang.IllegalArgumentException - If either argument is out of bounds.public boolean isColumnAnalysed(int columnIndex)
columnIndex - The index of the column to check.
public TableDescription getTableDescription()
getTableDescription in interface TabularDatapublic int getNumRows()
getNumRows in interface TabularData
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface TabularDatarowIndex - The row to retrieve the data from.columnIndex - The column to retrieve the data from.
java.lang.IllegalArgumentException - If either argument is out of bounds.public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||