|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.uql.path.XSelection
public class XSelection
An XSelection is a list of column selections. When applied to a tree, the XSelection selects nodes from the tree according to the column specification, and create a table node from the tree nodes.
| Field Summary | |
|---|---|
protected Vector |
aliasmap
|
protected Hashtable |
bmap
|
protected boolean |
expanded
|
protected Vector |
expmap
|
protected Hashtable |
fmtmap
|
protected Vector |
metamap
|
protected Vector |
opaths
|
protected Vector |
paths
|
protected Hashtable |
typemap
|
| Constructor Summary | |
|---|---|
XSelection()
Create an empty selection. |
|
| Method Summary | |
|---|---|
int |
addColumn(String path)
Add a column to the selection list. |
void |
clear()
Remove all components from the path. |
Object |
clone()
|
boolean |
contains(String path)
Check if the specified column is in the selection. |
String |
findColumn(String name)
Find the column with a name, which might be the alias, column or the suffix of the column. |
String |
getAlias(int col)
Get the alias for a table column. |
String |
getAliasColumn(String alias)
Get the column with the specified alias. |
String |
getBaseColumn(String exp)
Set the base column of an expression. |
String |
getColumn(int idx)
Get the specified column. |
int |
getColumnCount()
Get the number of columns in this selection. |
String |
getFormat(String path)
Get the format string used for converting the input node value to the specified type. |
String |
getOriginalColumn(int idx)
Get the original column. |
String |
getType(String path)
Get the type conversion for the column. |
XMetaInfo |
getXMetaInfo(int idx)
Get the meta data. |
XMetaInfo |
getXMetaInfo(int idx,
boolean create)
Get the meta data. |
XMetaInfo |
getXMetaInfo(String path)
Get the meta data. |
XMetaInfo |
getXMetaInfo(String path,
boolean create)
Get the meta data. |
Enumeration |
getXMetaInfos()
Get the all meta data. |
int |
indexOf(String path)
Get the index of the specified path. |
int |
indexOfColumn(String name)
Get the column index with a name, which might be the alias, column or the suffix of the column. |
int |
indexOfColumn(String name,
boolean upperCasedAlias)
Get the column index with a name, which might be the alias, column or the suffix of the column. |
boolean |
isAlias(String alias)
Check if a column name is an alias. |
boolean |
isExpandSubtree()
Check if the subtrees should be expanded. |
boolean |
isExpression(int idx)
Check the index is a expression column. |
boolean |
isExpression(String column)
Check the column is a expression column. |
boolean |
isFormatFixed(String path)
Gets the flag that determines if the format is fixed by the source of the data or may be modified by the user. |
static XSelection |
parse(String select)
Parse a selection string and create a selection object. |
boolean |
removeAliasColumn(String alias)
Remove an alias column. |
boolean |
removeColumn(int idx)
Remove a selected column. |
boolean |
removeColumn(String path)
Remove a selected column. |
XTableNode |
select(XNode root)
Apply the path to the tree, and return selected nodes from the tree as a table. |
void |
setAlias(int col,
String alias)
Set an alias for a table column. |
void |
setBaseColumn(String exp,
String col)
Set the base column of an expression. |
void |
setColumn(int idx,
String col)
Set the name of the specified column. |
void |
setConversion(String path,
String type,
String fmt)
Set the type of a column. |
void |
setExpandSubtree(boolean expanded)
If ExpandSubtree is set to true, all subtrees in a selected tree are expanded. |
void |
setExpression(int col,
boolean b)
Set a col is expression column. |
void |
setFormat(String path,
String fmt)
Set the format of a column. |
void |
setFormatFixed(String path,
boolean formatFixed)
Sets the flag that determines if the format is fixed by the source of the data or may be modified by the user. |
void |
setOriginalColumn(int idx,
String col)
Set the original name of the specified column. |
void |
setType(String path,
String type)
Set the type of a column. |
void |
setXMetaInfo(int idx,
XMetaInfo meta)
Set the meta data. |
String |
toIdentifier()
Get the identifier. |
String |
toString()
Convert to the string representation of this selection. |
String |
toString(boolean sql)
Convert to a SQL compliant selection. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean expanded
protected Vector paths
protected Vector aliasmap
protected Vector expmap
protected Hashtable bmap
protected Vector opaths
protected Vector metamap
protected Hashtable typemap
protected Hashtable fmtmap
| Constructor Detail |
|---|
public XSelection()
| Method Detail |
|---|
public static XSelection parse(String select)
throws ParseException
ParseExceptionpublic void setExpandSubtree(boolean expanded)
public boolean isExpandSubtree()
public XTableNode select(XNode root)
throws Exception
root - tree root.
Exceptionpublic void clear()
public int addColumn(String path)
path - tree node path to select as a table column.public boolean removeAliasColumn(String alias)
public boolean removeColumn(String path)
path - tree node path selected as a table column.public boolean removeColumn(int idx)
idx - column index in the list.
public void setAlias(int col,
String alias)
col - the column index.alias - column alias.public String getAlias(int col)
col - the column index.
public void setExpression(int col,
boolean b)
public boolean isExpression(String column)
public boolean isExpression(int idx)
public void setBaseColumn(String exp,
String col)
public String getBaseColumn(String exp)
public void setConversion(String path,
String type,
String fmt)
path - tree node path.type - type name. One of the value defined in XSchema class.fmt - format used to create a java.text.Format object.
public void setType(String path,
String type)
public String getType(String path)
path - tree node path.public String getFormat(String path)
path - tree node path.
public void setFormat(String path,
String fmt)
public boolean isFormatFixed(String path)
path - the column path.
public void setFormatFixed(String path,
boolean formatFixed)
path - the column path.formatFixed - true if fixed; false otherwise.public int getColumnCount()
public String getColumn(int idx)
public String getOriginalColumn(int idx)
public void setOriginalColumn(int idx,
String col)
public void setColumn(int idx,
String col)
public Enumeration getXMetaInfos()
public XMetaInfo getXMetaInfo(int idx)
idx - the column index.
public XMetaInfo getXMetaInfo(int idx,
boolean create)
idx - the column index.
public void setXMetaInfo(int idx,
XMetaInfo meta)
idx - the column index.meta - the mete data.public XMetaInfo getXMetaInfo(String path)
path - tree node path.
public XMetaInfo getXMetaInfo(String path,
boolean create)
path - tree node path.
public boolean contains(String path)
public String getAliasColumn(String alias)
public boolean isAlias(String alias)
public int indexOf(String path)
public String toString()
toString in class Objectpublic String toIdentifier()
public String toString(boolean sql)
public int indexOfColumn(String name)
name - the specified name.
public int indexOfColumn(String name,
boolean upperCasedAlias)
name - the specified name.
public String findColumn(String name)
name - the specified name.
public Object clone()
clone in class Object
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||