Package io.odysz.semantic.DA
Class DatasetHelper
java.lang.Object
io.odysz.semantic.DA.DatasetHelper
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The reference implementation can be similar toformatSemanticNode(TreeSemantics, AnResultset, AnTreeNode, int)
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<DatasetCfg.AnTreeNode>
buildForest
(AnResultset rs, DatasetCfg.TreeSemantics treeSemtcs, DatasetHelper.NodeFormatter... noder) Convert the result set to a forest.static List<?>
loadStree
(String conn, String sk, int page, int size, String[] sqlArgs, DatasetHelper.NodeFormatter... optionalNoder) static List<?>
loadStree
(String conn, String sk, io.odysz.transact.sql.PageInf page, DatasetHelper.NodeFormatter... noder) Load semantic tree configured in dataset.xml.
-
Constructor Details
-
DatasetHelper
public DatasetHelper()
-
-
Method Details
-
loadStree
public static List<?> loadStree(String conn, String sk, int page, int size, String[] sqlArgs, DatasetHelper.NodeFormatter... optionalNoder) throws SQLException, io.odysz.transact.x.TransException - Throws:
SQLException
io.odysz.transact.x.TransException
-
loadStree
public static List<?> loadStree(String conn, String sk, io.odysz.transact.sql.PageInf page, DatasetHelper.NodeFormatter... noder) throws SQLException, io.odysz.transact.x.TransException Load semantic tree configured in dataset.xml.- Parameters:
conn
-sk
-page
- cannot be null- Returns:
- forest
- Throws:
SQLException
io.odysz.transact.x.TransException
-
buildForest
public static List<DatasetCfg.AnTreeNode> buildForest(AnResultset rs, DatasetCfg.TreeSemantics treeSemtcs, DatasetHelper.NodeFormatter... noder) throws SQLException, SemanticException Convert the result set to a forest.- Parameters:
rs
-treeSemtcs
-noder
- optional to override default formatterDatasetHelper.NodeFormatter
.- Returns:
- built forest
- Throws:
SQLException
SemanticException
- data structure can not build tree / forest
-