本文整理了Java中edu.isi.karma.rep.Node.setNestedTable()
方法的一些代码示例,展示了Node.setNestedTable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.setNestedTable()
方法的具体详情如下:
包路径:edu.isi.karma.rep.Node
类名称:Node
方法名:setNestedTable
暂无
代码示例来源:origin: usc-isi-i2/Web-Karma
Node createNode(String id, String hNodeId, String worksheetId) {
Node n = new Node(id, hNodeId);
nodes.put(id, n);
HNode hn = hNodes.get(hNodeId);
HTable nestedHTable = hn.getNestedTable();
if (nestedHTable != null) {
n.setNestedTable(createTable(nestedHTable.getId(), worksheetId), this);
}
return n;
}
代码示例来源:origin: usc-isi-i2/Web-Karma
private void removeNestedTable(Workspace workspace) {
HNode hNode = workspace.getFactory().getHNode(pythonNodeId);
hNode.removeNestedTable();
List<Node> nodes = new ArrayList<>();
workspace.getWorksheet(worksheetId).getDataTable().collectNodes(hNode.getHNodePath(workspace.getFactory()), nodes, getSuperSelection(workspace.getWorksheet(worksheetId)));
for (Node node : nodes) {
node.setNestedTable(null, workspace.getFactory());
}
}
代码示例来源:origin: usc-isi-i2/Web-Karma
node.setNestedTable(null, workspace.getFactory());
node.setValue(oldNodeValueMap.get(node), oldNodeStatusMap.get(node), workspace.getFactory());
代码示例来源:origin: usc-isi-i2/Web-Karma
@Override
public UpdateContainer undoIt(Workspace workspace) {
for (Node node : affectedNodes) {
HNode hNode = workspace.getFactory().getHNode(node.getHNodeId());
hNode.removeNestedTable();
node.setNestedTable(null, workspace.getFactory());
node.clearValue(NodeStatus.original);
}
affectedNodes.clear();
try {
if(previousPythonTransformationCommand instanceof SubmitPythonTransformationCommand)
{
SubmitPythonTransformationCommand prevCommand = (SubmitPythonTransformationCommand)previousPythonTransformationCommand;
//Previous python command exists, lets reset the values, and then start again
prevCommand.resetColumnValues(workspace);
}
UpdateContainer uc = previousPythonTransformationCommand.doIt(workspace);
return uc;
} catch (CommandException e) {
return new UpdateContainer(new ErrorUpdate("Error occured while applying previous Python transformation to the column."));
}
}
代码示例来源:origin: usc-isi-i2/Web-Karma
public void addNestedTableToDataTable(HNode hNode, Table table,
RepFactory factory) {
Node node = getNode(hNode.getId());
if (node != null) {
// This table does contain this hNode.
Table nestedTable = factory.createTable(hNode.getNestedTable()
.getId(), getWorksheetId());
node.setNestedTable(nestedTable, factory);
// If the node has a value, we have to move the value to the
// nestedTable given that we cannot have both.
if (!node.getValue().isEmptyValue()) {
logger.info("While adding nested table, found that column '"
+ factory.getColumnName(hNode.getId())
+ "' has a value: '" + node.getValue().asString()
+ "'.");
logger.info("Emptying value in node and trying to move it to the nested table.");
nestedTable.addOrphanValue(node.getValue(), node.getHNodeId(),
factory);
}
} else {
// The node may be in one of the nested tables. We have to look for
// it.
for (Node n : nodes.values()) {
Table nestedTable = n.getNestedTable();
if (nestedTable != null) {
nestedTable.addNestedTableToDataTable(hNode, factory);
}
}
}
}
代码示例来源:origin: usc-isi-i2/Web-Karma
HNode hNode = workspace.getFactory().getHNode(node.getHNodeId());
hNode.removeNestedTable();
node.setNestedTable(null, workspace.getFactory());
node.clearValue(NodeStatus.original);
内容来源于网络,如有侵权,请联系作者删除!