public class ColumnIdentifier
extends java.lang.Object
JELRowReader
)
and where requested cases simple wildcarding expressions.Constructor | Description |
---|---|
ColumnIdentifier(uk.ac.starlink.table.StarTable table) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
boolean[] |
getColumnFlags(java.lang.String colIdList) |
Returns an array of flags, the same length as the number of
columns in the table, with an element set true for each column
which is specified in
colIdList . |
int |
getColumnIndex(java.lang.String colid) |
Returns the index of a column given an identifying string.
|
int[] |
getColumnIndices(java.lang.String colidList) |
Returns an array of column indices from a
<colid-list> string. |
static java.util.regex.Pattern |
globToRegex(java.lang.String glob,
boolean caseSensitive) |
Turns a glob-type pattern into a regular expression Pattern.
|
boolean |
isCaseSensitive() |
Determines whether case is significant in column names.
|
void |
setCaseSensitive(boolean caseSensitive) |
Sets whether case is significant in column names.
|
public ColumnIdentifier(uk.ac.starlink.table.StarTable table)
table
- table whose columns this identifier can identifypublic void setCaseSensitive(boolean caseSensitive)
caseSensitive
- is matching case sensitive?public boolean isCaseSensitive()
public int getColumnIndex(java.lang.String colid) throws java.io.IOException
colid
- identifying stringjava.io.IOException
- if colid does not name a columnpublic int[] getColumnIndices(java.lang.String colidList) throws java.io.IOException
<colid-list>
string.
The string is split up into whitespace-separated tokens,
and each element must either be the identifier of an individual
column or a non-trivial glob-like pattern which may match
zero or more columns.colidList
- string containing a representation of a list
of columnsjava.io.IOException
- if colid doesn't look like a
colid-list specifierpublic boolean[] getColumnFlags(java.lang.String colIdList) throws java.io.IOException
colIdList
.
This convenience function just works on the result of
getColumnIndices(java.lang.String)
.colIdList
- string containing a representation of a list
of columnsjava.io.IOException
- if colid doesn't look like a
colid-list specifierpublic static java.util.regex.Pattern globToRegex(java.lang.String glob, boolean caseSensitive)
glob
contains no wildcards,
null
will be returned.glob
- glob patterncaseSensitive
- whether matching should be case sensitiveglob
is trivialCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.