Modifier and Type | Class and Description |
---|---|
class |
XFTTable.TableRowComparator |
Modifier and Type | Field and Description |
---|---|
ArrayList |
quarantineIndexs |
Constructor and Description |
---|
XFTTable() |
Modifier and Type | Method and Description |
---|---|
void |
addQuarantineRow(int i) |
void |
addQuarantineRow(Integer i) |
XFTTable |
cloneTable() |
ArrayList |
convertColumnsToArrayList(ArrayList sqlNames)
ArrayList of ArrayLists
|
ArrayList |
convertColumnToArrayList(String colName) |
Map<Object,Object> |
convertToHashtable(String keyColumn,
String valueColumn) |
Map<Object,Object> |
convertToMap(String keyColumn,
String valueColumn,
Map<Object,Object> al) |
static XFTTable |
Execute(String query,
String dbName,
String userName) |
Object |
getCellValue(String header)
If this header is found in the collection of column names, then that index
is used to return the Object from the current row at that index.
|
Integer |
getColumnIndex(String header) |
Hashtable |
getColumnNumberHash() |
String[] |
getColumns()
returns all columns
|
Object |
getFirstObject() |
int |
getNumCols()
returns number of columns
|
int |
getNumRows() |
int |
getRowCursor() |
Hashtable |
getRowHash(String columnName,
Object v) |
ArrayList |
getRowHashs(String columnName,
Object v) |
boolean |
hasMoreRows()
returns true if more rows are available
|
void |
initTable(ArrayList c)
Initializes table by setting the columns, number of columns and initialized contents.
|
void |
initTable(ArrayList c,
ArrayList newRows)
Initializes table by setting the columns, number of columns and initialized contents.
|
void |
initTable(String[] c)
Initializes table by setting the columns, number of columns and initialized contents.
|
void |
insertRow(Object[] row)
Inserts row into table and increments row counter.
|
void |
insertRowItems(Object... items)
This is a pass-through method to avoid having to create an array for the
method . |
boolean |
isQuarantineRow(int i) |
Object[] |
nextRow()
Returns next row and increments row cursor.
|
Hashtable |
nextRowHash() |
Object[] |
removeRow(int rowNumber) |
void |
resetRowCursor()
Resets row cursor to row 0
|
void |
reverse() |
ArrayList<Hashtable> |
rowHashs() |
ArrayList<Object[]> |
rows() |
void |
setColumns(String[] columns) |
int |
size() |
void |
sort(int col,
String order) |
void |
sort(List<String> sortColumns) |
void |
sort(String colname,
String order) |
ArrayList<Hashtable> |
toArrayListOfHashtables()
Converts each row into a hashtable and inserts them into an ArrayList.
|
ArrayList<List> |
toArrayListOfLists()
Converts each row into a hashtable and inserts them into an ArrayList.
|
void |
toCSV(Writer w,
Map<String,Map<String,String>> columnProperties,
String title) |
Hashtable |
toHashtable(String key,
String value) |
String |
toHTML(boolean insertTDTags)
Outputs table headers and contents into an HTML Table
|
String |
toHTML(boolean insertTDTags,
String lightColor,
String darkColor,
Hashtable tableProperties,
int startCount) |
void |
toHTML(boolean insertTDTags,
String lightColor,
String darkColor,
Hashtable tableProperties,
int startCount,
OutputStream out) |
void |
toHTML(boolean insertTDTags,
Writer writer)
Outputs table headers and contents into an HTML Table
|
void |
toHTML(boolean insertTDTags,
Writer writer,
Map<String,Map<String,String>> cp)
Outputs table headers and contents into an HTML Table
|
void |
toJSON(Writer writer) |
void |
toJSON(Writer writer,
Map<String,Map<String,String>> cp) |
String |
toString()
Outputs table headers and contents without delimiters
|
String |
toString(String delimiter)
Outputs table headers and contents as a delimited string
|
void |
toXMLList(Writer w,
Map<String,Map<String,String>> columnProperties,
String title) |
void |
toXMLList(Writer w,
String title) |
static String |
ValueParser(Object o) |
static String |
ValueParser(Object o,
String regexToReplace,
String replacement)
Formats BYTEA type to string
|
static String |
ValueParserNoNewline(Object o) |
public ArrayList quarantineIndexs
public static XFTTable Execute(String query, String dbName, String userName) throws SQLException, DBPoolException
SQLException
DBPoolException
public XFTTable cloneTable()
public void initTable(String[] c)
c
- public void initTable(ArrayList c)
c
- public void initTable(ArrayList c, ArrayList newRows)
c
- public String[] getColumns()
getColumns
in interface XFTTableI
public Hashtable getColumnNumberHash()
public int getNumCols()
getNumCols
in interface XFTTableI
public boolean hasMoreRows()
hasMoreRows
in interface XFTTableI
public Object[] nextRow()
public Hashtable nextRowHash()
nextRowHash
in interface XFTTableI
public Object getCellValue(String header)
getCellValue
in interface XFTTableI
header
- public void insertRowItems(Object... items)
method
.items
- The items to pass through as an array.public void insertRow(Object[] row)
row
- of Objectspublic void resetRowCursor()
resetRowCursor
in interface XFTTableI
public String toString(String delimiter)
public String toHTML(boolean insertTDTags, String lightColor, String darkColor, Hashtable tableProperties, int startCount)
public void toHTML(boolean insertTDTags, String lightColor, String darkColor, Hashtable tableProperties, int startCount, OutputStream out)
public String toHTML(boolean insertTDTags)
insertTDTags
- Indicates whether TD tags should be inserted.public String toString()
public static String ValueParser(Object o, String regexToReplace, String replacement)
o
- public int getNumRows()
getNumRows
in interface XFTTableI
public Map<Object,Object> convertToHashtable(String keyColumn, String valueColumn)
public Map<Object,Object> convertToMap(String keyColumn, String valueColumn, Map<Object,Object> al)
public ArrayList convertColumnsToArrayList(ArrayList sqlNames)
sqlNames
- public void setColumns(String[] columns)
columns
- The columns to set.public int getRowCursor()
getRowCursor
in interface XFTTableI
public ArrayList<Hashtable> toArrayListOfHashtables()
public ArrayList<List> toArrayListOfLists()
public Object getFirstObject()
public void addQuarantineRow(Integer i)
public void addQuarantineRow(int i)
public boolean isQuarantineRow(int i)
public void sort(int col, String order)
public void toXMLList(Writer w, Map<String,Map<String,String>> columnProperties, String title)
public void toJSON(Writer writer) throws IOException
IOException
public void toJSON(Writer writer, Map<String,Map<String,String>> cp) throws IOException
IOException
public void toHTML(boolean insertTDTags, Writer writer) throws IOException
insertTDTags
- Indicates whether TD tags should be inserted.writer
- The writer to use for output.IOException
public void toHTML(boolean insertTDTags, Writer writer, Map<String,Map<String,String>> cp) throws IOException
insertTDTags
- Indicates whether TD tags should be inserted.writer
- The writer to use for output.cp
- Column properties.IOException
public void reverse()
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.