use of org.talend.designer.hl7.ui.data.Element in project tdi-studio-se by Talend.
the class HL7OutputManager method getRootTable.
public List<Map<String, String>> getRootTable() {
List<Map<String, String>> result = new ArrayList<Map<String, String>>();
for (HL7TreeNode rootNode : this.getOriginalNodes()) {
// if (!(rootNode instanceof HL7Root)) {
initNodeOrder(rootNode);
order = 1;
// }
//$NON-NLS-1$
tableLoader((Element) rootNode, "", result, rootNode.getDefaultValue());
}
return result;
}
use of org.talend.designer.hl7.ui.data.Element in project tdi-studio-se by Talend.
the class HL7OutputManager method getLoopTable.
public List<Map<String, String>> getLoopTable() {
List<Map<String, String>> result = new ArrayList<Map<String, String>>();
for (HL7TreeNode rootNode : this.getOriginalNodes()) {
Element loopNode = (Element) getLoopNode(rootNode);
if (loopNode != null) {
String path = getPath(loopNode);
//$NON-NLS-1$
tableLoader(loopNode, path.substring(0, path.lastIndexOf("/")), result, loopNode.getDefaultValue());
}
}
return result;
}
use of org.talend.designer.hl7.ui.data.Element in project tdi-studio-se by Talend.
the class UIManager method autoMap.
/**
*
* DOC xzhang Comment method "autoMap".
*/
public void autoMap(String currentSchema) {
if (this.hl7Manager instanceof HL7OutputManager) {
List<HL7TreeNode> roots = this.hl7Manager.getTreeData("");
List<HL7TreeNode> mappableNodes = new ArrayList<HL7TreeNode>();
for (HL7TreeNode root : roots) {
getMappableNode((Element) root, mappableNodes);
}
List<IMetadataColumn> schemaData = this.hl7Manager.getSchemaData(currentSchema);
for (HL7TreeNode node : mappableNodes) {
for (IMetadataColumn column : schemaData) {
if (node.getLabel().equals(column.getLabel())) {
node.setDefaultValue(null);
node.setColumn(column);
break;
}
// String[] splits = node.getColumnLabel().split(":");
// for (String s : splits) {
// if (s.equals(column.getLabel())) {
// node.setDefaultValue(null);
// node.setColumn(column);
// break;
// }
// }
}
}
// this.hl7UI.refreshXMLViewer(root);
this.hl7UI.redrawLinkers();
return;
}
this.hl7UI.autoMap();
}
Aggregations