public class DatasetCfg extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DatasetCfg.AnTreeNode
Representing each tree node.
|
static class |
DatasetCfg.Dataset
POJO dataset element as configured in dataset.xml.
(oracle mapping information also initialized according to mapping file and the "cols" tag.) |
static class |
DatasetCfg.TreeSemantics
Data structure of s-tree configuration.
|
Modifier and Type | Field and Description |
---|---|
protected static String |
cfgFile |
protected static String |
deftId |
protected static HashMap<String,DatasetCfg.Dataset> |
dss |
static int |
ixMs2k |
static int |
ixMysql |
static int |
ixOrcl |
static int |
ixSqlit |
static int |
ixUnknow |
protected static String |
tag |
Constructor and Description |
---|
DatasetCfg() |
Modifier and Type | Method and Description |
---|---|
static List<?> |
buildForest(AnResultset rs,
DatasetCfg.TreeSemantics treeSemtcs)
Convert the result set to a forest.
|
static AnResultset |
dataset(String conn,
String sk,
int page,
int size,
String... args) |
static DatasetCfg.AnTreeNode |
formatSemanticNode(DatasetCfg.TreeSemantics treeSmx,
AnResultset rs,
int level)
Create a SemanticObject for tree node with current rs row.
TODO should this moved to TreeSemantics? |
static DatasetCfg.TreeSemantics |
getTreeSemtcs(String sk) |
static void |
init(String path) |
protected static void |
load(HashMap<String,DatasetCfg.Dataset> cfgs,
String xmlPath)
Load all dataset.xml into the argument cfgs.
When return, cfgs is loaded with dataset configurations like [id, mysql:sql, orcl:sql, ...]. |
static AnResultset |
loadDataset(String conn,
String sk) |
static AnResultset |
loadDataset(String conn,
String sk,
int page,
int size,
String... args) |
static AnResultset |
loadDataset(String conn,
String sk,
String... args) |
static List<?> |
loadStree(String conn,
String sk,
int page,
int size,
String... args) |
static List<?> |
loadStree(String conn,
String sk,
io.odysz.transact.sql.PageInf page)
Load semantic tree configured in dataset.xml.
|
static void |
parseConfigs(HashMap<String,DatasetCfg.Dataset> cfgs,
XMLTable xSmtcs) |
static Set<String> |
sks() |
public static final int ixMysql
public static final int ixOrcl
public static final int ixMs2k
public static final int ixSqlit
public static final int ixUnknow
protected static final String tag
protected static final String cfgFile
protected static final String deftId
protected static HashMap<String,DatasetCfg.Dataset> dss
public static void init(String path) throws SAXException, IOException
SAXException
IOException
protected static void load(HashMap<String,DatasetCfg.Dataset> cfgs, String xmlPath) throws SAXException, IOException
cfgs
- xmlPath
- IOException
SAXException
public static void parseConfigs(HashMap<String,DatasetCfg.Dataset> cfgs, XMLTable xSmtcs)
public static AnResultset dataset(String conn, String sk, int page, int size, String... args) throws SQLException, io.odysz.transact.x.TransException
SQLException
io.odysz.transact.x.TransException
public static DatasetCfg.TreeSemantics getTreeSemtcs(String sk)
public static AnResultset loadDataset(String conn, String sk, int page, int size, String... args) throws SQLException, io.odysz.transact.x.TransException
SQLException
io.odysz.transact.x.TransException
public static AnResultset loadDataset(String conn, String sk) throws SQLException, io.odysz.transact.x.TransException
SQLException
io.odysz.transact.x.TransException
public static AnResultset loadDataset(String conn, String sk, String... args) throws SQLException, io.odysz.transact.x.TransException
SQLException
io.odysz.transact.x.TransException
public static List<?> loadStree(String conn, String sk, int page, int size, String... args) throws SQLException, io.odysz.transact.x.TransException
SQLException
io.odysz.transact.x.TransException
public static List<?> loadStree(String conn, String sk, io.odysz.transact.sql.PageInf page) throws SQLException, io.odysz.transact.x.TransException
conn
- sk
- page
- cannot be nullSQLException
io.odysz.transact.x.TransException
public static List<?> buildForest(AnResultset rs, DatasetCfg.TreeSemantics treeSemtcs) throws SQLException, SemanticException
rs
- treeSemtcs
- SQLException
SemanticException
- data structure can not build tree / forestpublic static DatasetCfg.AnTreeNode formatSemanticNode(DatasetCfg.TreeSemantics treeSmx, AnResultset rs, int level) throws SQLException
treeSmx
- rs
- level
- depth of this nodeSemanticObject
of nodeSQLException
Copyright © 2024. All rights reserved.